SetInstanceRole sets both ClusterRoleLabelName and ClusterInstanceRoleLabelName on the given ObjectMeta
(meta *metav1.ObjectMeta, role string)
| 570 | |
| 571 | // SetInstanceRole sets both ClusterRoleLabelName and ClusterInstanceRoleLabelName on the given ObjectMeta |
| 572 | func SetInstanceRole(meta *metav1.ObjectMeta, role string) { |
| 573 | if meta.Labels == nil { |
| 574 | meta.Labels = map[string]string{} |
| 575 | } |
| 576 | meta.Labels[ClusterRoleLabelName] = role |
| 577 | meta.Labels[ClusterInstanceRoleLabelName] = role |
| 578 | } |
| 579 | |
| 580 | // MergeObjectsMetadata is capable of merging the labels and annotations of two objects metadata |
| 581 | func MergeObjectsMetadata(receiver client.Object, giver client.Object) { |
no outgoing calls
no test coverage detected