Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigureKubeContextFlagCompletion(cmd *cobra.Command, kubeconfigPath string)
- func ConfigureNamespaceFlagCompletion(cmd *cobra.Command, flagNames []string, kubeconfigPath string, ...)
- func ConfigureOutputFlagCompletion(cmd *cobra.Command)
- func GetDefaultNamespace(kubeconfigPath, kubeContext string) string
- func GetLabelSelector(labelKey string, labelValues ...string) (string, error)
- func Prune(ctx context.Context, k8sAPI *k8s.KubernetesAPI, expectedManifests string, ...) error
- func RegistryOverride(image, newRegistry string) string
- func RenderYAMLAs(buf *bytes.Buffer, writer io.Writer, format string) error
- func Uninstall(ctx context.Context, k8sAPI *k8s.KubernetesAPI, selector string, format string) error
Constants ¶
const ( JsonOutput = "json" YamlOutput = "yaml" )
Variables ¶
var (
// DefaultDockerRegistry specifies the default location for Linkerd's images.
DefaultDockerRegistry = "cr.l5d.io/linkerd"
)
Functions ¶
func ConfigureKubeContextFlagCompletion ¶
ConfigureKubeContextFlagCompletion sets up resource-aware completion for command flags based off of a kubeconfig
func ConfigureNamespaceFlagCompletion ¶
func ConfigureNamespaceFlagCompletion( cmd *cobra.Command, flagNames []string, kubeconfigPath string, impersonate string, impersonateGroup []string, kubeContext string, )
ConfigureNamespaceFlagCompletion sets up resource-aware completion for command flags that accept a namespace name
func ConfigureOutputFlagCompletion ¶
ConfigureOutputFlagCompletion sets up resource-aware completion for command flags that accept an output name.
func GetDefaultNamespace ¶
GetDefaultNamespace fetches the default namespace used in the current KubeConfig context
func GetLabelSelector ¶
GetLabelSelector creates a label selector as a string based on a label key whose value may be in the set provided as an argument to the function. If the value set is empty then the selector will match resources where the label key exists regardless of value.
func Prune ¶
func Prune(ctx context.Context, k8sAPI *k8s.KubernetesAPI, expectedManifests string, selector string, format string) error
Prune takes an install manifest and prints all resources on the cluster which match the given label selector but are not in the given manifest. Users are expected to pipe these resources to `kubectl delete` to clean up resources left on the cluster which are no longer part of the install manifest.
func RegistryOverride ¶
RegistryOverride replaces the registry-portion of the provided image with the provided registry.
func RenderYAMLAs ¶
Given a buffer containing one or more YAML documents separated by `---`, render each document to the writer in the specified format: json or yaml. Json documents are separated by a newline character.
Types ¶
This section is empty.