cmdutil

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KustomizationFile = "kustomization.yaml"
)

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(dir, fname string, data []byte) error

func ExecKustomize

func ExecKustomize(ctx context.Context, dir string, kust *types.Kustomization) ([]byte, error)

func GetDefaultNamespace

func GetDefaultNamespace(cfg *api.Config, kubecontext string) string

func GetKubeConfig

func GetKubeConfig(path string) (*api.Config, error)

func KustomizeBuildCmd

func KustomizeBuildCmd() ([]string, error)

func PrintfColorErr

func PrintfColorErr(out io.Writer, msg string, a ...interface{})

func PrintfColorInfo

func PrintfColorInfo(out io.Writer, msg string, a ...interface{})

func RemoveFile

func RemoveFile(dir, fname string) error

Types

type CliOptions

type CliOptions struct {
	KubeConfigPath string
	KubeContext    string
	LogLevel       int
	Out            io.Writer
	ErrOut         io.Writer

	Logr   *clog.Logger
	Client *kosmo.Client
	Scheme *runtime.Scheme
}

func NewCliOptions

func NewCliOptions() *CliOptions

func (*CliOptions) Complete

func (o *CliOptions) Complete(cmd *cobra.Command, args []string) error

func (*CliOptions) Validate

func (o *CliOptions) Validate(cmd *cobra.Command, args []string) error

type NamespacedCliOptions

type NamespacedCliOptions struct {
	*CliOptions
	Namespace    string
	AllNamespace bool
}

func NewNamespacedCliOptions

func NewNamespacedCliOptions(o *CliOptions) *NamespacedCliOptions

func (*NamespacedCliOptions) Complete

func (o *NamespacedCliOptions) Complete(cmd *cobra.Command, args []string) error

func (*NamespacedCliOptions) Validate

func (o *NamespacedCliOptions) Validate(cmd *cobra.Command, args []string) error

type UserNamespacedCliOptions

type UserNamespacedCliOptions struct {
	*NamespacedCliOptions
	User string
}

func NewUserNamespacedCliOptions

func NewUserNamespacedCliOptions(o *CliOptions) *UserNamespacedCliOptions

func (*UserNamespacedCliOptions) Complete

func (o *UserNamespacedCliOptions) Complete(cmd *cobra.Command, args []string) error

func (*UserNamespacedCliOptions) Validate

func (o *UserNamespacedCliOptions) Validate(cmd *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL