Skip to content

Commit 4343f76

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

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
@@ -185,6 +185,9 @@ 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+
}
188191
delete(annotations, "kubectl.kubernetes.io/last-applied-configuration")
189192
cc.Annotations = annotations
190193
}

0 commit comments

Comments
 (0)