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

Method SetInheritedDataAndOwnership

api/v1/cluster_funcs.go:1317–1320  ·  view source on GitHub ↗

SetInheritedDataAndOwnership sets the cluster as owner of the passed object and then sets all the needed annotations and labels

(obj *metav1.ObjectMeta)

Source from the content-addressed store, hash-verified

1315// SetInheritedDataAndOwnership sets the cluster as owner of the passed object and then
1316// sets all the needed annotations and labels
1317func (cluster *Cluster) SetInheritedDataAndOwnership(obj *metav1.ObjectMeta) {
1318 cluster.SetInheritedData(obj)
1319 utils.SetAsOwnedBy(obj, cluster.ObjectMeta, cluster.TypeMeta)
1320}
1321
1322// SetInheritedData sets all the needed annotations and labels
1323func (cluster *Cluster) SetInheritedData(obj *metav1.ObjectMeta) {

Callers 15

createBackupMethod · 0.95
enrichSnapshotMethod · 0.80
BuildPodMonitorMethod · 0.80
CreatePrimaryJobFunction · 0.80
BuildManagedServicesFunction · 0.80
reconcilePrimaryLeaseMethod · 0.80

Calls 2

SetInheritedDataMethod · 0.95
SetAsOwnedByFunction · 0.92

Tested by 3

generateFakeClusterPodsFunction · 0.64
generateFakeInitDBJobsFunction · 0.64
newFakePVCFunction · 0.64