config

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommonFlags added in v0.31.0

func AddCommonFlags(f *pflag.FlagSet)

func AddListFlags

func AddListFlags(f *pflag.FlagSet)

func AddSetUnsetFlags added in v0.31.0

func AddSetUnsetFlags(f *pflag.FlagSet)

func GetDefaultRepo added in v0.17.0

func GetDefaultRepo(cliValue string) (string, error)

func GetInsecureRegistries added in v0.27.0

func GetInsecureRegistries() ([]string, error)

func GetLocalCluster added in v0.22.0

func GetLocalCluster() (bool, error)

func IsKindCluster added in v0.32.0

func IsKindCluster(kubeContext string) bool

func List added in v0.31.0

func List(out io.Writer) error

func Set added in v0.31.0

func Set(out io.Writer, args []string) error

func Unset added in v0.31.0

func Unset(out io.Writer, args []string) error

Types

type Config

type Config struct {
	Global         *ContextConfig   `yaml:"global,omitempty"`
	ContextConfigs []*ContextConfig `yaml:"kubeContexts"`
}

Config is the top level struct for the global Skaffold config It is unrelated to the SkaffoldConfig object (parsed from the skaffold.yaml)

func ReadConfigForFile

func ReadConfigForFile(filename string) (*Config, error)

ReadConfigForFile reads the specified file and returns the contents parsed into a Config struct.

type ContextConfig

type ContextConfig struct {
	Kubecontext        string   `yaml:"kube-context,omitempty"`
	DefaultRepo        string   `yaml:"default-repo,omitempty"`
	LocalCluster       *bool    `yaml:"local-cluster,omitempty"`
	InsecureRegistries []string `yaml:"insecure-registries,omitempty"`
}

ContextConfig is the context-specific config information provided in the global Skaffold config.

func GetConfigForKubectx added in v0.17.0

func GetConfigForKubectx() (*ContextConfig, error)

GetConfigForKubectx returns the specific config to be modified based on the provided kube context. Either returns the config corresponding to the provided or current context, or the global config if that is specified (or if no current context is set).

func GetGlobalConfig added in v0.17.0

func GetGlobalConfig() (*ContextConfig, error)

GetGlobalConfig returns the global config values

Jump to

Keyboard shortcuts

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