// Clones the given selector and returns a new selector with the given key and value added. // Returns the given selector, if labelKey is empty. func CloneSelectorAndAddLabel(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { … } // AddLabelToSelector returns a selector with the given key and value added to the given selector's MatchLabels. func AddLabelToSelector(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { … } // SelectorHasLabel checks if the given selector contains the given label key in its MatchLabels func SelectorHasLabel(selector *LabelSelector, labelKey string) bool { … }