GetPolicyVersion returns the policy version from annotations.
(obj *unstructured.Unstructured)
| 58 | |
| 59 | // GetPolicyVersion returns the policy version from annotations. |
| 60 | func GetPolicyVersion(obj *unstructured.Unstructured) string { |
| 61 | annotations := obj.GetAnnotations() |
| 62 | if annotations == nil { |
| 63 | return "" |
| 64 | } |
| 65 | return annotations[AnnotationVersion] |
| 66 | } |
| 67 | |
| 68 | // GetBundle returns the bundle name from labels. |
| 69 | func GetBundle(obj *unstructured.Unstructured) string { |
no outgoing calls
searching dependent graphs…