MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / IsInstanceFenced

Method IsInstanceFenced

api/v1/cluster_funcs.go:859–869  ·  view source on GitHub ↗

IsInstanceFenced check if in a given instance should be fenced

(instance string)

Source from the content-addressed store, hash-verified

857
858// IsInstanceFenced check if in a given instance should be fenced
859func (cluster *Cluster) IsInstanceFenced(instance string) bool {
860 fencedInstances, err := utils.GetFencedInstances(cluster.Annotations)
861 if err != nil {
862 return false
863 }
864
865 if fencedInstances.Has(utils.FenceAllInstances) {
866 return true
867 }
868 return fencedInstances.Has(instance)
869}
870
871// ShouldResizeInUseVolumes is true when we should resize PVC we already
872// created

Callers 9

fencingOffFunction · 0.95
handleSwitchoverMethod · 0.80
fence_test.goFile · 0.80
printBasicInfoMethod · 0.80
reconcileFencingMethod · 0.80
initializeMethod · 0.80

Calls 2

GetFencedInstancesFunction · 0.92
HasMethod · 0.80

Tested by

no test coverage detected