mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
* chore: make specs an internal package * Some minor improvements * Use LoadClusterSpecs in support bundle implementation * Remove change accidentally committed * Use LoadFromCLIArgs in preflight CLI implementation * Update comment * Fix edge case where the label selector is an empty string * Fix failing test
18 lines
748 B
Go
18 lines
748 B
Go
package specs
|
|
|
|
import (
|
|
"context"
|
|
|
|
specs "github.com/replicatedhq/troubleshoot/internal/specs"
|
|
"k8s.io/apimachinery/pkg/labels"
|
|
"k8s.io/client-go/kubernetes"
|
|
)
|
|
|
|
// SplitTroubleshootSecretLabelSelector splits a label selector into two selectors, if applicable:
|
|
// 1. troubleshoot.io/kind=support-bundle and non-troubleshoot (if contains) labels selector.
|
|
// 2. troubleshoot.sh/kind=support-bundle and non-troubleshoot (if contains) labels selector.
|
|
// Deprecated: Remove in a future version (v1.0). Future loader functions will be created
|
|
func SplitTroubleshootSecretLabelSelector(client kubernetes.Interface, labelSelector labels.Selector) ([]string, error) {
|
|
return specs.SplitTroubleshootSecretLabelSelector(context.TODO(), labelSelector)
|
|
}
|