func (p *PodFacts) Invalidate() {
	p.NeedCollection = true
}
Invalidate will mark the pod facts as requiring a refresh.
Next call to Collect will gather up the facts again.
package controllers
import (
	"context"
	"fmt"
	"regexp"
	"sort"
	"strings"
	vapi "github.com/vertica/vertica-kubernetes/api/v1beta1"
	"github.com/vertica/vertica-kubernetes/pkg/cmds"
	"github.com/vertica/vertica-kubernetes/pkg/names"
	"github.com/vertica/vertica-kubernetes/pkg/paths"
	appsv1 "k8s.io/api/apps/v1"
	corev1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/errors"
	"k8s.io/apimachinery/pkg/types"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"yunion.io/x/pkg/tristate"
)
type PodFact struct {
	name types.NamespacedName
	dnsName string
	podIP string
	subcluster string
	exists bool
	isPodRunning bool
	managedByParent bool
	isInstalled tristate.TriState
	hasStaleAdmintoolsConf bool
	dbExists tristate.TriState
	upNode bool
	vnodeName string
	compat21NodeName string
	eulaAccepted tristate.TriState
	configLogrotateExists bool
	configLogrotateWritable bool
	configShareExists bool
}
type PodFactDetail map[types.NamespacedName]*PodFact
type PodFacts struct {
	client.Client
	PRunner        cmds.PodRunner
	Detail         PodFactDetail
	NeedCollection bool
}
func MakePodFacts(cli client.Client, prunner cmds.PodRunner) PodFacts {
	return PodFacts{Client: cli, PRunner: prunner, NeedCollection: true, Detail: make(PodFactDetail)}
}
func (p *PodFacts) Collect(ctx context.Context, vdb *vapi.VerticaDB) error {
	if !p.NeedCollection {
		return nil
	}
	p.Detail = make(PodFactDetail)  
	finder := MakeSubclusterFinder(p.Client, vdb)
	subclusters, err := finder.FindSubclusters(ctx, FindAll)
	if err != nil {
		return nil
	}
	for i := range subclusters {
		if err := p.collectSubcluster(ctx, vdb, subclusters[i]); err != nil {
			return err
		}
	}
	p.NeedCollection = false
	return nil
}