diff --git a/pkg/specs/pods.go b/pkg/specs/pods.go index 76d9ba2b81..0e3f0fb4a4 100644 --- a/pkg/specs/pods.go +++ b/pkg/specs/pods.go @@ -366,7 +366,6 @@ func PodWithExistingStorage(cluster apiv1.Cluster, nodeSerial int) *corev1.Pod { pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - utils.OldClusterLabelName: cluster.Name, //nolint utils.ClusterLabelName: cluster.Name, utils.InstanceNameLabelName: podName, utils.PodRoleLabelName: string(utils.PodRoleInstance), diff --git a/pkg/utils/labels_annotations.go b/pkg/utils/labels_annotations.go index e73a5787c2..c984e94549 100644 --- a/pkg/utils/labels_annotations.go +++ b/pkg/utils/labels_annotations.go @@ -28,20 +28,6 @@ const ( // ClusterLabelName is the name of cluster which the backup CR belongs to ClusterLabelName = "cnpg.io/cluster" - // OldClusterLabelName label is applied to objects to link them to the owning - // cluster. - // - // Deprecated: please use ClusterLabelName instead - // - // TODO: delete as soon as possible. releases 1.16, 1.17 still - // have embedded logic relying on "postgresql" as the cluster label - // in controllers/cluster_controller.go mapNodeToClusters() at minimum. - // Release 1.18 does not have that logic - // - // IMPORTANT: Removing this is a breaking change and should be announced in Release Notes - // utils.ClusterLabelName should be used instead where possible. - OldClusterLabelName = "postgresql" // Deprecated: use ClusterLabelName going forward - // JobRoleLabelName is the name of the label containing the purpose of the executed job JobRoleLabelName = "cnpg.io/jobRole"