Documentation ¶
Index ¶
- func Apply(ctx context.Context, rcg genericclioptions.RESTClientGetter, ...) (string, error)
- func CompatibleVersion(binary, target string) bool
- func ContainsEqualFoldItemString(s []string, e string) (string, bool)
- func ContainsItemString(s []string, e string) bool
- func ExecKubectlCommand(ctx context.Context, mode ExecMode, kubeConfigPath string, kubeContext string, ...) (string, error)
- func ExtractCRDs(inManifestPath, outManifestPath string) error
- func KubeClient(rcg genericclioptions.RESTClientGetter, opts *runclient.Options) (client.WithWatch, error)
- func KubeConfig(rcg genericclioptions.RESTClientGetter, opts *runclient.Options) (*rest.Config, error)
- func MakeDependsOn(deps []string) []meta.NamespacedObjectReference
- func NewScheme() *apiruntime.Scheme
- func ParseNamespacedName(input string) types.NamespacedName
- func ParseObjectKindName(input string) (kind, name string)
- func ParseObjectKindNameNamespace(input string) (kind, name, namespace string)
- func SplitKubeConfigPath(path string) []string
- func TruncateHex(str string) string
- func ValidateComponents(components []string) error
- type ExecMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(ctx context.Context, rcg genericclioptions.RESTClientGetter, opts *runclient.Options, root, manifestPath string) (string, error)
Apply is the equivalent of 'kubectl apply --server-side -f'. If the given manifest is a kustomization.yaml, then apply performs the equivalent of 'kubectl apply --server-side -k'.
func CompatibleVersion ¶
CompatibleVersion returns if the provided binary version is compatible with the given target version. At present, this is true if the target version is equal to the MINOR range of the binary, or if the binary version is a prerelease.
func ContainsItemString ¶
func ExecKubectlCommand ¶
func ExtractCRDs ¶
func KubeClient ¶
func KubeClient(rcg genericclioptions.RESTClientGetter, opts *runclient.Options) (client.WithWatch, error)
func KubeConfig ¶
func KubeConfig(rcg genericclioptions.RESTClientGetter, opts *runclient.Options) (*rest.Config, error)
func MakeDependsOn ¶
func MakeDependsOn(deps []string) []meta.NamespacedObjectReference
func NewScheme ¶
func NewScheme() *apiruntime.Scheme
Create the Scheme, methods for serializing and deserializing API objects which can be shared by tests.
func ParseNamespacedName ¶
func ParseNamespacedName(input string) types.NamespacedName
ParseNamespacedName extracts the NamespacedName of a resource based on the '<namespace>/<name>' format
func ParseObjectKindName ¶
ParseObjectKindName extracts the kind and name of a resource based on the '<kind>/<name>' format
func ParseObjectKindNameNamespace ¶
ParseObjectKindNameNamespace extracts the kind, name and namespace of a resource based on the '<kind>/<name>.<namespace>' format
func SplitKubeConfigPath ¶
SplitKubeConfigPath splits the given KUBECONFIG path based on the runtime OS target.
func TruncateHex ¶
TruncateHex will replace any hexadecimal notation between 40 and 128 characters (SHA-1 up to SHA-512) within the given string with a truncated version of 8 characters.