config

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: Apache-2.0 Imports: 13 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReadConfigFile             = readConfigFileCached
	GetConfigForCurrentKubectx = getConfigForCurrentKubectx
)

Functions

func GetDefaultRepo added in v0.36.0

func GetDefaultRepo(configFile, cliValue string) (string, error)

func GetInsecureRegistries added in v0.36.0

func GetInsecureRegistries(configFile string) ([]string, error)

func GetLocalCluster added in v0.36.0

func GetLocalCluster(configFile string) (bool, error)

func IsKindCluster added in v0.36.0

func IsKindCluster(kubeContext string) bool

func IsUpdateCheckEnabled added in v0.37.1

func IsUpdateCheckEnabled(configfile string) bool

func ResolveConfigFile added in v0.36.0

func ResolveConfigFile(configFile string) (string, error)

ResolveConfigFile determines the default config location, if the configFile argument is empty.

Types

type ContextConfig added in v0.36.0

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"`
	UpdateCheck        *bool    `yaml:"update-check,omitempty"`
}

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

type GlobalConfig added in v0.36.0

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

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

func ReadConfigFileNoCache added in v0.36.0

func ReadConfigFileNoCache(configFile string) (*GlobalConfig, error)

ReadConfigFileNoCache reads the given config yaml file and unmarshals the contents. Only visible for testing, use ReadConfigFile instead.

type PortForwardOptions added in v0.33.0

type PortForwardOptions struct {
	Enabled     bool
	ForwardPods bool
}

PortForwardOptions are options set by the command line for port forwarding with additional configuration information as well

type SkaffoldOptions

type SkaffoldOptions struct {
	ConfigurationFile  string
	GlobalConfig       string
	Cleanup            bool
	Notification       bool
	Tail               bool
	TailDev            bool
	SkipTests          bool
	CacheArtifacts     bool
	EnableRPC          bool
	Force              bool
	ForceDev           bool
	NoPrune            bool
	NoPruneChildren    bool
	StatusCheck        bool
	AutoBuild          bool
	AutoSync           bool
	AutoDeploy         bool
	PortForward        PortForwardOptions
	CustomTag          string
	Namespace          string
	CacheFile          string
	Trigger            string
	KubeContext        string
	WatchPollInterval  int
	DefaultRepo        string
	CustomLabels       []string
	TargetImages       []string
	Profiles           []string
	InsecureRegistries []string
	Command            string
	RPCPort            int
	RPCHTTPPort        int
}

SkaffoldOptions are options that are set by command line arguments not included in the config file itself

func (*SkaffoldOptions) ForceDeploy added in v0.28.0

func (opts *SkaffoldOptions) ForceDeploy() bool

func (*SkaffoldOptions) IsTargetImage added in v0.30.0

func (opts *SkaffoldOptions) IsTargetImage(artifact *latest.Artifact) bool

func (*SkaffoldOptions) Labels added in v0.8.0

func (opts *SkaffoldOptions) Labels() map[string]string

Labels returns a map of labels to be applied to all deployed k8s objects during the duration of the run

func (*SkaffoldOptions) Prune added in v0.27.0

func (opts *SkaffoldOptions) Prune() bool

Prune returns true iff the user did NOT specify the --no-prune flag, and the user did NOT specify the --cache-artifacts flag.

Jump to

Keyboard shortcuts

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