// GetDeploymentsBySelector returns a deployment by a selector
GetDeploymentsBySelector returns a deployment by a selector
// GetDeploymentsBySelector returns a deployment by a selector
func (a *API) GetDeploymentsBySelector(selector meta_v1.LabelSelector) ([]appsv1.Deployment, error) {
	s := labels.SelectorFromSet(selector.MatchLabels)
	dep, err := a.kubeClient.AppsV1().Deployments(meta_v1.NamespaceAll).List(meta_v1.ListOptions{
		LabelSelector: s.String(),
	})
	if err != nil {
		return nil, err
	}
	return dep.Items, nil
}
func ( a * API ) GetDeploymentsBySelector ( selector meta_v1 . LabelSelector ) ( [ ] appsv1 . Deployment , error ) { s := labels . SelectorFromSet ( selector . MatchLabels ) dep , err := a . kubeClient . AppsV1 ( ) . Deployments ( meta_v1 . NamespaceAll ) . List ( meta_v1 . ListOptions { LabelSelector : s . String ( ) , } ) if err != nil { return nil , err } return dep . Items , nil }
GetDeploymentsBySelector returns a deployment by a selector
GetDeploymentsBySelector returns a deployment by a selector