package env
import "k8s.io/kubernetes/pkg/kubectl/cmd/util/env"
Index ¶
- func Env(key string, defaultValue string) string
- func GetEnv(key string) (string, bool)
- func GetEnvVarRefString(from *api.EnvVarSource) string
- func GetEnvVarRefValue(kc clientset.Interface, ns string, store *ResourceStore, from *api.EnvVarSource, obj runtime.Object, c *api.Container) (string, error)
- func IsEnvironmentArgument(s string) bool
- func IsValidEnvironmentArgument(s string) bool
- func ParseEnv(spec []string, defaultReader io.Reader) ([]api.EnvVar, []string, error)
- func SplitEnvironmentFromResources(args []string) (resources, envArgs []string, ok bool)
- type ResourceStore
Functions ¶
func Env ¶
Env returns an environment variable or a default value if not specified.
func GetEnv ¶
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 ¶
IsEnvironmentArgument check str is env args
func IsValidEnvironmentArgument ¶
IsValidEnvironmentArgument check str is valid env
func ParseEnv ¶
ParseEnv parse env from reader
func SplitEnvironmentFromResources ¶
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.2
- Published
- Oct 24, 2017
- Platform
- js/wasm
- Imports
- 13 packages
- Last checked
- 31 seconds ago –
Tools for package owners.