package env

import "k8s.io/kubernetes/pkg/kubectl/cmd/util/env"

Index

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

Source Files

env_parse.go env_resolve.go

Version
v1.8.12
Published
Apr 23, 2018
Platform
js/wasm
Imports
13 packages
Last checked
45 seconds ago

Tools for package owners.