Documentation ¶
Index ¶
- Variables
- func GetDebugHelpersRegistry(configFile string) (string, error)
- func GetDefaultRepo(configFile string, cliValue *string) (string, error)
- func GetInsecureRegistries(configFile string) ([]string, error)
- func GetMultiLevelRepo(configFile string) (*bool, error)
- func IsK3dCluster(kubeContext string) bool
- func IsKindCluster(kubeContext string) bool
- func IsUpdateCheckEnabled(configfile string) bool
- func IsUpdateCheckEnabledForContext(cfg *ContextConfig) bool
- func K3dClusterName(clusterName string) string
- func KindClusterName(clusterName string) string
- func ResolveConfigFile(configFile string) (string, error)
- func ShouldDisplayUpdateMsg(configfile string) bool
- func UpdateGlobalCollectMetrics(configFile string, collectMetrics bool) error
- func UpdateGlobalSurveyPrompted(configFile string) error
- func UpdateHaTSSurveyTaken(configFile string) error
- func UpdateMsgDisplayed(configFile string) error
- func UpdateUserSurveyTaken(configFile string, id string) error
- func WriteFullConfig(configFile string, cfg *GlobalConfig) error
- type BoolOrUndefined
- type Cluster
- type ContextConfig
- type GetClusterOpts
- type GlobalConfig
- type IntOrUndefined
- type Muted
- type PortForwardOptions
- func (p *PortForwardOptions) Append(o string) error
- func (p PortForwardOptions) Enabled() bool
- func (p PortForwardOptions) Equal(o PortForwardOptions) bool
- func (p PortForwardOptions) ForwardDebug(runMode RunMode) bool
- func (p PortForwardOptions) ForwardPods(runMode RunMode) bool
- func (p PortForwardOptions) ForwardServices(runMode RunMode) bool
- func (p PortForwardOptions) ForwardUser(runMode RunMode) bool
- func (p *PortForwardOptions) GetSlice() []string
- func (p *PortForwardOptions) Replace(options []string) error
- func (p *PortForwardOptions) Set(csv string) error
- func (p *PortForwardOptions) String() string
- func (p *PortForwardOptions) Type() string
- type RunMode
- type SkaffoldOptions
- type StringOrUndefined
- type SurveyConfig
- type SyncRemoteCacheOption
- func (s *SyncRemoteCacheOption) CloneDisabled() bool
- func (s *SyncRemoteCacheOption) FetchDisabled() bool
- func (s *SyncRemoteCacheOption) Set(v string) error
- func (s *SyncRemoteCacheOption) SetNil() error
- func (s *SyncRemoteCacheOption) String() string
- func (s *SyncRemoteCacheOption) Type() string
- func (s *SyncRemoteCacheOption) Value() string
- type UpdateConfig
- type UserSurvey
- type WaitForDeletions
Constants ¶
This section is empty.
Variables ¶
var ( ReadConfigFile = readConfigFileCached GetConfigForCurrentKubectx = getConfigForCurrentKubectx DiscoverLocalRegistry = discoverLocalRegistry )
Functions ¶
func GetDebugHelpersRegistry ¶ added in v1.7.1
func GetDefaultRepo ¶ added in v0.36.0
func GetInsecureRegistries ¶ added in v0.36.0
func GetMultiLevelRepo ¶ added in v1.36.0
func IsK3dCluster ¶ added in v1.7.1
IsK3dCluster checks that the given `kubeContext` is talking to `k3d`.
func IsKindCluster ¶ added in v0.36.0
IsKindCluster checks that the given `kubeContext` is talking to `kind`.
func IsUpdateCheckEnabled ¶ added in v0.37.1
func IsUpdateCheckEnabledForContext ¶ added in v1.36.0
func IsUpdateCheckEnabledForContext(cfg *ContextConfig) bool
func K3dClusterName ¶ added in v1.7.1
K3dClusterName returns the internal name of a k3d cluster.
func KindClusterName ¶ added in v1.7.1
KindClusterName returns the internal kind name of a kubernetes cluster.
func ResolveConfigFile ¶ added in v0.36.0
ResolveConfigFile determines the default config location, if the configFile argument is empty.
func ShouldDisplayUpdateMsg ¶ added in v1.24.0
func UpdateGlobalCollectMetrics ¶ added in v1.19.0
func UpdateGlobalSurveyPrompted ¶ added in v1.7.1
func UpdateHaTSSurveyTaken ¶ added in v1.28.0
func UpdateMsgDisplayed ¶ added in v1.24.0
UpdateMsgDisplayed updates the `last-prompted` config for `update-config` in the skaffold config
func UpdateUserSurveyTaken ¶ added in v1.28.0
func WriteFullConfig ¶ added in v1.7.1
func WriteFullConfig(configFile string, cfg *GlobalConfig) error
Types ¶
type BoolOrUndefined ¶ added in v1.23.0
type BoolOrUndefined struct {
// contains filtered or unexported fields
}
BoolOrUndefined holds the value of a flag of type `bool`, that's by default `undefined`. We use this instead of just `bool` to differentiate `undefined` and `false` values.
func NewBoolOrUndefined ¶ added in v1.23.0
func NewBoolOrUndefined(v *bool) BoolOrUndefined
func (*BoolOrUndefined) Set ¶ added in v1.23.0
func (s *BoolOrUndefined) Set(v string) error
func (*BoolOrUndefined) SetNil ¶ added in v1.23.0
func (s *BoolOrUndefined) SetNil() error
func (*BoolOrUndefined) String ¶ added in v1.23.0
func (s *BoolOrUndefined) String() string
func (*BoolOrUndefined) Type ¶ added in v1.23.0
func (s *BoolOrUndefined) Type() string
func (*BoolOrUndefined) Value ¶ added in v1.23.0
func (s *BoolOrUndefined) Value() *bool
type Cluster ¶ added in v1.7.1
type Cluster struct { Local bool PushImages bool LoadImages bool DefaultRepo StringOrUndefined }
func GetCluster ¶ added in v1.7.1
func GetCluster(ctx context.Context, opts GetClusterOpts) (Cluster, error)
type ContextConfig ¶ added in v0.36.0
type ContextConfig struct { Kubecontext string `yaml:"kube-context,omitempty"` DefaultRepo string `yaml:"default-repo,omitempty"` MultiLevelRepo *bool `yaml:"multi-level-repo,omitempty"` LocalCluster *bool `yaml:"local-cluster,omitempty"` InsecureRegistries []string `yaml:"insecure-registries,omitempty"` // DebugHelpersRegistry is the registry from which the debug helper images are used. DebugHelpersRegistry string `yaml:"debug-helpers-registry,omitempty"` UpdateCheck *bool `yaml:"update-check,omitempty"` Survey *SurveyConfig `yaml:"survey,omitempty"` KindDisableLoad *bool `yaml:"kind-disable-load,omitempty"` K3dDisableLoad *bool `yaml:"k3d-disable-load,omitempty"` CollectMetrics *bool `yaml:"collect-metrics,omitempty"` UpdateCheckConfig *UpdateConfig `yaml:"update,omitempty"` }
ContextConfig is the context-specific config information provided in the global Skaffold config.
type GetClusterOpts ¶ added in v1.36.0
type GetClusterOpts struct { ConfigFile string DefaultRepo StringOrUndefined MinikubeProfile string DetectMinikube bool }
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 IntOrUndefined ¶ added in v1.32.0
type IntOrUndefined struct {
// contains filtered or unexported fields
}
IntOrUndefined holds the value of a flag of type `int`, that's by default `undefined`. We use this instead of just `int` to differentiate `undefined` and `zero` values.
func NewIntOrUndefined ¶ added in v1.32.0
func NewIntOrUndefined(v *int) IntOrUndefined
func (*IntOrUndefined) Set ¶ added in v1.32.0
func (s *IntOrUndefined) Set(v string) error
func (*IntOrUndefined) SetNil ¶ added in v1.32.0
func (s *IntOrUndefined) SetNil() error
func (*IntOrUndefined) String ¶ added in v1.32.0
func (s *IntOrUndefined) String() string
func (*IntOrUndefined) Type ¶ added in v1.32.0
func (s *IntOrUndefined) Type() string
func (*IntOrUndefined) Value ¶ added in v1.32.0
func (s *IntOrUndefined) Value() *int
type Muted ¶ added in v1.7.1
type Muted struct {
Phases []string
}
Muted lists phases for which logs are muted.
func (Muted) MuteDeploy ¶ added in v1.7.1
func (Muted) MuteStatusCheck ¶ added in v1.7.1
type PortForwardOptions ¶ added in v0.33.0
type PortForwardOptions struct {
// contains filtered or unexported fields
}
PortForwardOptions are options set by the command line for port forwarding. `off` is intended to be a single standalone option.
func (*PortForwardOptions) Append ¶ added in v1.22.0
func (p *PortForwardOptions) Append(o string) error
func (PortForwardOptions) Enabled ¶ added in v0.33.0
func (p PortForwardOptions) Enabled() bool
Enabled checks if the port-forwarding options indicates that forwarding should be enabled.
func (PortForwardOptions) Equal ¶ added in v1.22.0
func (p PortForwardOptions) Equal(o PortForwardOptions) bool
Equal checks that two options are the same; this method exists primarily for tests.
func (PortForwardOptions) ForwardDebug ¶ added in v1.22.0
func (p PortForwardOptions) ForwardDebug(runMode RunMode) bool
func (PortForwardOptions) ForwardPods ¶ added in v0.33.0
func (p PortForwardOptions) ForwardPods(runMode RunMode) bool
func (PortForwardOptions) ForwardServices ¶ added in v1.22.0
func (p PortForwardOptions) ForwardServices(runMode RunMode) bool
func (PortForwardOptions) ForwardUser ¶ added in v1.22.0
func (p PortForwardOptions) ForwardUser(runMode RunMode) bool
func (*PortForwardOptions) GetSlice ¶ added in v1.22.0
func (p *PortForwardOptions) GetSlice() []string
func (*PortForwardOptions) Replace ¶ added in v1.22.0
func (p *PortForwardOptions) Replace(options []string) error
func (*PortForwardOptions) Set ¶ added in v1.22.0
func (p *PortForwardOptions) Set(csv string) error
func (*PortForwardOptions) String ¶ added in v1.22.0
func (p *PortForwardOptions) String() string
func (*PortForwardOptions) Type ¶ added in v1.22.0
func (p *PortForwardOptions) Type() string
type SkaffoldOptions ¶
type SkaffoldOptions struct { CacheFile string ConfigurationFile string Command string CustomTag string DigestSource string EventLogFile string GlobalConfig string KubeConfig string KubeContext string LastLogFile string // TODO(https://github.com/GoogleContainerTools/skaffold/issues/3668): // remove minikubeProfile from here and instead detect it by matching the // kubecontext API Server to minikube profiles MinikubeProfile string Namespace string RenderOutput string RepoCacheDir string Trigger string User string TransformRulesFile string ConfigurationFilter []string CustomLabels []string HydratedManifests []string InsecureRegistries []string Profiles []string TargetImages []string Apply bool AutoBuild bool AutoCreateConfig bool AutoDeploy bool AutoSync bool AssumeYes bool CacheArtifacts bool ContainerDebugging bool Cleanup bool DetectMinikube bool DryRun bool EnableRPC bool Force bool ForceLoadImages bool IterativeStatusCheck bool Notification bool NoPrune bool NoPruneChildren bool ProfileAutoActivation bool PropagateProfiles bool RenderOnly bool SkipTests bool SkipRender bool SkipConfigDefaults bool Tail bool WaitForConnection bool // Add Skaffold-specific labels including runID, deployer labels, etc. // `CustomLabels` are still applied if this is false. Must only be used in // commands which don't deploy (e.g. `skaffold render`) since the runID // label isn't available. AddSkaffoldLabels bool MakePathsAbsolute *bool StatusCheck BoolOrUndefined PortForward PortForwardOptions DefaultRepo StringOrUndefined PushImages BoolOrUndefined Platforms []string Muted Muted BuildConcurrency int WatchPollInterval int RPCPort IntOrUndefined RPCHTTPPort IntOrUndefined MultiLevelRepo *bool SyncRemoteCache SyncRemoteCacheOption WaitForDeletions WaitForDeletions }
SkaffoldOptions are options that are set by command line arguments not included in the config file itself
func (*SkaffoldOptions) IsTargetImage ¶ added in v0.30.0
func (opts *SkaffoldOptions) IsTargetImage(artifact *latest.Artifact) bool
func (*SkaffoldOptions) Mode ¶ added in v1.7.1
func (opts *SkaffoldOptions) Mode() RunMode
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.
type StringOrUndefined ¶ added in v1.7.1
type StringOrUndefined struct {
// contains filtered or unexported fields
}
StringOrUndefined holds the value of a flag of type `string`, that's by default `undefined`. We use this instead of just `string` to differentiate `undefined` and `empty string` values.
func NewStringOrUndefined ¶ added in v1.36.0
func NewStringOrUndefined(v *string) StringOrUndefined
func (StringOrUndefined) Equal ¶ added in v1.36.0
func (s StringOrUndefined) Equal(o StringOrUndefined) bool
func (*StringOrUndefined) Set ¶ added in v1.7.1
func (s *StringOrUndefined) Set(v string) error
func (*StringOrUndefined) SetNil ¶ added in v1.22.0
func (s *StringOrUndefined) SetNil() error
func (*StringOrUndefined) String ¶ added in v1.7.1
func (s *StringOrUndefined) String() string
func (*StringOrUndefined) Type ¶ added in v1.7.1
func (s *StringOrUndefined) Type() string
func (*StringOrUndefined) Value ¶ added in v1.7.1
func (s *StringOrUndefined) Value() *string
type SurveyConfig ¶ added in v1.3.1
type SurveyConfig struct { DisablePrompt *bool `yaml:"disable-prompt,omitempty"` LastTaken string `yaml:"last-taken,omitempty"` LastPrompted string `yaml:"last-prompted,omitempty"` UserSurveys []*UserSurvey `yaml:"user-surveys,omitempty"` }
SurveyConfig is the survey config information
type SyncRemoteCacheOption ¶ added in v1.30.0
type SyncRemoteCacheOption struct {
// contains filtered or unexported fields
}
SyncRemoteCacheOption holds the value of flag `--sync-remote-cache` Valid flag values are `always`(default), `missing`, or `never`.
func (*SyncRemoteCacheOption) CloneDisabled ¶ added in v1.30.0
func (s *SyncRemoteCacheOption) CloneDisabled() bool
CloneDisabled specifies it cloning remote git repositories is disabled by flag value
func (*SyncRemoteCacheOption) FetchDisabled ¶ added in v1.30.0
func (s *SyncRemoteCacheOption) FetchDisabled() bool
FetchDisabled specifies it fetching remote git repositories is disabled by flag value
func (*SyncRemoteCacheOption) Set ¶ added in v1.30.0
func (s *SyncRemoteCacheOption) Set(v string) error
func (*SyncRemoteCacheOption) SetNil ¶ added in v1.30.0
func (s *SyncRemoteCacheOption) SetNil() error
func (*SyncRemoteCacheOption) String ¶ added in v1.30.0
func (s *SyncRemoteCacheOption) String() string
func (*SyncRemoteCacheOption) Type ¶ added in v1.30.0
func (s *SyncRemoteCacheOption) Type() string
func (*SyncRemoteCacheOption) Value ¶ added in v1.30.0
func (s *SyncRemoteCacheOption) Value() string
type UpdateConfig ¶ added in v1.24.0
type UpdateConfig struct { // TODO (tejaldesai) Move ContextConfig.UpdateCheck config within this struct LastPrompted string `yaml:"last-prompted,omitempty"` }
UpdateConfig is the update config information