Documentation
¶
Index ¶
- func LoadFromCLIArgs(ctx context.Context, client kubernetes.Interface, args []string, ...) (*loader.TroubleshootKinds, error)
- func LoadFromCluster(ctx context.Context, client kubernetes.Interface, selectors []string, ...) (*loader.TroubleshootKinds, error)
- func LoadFromConfigMap(ctx context.Context, client kubernetes.Interface, ns string, name string, ...) ([]byte, error)
- func LoadFromConfigMapMatchingLabel(ctx context.Context, client kubernetes.Interface, label string, ns string, ...) ([]string, error)
- func LoadFromSecret(ctx context.Context, client kubernetes.Interface, ns string, name string, ...) ([]byte, error)
- func LoadFromSecretMatchingLabel(ctx context.Context, client kubernetes.Interface, label string, ns string, ...) ([]string, error)
- func SplitTroubleshootSecretLabelSelector(ctx context.Context, labelSelector labels.Selector) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadFromCLIArgs ¶
func LoadFromCLIArgs(ctx context.Context, client kubernetes.Interface, args []string, vp *viper.Viper) (*loader.TroubleshootKinds, error)
func LoadFromCluster ¶
func LoadFromCluster(ctx context.Context, client kubernetes.Interface, selectors []string, ns string) (*loader.TroubleshootKinds, error)
LoadFromCluster loads troubleshoot specs from the cluster based on the provided labels. By default this will be troubleshoot.io/kind=support-bundle and troubleshoot.sh/kind=support-bundle labels. We search for secrets and configmaps with the label selector and extract the raw data. We then load the specs from the raw data. If the user does not have sufficient permissions to list & read secrets and configmaps from all namespaces, we will fallback to trying each namespace individually, and eventually default to the configured kubeconfig namespace.
func LoadFromConfigMap ¶
func LoadFromSecret ¶
func SplitTroubleshootSecretLabelSelector ¶
func SplitTroubleshootSecretLabelSelector(ctx context.Context, labelSelector labels.Selector) ([]string, error)
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.
Types ¶
This section is empty.