Skip to content

Commit 1afab37

Browse files
author
Peng Zhou
committed
revert copilot changes
1 parent 29990a6 commit 1afab37

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

pkg/k8sutil/context.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,6 @@ func (cc *ClusterContext) SetClusterLabels(labels map[string]string) {
185185
}
186186

187187
func (cc *ClusterContext) SetClusterAnnotations(annotations map[string]string) {
188-
if annotations == nil {
189-
annotations = make(map[string]string)
190-
}
191188
delete(annotations, "kubectl.kubernetes.io/last-applied-configuration")
192189
cc.Annotations = annotations
193190
}
@@ -219,9 +216,6 @@ func (oc *OperatorContext) SetOperatorLabels(labels map[string]string) {
219216
}
220217

221218
func (oc *OperatorContext) SetOperatorAnnotations(annotations map[string]string) {
222-
if annotations == nil {
223-
annotations = make(map[string]string)
224-
}
225219
delete(annotations, "kubectl.kubernetes.io/last-applied-configuration")
226220
oc.Annotations = annotations
227221
}

pkg/k8sutil/service.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ func generateServiceDef(serviceMeta metav1.ObjectMeta, ownerRef metav1.OwnerRefe
9898
func (oc *OperatorContext) generateService(svcName string, cr *marklogicv1.MarklogicGroup) *corev1.Service {
9999
labels := oc.GetOperatorLabels(cr.Spec.Name)
100100
groupLabels := cr.Spec.Labels
101-
if groupLabels == nil {
102-
groupLabels = make(map[string]string)
103-
}
104101
for key, value := range groupLabels {
105102
labels[key] = value
106103
}

0 commit comments

Comments
 (0)