env

package
v1.8.16-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Env

func Env(key string, defaultValue string) string

Env returns an environment variable or a default value if not specified.

func GetEnv

func GetEnv(key string) (string, bool)

GetEnv returns an environment value if specified

func GetEnvVarRefString

func GetEnvVarRefString(from *api.EnvVarSource) string

GetEnvVarRefString returns a text description of the supplied envvarsource

func GetEnvVarRefValue

func GetEnvVarRefValue(kc clientset.Interface, ns string, store *ResourceStore, from *api.EnvVarSource, obj runtime.Object, c *api.Container) (string, error)

GetEnvVarRefValue returns the value referenced by the supplied envvarsource given the other supplied information

func IsEnvironmentArgument

func IsEnvironmentArgument(s string) bool

IsEnvironmentArgument check str is env args

func IsValidEnvironmentArgument

func IsValidEnvironmentArgument(s string) bool

IsValidEnvironmentArgument check str is valid env

func ParseEnv

func ParseEnv(spec []string, defaultReader io.Reader) ([]api.EnvVar, []string, error)

ParseEnv parse env from reader

func SplitEnvironmentFromResources

func SplitEnvironmentFromResources(args []string) (resources, envArgs []string, ok bool)

SplitEnvironmentFromResources returns resources and envargs

Types

type ResourceStore

type ResourceStore struct {
	SecretStore    map[string]*api.Secret
	ConfigMapStore map[string]*api.ConfigMap
}

ResourceStore defines a new resource store data structure

func NewResourceStore

func NewResourceStore() *ResourceStore

NewResourceStore returns a pointer to a new resource store data structure

Jump to

Keyboard shortcuts

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