Skip to content

Commit d9637ed

Browse files
committed
fixes pointers
1 parent e50c1ad commit d9637ed

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

internal/controllers/storage/controller_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ var _ = Describe("Storage controller medium tests", func() {
126126
foundConfigurationChecksumAnnotation = true
127127
}
128128
Expect(foundConfigurationChecksumAnnotation).To(BeTrue())
129+
130+
_, exist := podAnnotations[annotations.LastApplied]
131+
Expect(exist).To(BeFalse())
129132
})
130133

131134
By("Check that args with --label propagated to pods...", func() {

internal/resources/storage_statefulset.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (b *StorageStatefulSetBuilder) Build(obj client.Object) error {
6969
sts.Spec = appsv1.StatefulSetSpec{
7070
Replicas: replicas,
7171
Selector: &metav1.LabelSelector{
72-
MatchLabels: b.Labels,
72+
MatchLabels: CopyDict(b.Labels),
7373
},
7474
PodManagementPolicy: appsv1.ParallelPodManagement,
7575
RevisionHistoryLimit: ptr.Int32(10),
@@ -107,8 +107,8 @@ func (b *StorageStatefulSetBuilder) buildPodTemplateSpec() corev1.PodTemplateSpe
107107

108108
podTemplate := corev1.PodTemplateSpec{
109109
ObjectMeta: metav1.ObjectMeta{
110-
Labels: b.Labels,
111-
Annotations: b.Annotations,
110+
Labels: CopyDict(b.Labels),
111+
Annotations: CopyDict(b.Annotations),
112112
},
113113
Spec: corev1.PodSpec{
114114
Containers: []corev1.Container{b.buildContainer()},

0 commit comments

Comments
 (0)