Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/utils/kube/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ func GetAppInstanceLabel(un *unstructured.Unstructured, key string) string {
return ""
}

// GetAppInstanceAnnotation returns the application instance name from annotations
func GetAppInstanceAnnotation(un *unstructured.Unstructured, key string) string {
if annotations := un.GetAnnotations(); annotations != nil {
return annotations[key]
}
return ""
}

// UnsetLabel removes our app labels from an unstructured object
func UnsetLabel(target *unstructured.Unstructured, key string) {
if labels := target.GetLabels(); labels != nil {
Expand Down