Skip to content

Commit 29990a6

Browse files
pengzhoumlCopilot
andauthored
Update pkg/k8sutil/context.go
Co-authored-by: Copilot <[email protected]>
1 parent 4343f76 commit 29990a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/k8sutil/context.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ func (oc *OperatorContext) SetOperatorLabels(labels map[string]string) {
219219
}
220220

221221
func (oc *OperatorContext) SetOperatorAnnotations(annotations map[string]string) {
222+
if annotations == nil {
223+
annotations = make(map[string]string)
224+
}
222225
delete(annotations, "kubectl.kubernetes.io/last-applied-configuration")
223226
oc.Annotations = annotations
224227
}

0 commit comments

Comments
 (0)