config

package
v0.24.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConfigFlags

func AddConfigFlags(cmd *cobra.Command)

func AddListFlags

func AddListFlags(cmd *cobra.Command)

func AddSetFlags

func AddSetFlags(cmd *cobra.Command)

func GetDefaultRepo added in v0.17.0

func GetDefaultRepo(cliValue string) (string, error)

func GetLocalCluster added in v0.22.0

func GetLocalCluster() (bool, error)

func NewCmdList

func NewCmdList(out io.Writer) *cobra.Command

func NewCmdSet

func NewCmdSet(out io.Writer) *cobra.Command

func NewCmdUnset added in v0.16.0

func NewCmdUnset(out io.Writer) *cobra.Command

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"`
}

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