konfig

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: Apache-2.0 Imports: 5 Imported by: 78

Documentation

Overview

Package konfig provides configuration methods and constants for the kustomize API.

Index

Constants

View Source
const (
	// 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"
)
View Source
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"
)
View Source
const NoPluginHomeSentinal = "/no/non-builtin/plugins!"

Use an obviously erroneous path, in case it's accidentally used.

Variables

This section is empty.

Functions

func CurrentWorkingDir

func CurrentWorkingDir() string

func DefaultAbsPluginHome

func DefaultAbsPluginHome(fSys filesys.FileSystem) (string, error)

func DefaultKustomizationFileName

func DefaultKustomizationFileName() string

func DisabledPluginConfig

func DisabledPluginConfig() *types.PluginConfig

func EnabledPluginConfig

func EnabledPluginConfig() (*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 HomeDir

func HomeDir() string

func MakePluginConfig

func MakePluginConfig(
	pr types.PluginRestrictions, 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

type NotedFunc

type NotedFunc struct {
	Note string
	F    func() string
}

Directories

Path Synopsis
Package builtinpluginconsts provides builtin plugin configuration data.
Package builtinpluginconsts provides builtin plugin configuration data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳