@@ -1660,10 +1660,11 @@ func (c *Cluster) generateStatefulSet(spec *cpov1.PostgresSpec) (*appsv1.Statefu
16601660
16611661 statefulSet := & appsv1.StatefulSet {
16621662 ObjectMeta : metav1.ObjectMeta {
1663- Name : c .statefulSetName (),
1664- Namespace : c .Namespace ,
1665- Labels : c .labelsSetWithType (true , TYPE_POSTGRESQL ),
1666- Annotations : c .AnnotationsToPropagate (c .annotationsSet (nil )),
1663+ Name : c .statefulSetName (),
1664+ Namespace : c .Namespace ,
1665+ Labels : c .labelsSetWithType (true , TYPE_POSTGRESQL ),
1666+ Annotations : c .AnnotationsToPropagate (c .annotationsSet (nil )),
1667+ OwnerReferences : c .createOwnerReference (),
16671668 },
16681669 Spec : appsv1.StatefulSetSpec {
16691670 Replicas : & numberOfInstances ,
@@ -1921,10 +1922,11 @@ func (c *Cluster) generateRepoHostStatefulSet(spec *cpov1.PostgresSpec) (*appsv1
19211922
19221923 statefulSet := & appsv1.StatefulSet {
19231924 ObjectMeta : metav1.ObjectMeta {
1924- Name : c .getPgbackrestRepoHostName (),
1925- Namespace : c .Namespace ,
1926- Labels : repoHostLabels ,
1927- Annotations : c .AnnotationsToPropagate (c .annotationsSet (nil )),
1925+ Name : c .getPgbackrestRepoHostName (),
1926+ Namespace : c .Namespace ,
1927+ Labels : repoHostLabels ,
1928+ Annotations : c .AnnotationsToPropagate (c .annotationsSet (nil )),
1929+ OwnerReferences : c .createOwnerReference (),
19281930 },
19291931 Spec : appsv1.StatefulSetSpec {
19301932 Replicas : & numberOfInstances ,
0 commit comments