Documentation ¶
Overview ¶
Package konfig provides configuration methods and constants for the kustomize API.
Index ¶
- Constants
- func CurrentWorkingDir() string
- func DefaultAbsPluginHome(fSys filesys.FileSystem) (string, error)
- func DefaultKustomizationFileName() string
- func DisabledPluginConfig() *types.PluginConfig
- func EnabledPluginConfig(b types.BuiltinPluginLoadingOptions) (*types.PluginConfig, error)
- func FirstDirThatExistsElseError(what string, fSys filesys.FileSystem, pathFuncs []NotedFunc) (string, error)
- func HomeDir() string
- func IfApiMachineryElseKyaml(s1, s2 string) string
- func MakePluginConfig(pr types.PluginRestrictions, b types.BuiltinPluginLoadingOptions, home string) *types.PluginConfig
- func RecognizedKustomizationFileNames() []string
- type NotedFunc
Constants ¶
const ( // FlagEnableKyamlDefaultValue is the default value for the --enable_kyaml // flag. This value is also used in unit tests. See provider.DepProvider. // // TODO(#3588): Delete this constant. // // All tests should pass for either true or false values // of this constant, without having to check its value. // In the cases where there's a different outcome, either decide // that the difference is acceptable, or make the difference go away. // // Historically, tests passed for enable_kyaml == false, i.e. using // apimachinery libs. This doesn't mean the code was better, it just // means regression tests preserved those outcomes. FlagEnableKyamlDefaultValue = true // An environment variable to consult for kustomization // configuration data. See: // https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html XdgConfigHomeEnv = "XDG_CONFIG_HOME" // Use this when XdgConfigHomeEnv not defined. XdgConfigHomeEnvDefault = ".config" // A program name, for use in help, finding the XDG_CONFIG_DIR, etc. ProgramName = "kustomize" // ConfigAnnoDomain is configuration-related annotation namespace. ConfigAnnoDomain = "config.kubernetes.io" // If a resource has this annotation, kustomize will drop it. IgnoredByKustomizeAnnotation = ConfigAnnoDomain + "/local-config" // Label key that indicates the resources are built from Kustomize ManagedbyLabelKey = "app.kubernetes.io/managed-by" // An environment variable to turn on/off adding the ManagedByLabelKey EnableManagedbyLabelEnv = "KUSTOMIZE_ENABLE_MANAGEDBY_LABEL" // Label key that indicates the resources are validated by a validator ValidatedByLabelKey = "validated-by" )
const ( // Symbol that must be used inside Go plugins. PluginSymbol = "KustomizePlugin" // Name of environment variable used to set AbsPluginHome. // See that variable for an explanation. KustomizePluginHomeEnv = "KUSTOMIZE_PLUGIN_HOME" // Relative path below XDG_CONFIG_HOME/kustomize to find plugins. // e.g. AbsPluginHome = XDG_CONFIG_HOME/kustomize/plugin RelPluginHome = "plugin" // Location of builtin plugins below AbsPluginHome. BuiltinPluginPackage = "builtin" // The value of kubernetes ApiVersion to use in configuration // files for builtin plugins. // The value for non-builtins can be anything. BuiltinPluginApiVersion = BuiltinPluginPackage // Domain from which kustomize code is imported, for locating // plugin source code under $GOPATH when GOPATH is defined. DomainName = "sigs.k8s.io" // Injected into plugin paths when plugins are disabled. // Provides a clue in flows that shouldn't happen. NoPluginHomeSentinal = "/No/non-builtin/plugins!" )
Variables ¶
This section is empty.
Functions ¶
func CurrentWorkingDir ¶
func CurrentWorkingDir() string
func DefaultAbsPluginHome ¶
func DefaultAbsPluginHome(fSys filesys.FileSystem) (string, error)
DefaultAbsPluginHome returns the absolute path in the given file system to first directory that looks like a good candidate for the home of kustomize plugins.
func DefaultKustomizationFileName ¶
func DefaultKustomizationFileName() string
func DisabledPluginConfig ¶
func DisabledPluginConfig() *types.PluginConfig
func EnabledPluginConfig ¶
func EnabledPluginConfig(b types.BuiltinPluginLoadingOptions) (*types.PluginConfig, error)
func FirstDirThatExistsElseError ¶
func FirstDirThatExistsElseError( what string, fSys filesys.FileSystem, pathFuncs []NotedFunc) (string, error)
FirstDirThatExistsElseError tests different path functions for existence, returning the first that works, else error if all fail.
func IfApiMachineryElseKyaml ¶
IfApiMachineryElseKyaml returns true if executing the apimachinery code path, else we're executing the kyaml code paths.
func MakePluginConfig ¶
func MakePluginConfig( pr types.PluginRestrictions, b types.BuiltinPluginLoadingOptions, home string) *types.PluginConfig
func RecognizedKustomizationFileNames ¶
func RecognizedKustomizationFileNames() []string
RecognizedKustomizationFileNames is a list of file names that kustomize recognizes. To avoid ambiguity, a kustomization directory may not contain more than one match to this list.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package builtinpluginconsts provides builtin plugin configuration data.
|
Package builtinpluginconsts provides builtin plugin configuration data. |