HasAnnotations verifies that the annotations of a cluster contain a specified annotations map
( cluster *apiv1.Cluster, annotations map[string]string, )
| 109 | // HasAnnotations verifies that the annotations of a cluster contain a specified |
| 110 | // annotations map |
| 111 | func HasAnnotations( |
| 112 | cluster *apiv1.Cluster, |
| 113 | annotations map[string]string, |
| 114 | ) bool { |
| 115 | clusterAnnotations := cluster.Annotations |
| 116 | for k, v := range annotations { |
| 117 | val, ok := clusterAnnotations[k] |
| 118 | if !ok || (v != val) { |
| 119 | return false |
| 120 | } |
| 121 | } |
| 122 | return true |
| 123 | } |
| 124 | |
| 125 | // Get gets a cluster given name and namespace |
| 126 | func Get( |
no outgoing calls
no test coverage detected