Documentation ¶
Index ¶
- func LoadAdditionalSpecFromURIs(ctx context.Context, kinds *loader.TroubleshootKinds)
- 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) (map[string]string, 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) (map[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 LoadAdditionalSpecFromURIs ¶ added in v0.96.0
func LoadAdditionalSpecFromURIs(ctx context.Context, kinds *loader.TroubleshootKinds)
LoadAdditionalSpecFromURIs loads additional specs from the URIs provided in the kinds. This function will modify kinds in place.
func LoadFromCLIArgs ¶
func LoadFromCLIArgs(ctx context.Context, client kubernetes.Interface, args []string, vp *viper.Viper) (*loader.TroubleshootKinds, error)
LoadFromCLIArgs loads troubleshoot specs from args passed to a CLI command. This loader function is meant for troubleshoot CLI commands only, hence not making it public. It will contain opinionated logic for CLI commands such as interpreting viper flags, supporting secret/ uri format, downloading from OCI registry and other URLs, etc.
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.