utils

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEnvVarToDeploymentContainers

func AddEnvVarToDeploymentContainers(deploy *appsv1.Deployment, envVar *v1.EnvVar)

Attempts to add environment variable but does NOT override if already existing

func GetContainerForDeployment

func GetContainerForDeployment(deploy *appsv1.Deployment, name string) *v1.Container

func GetEnv

func GetEnv(key, fallback string) string

Get an environment variable given by key or return the fallback.

func GetEnvAsBool

func GetEnvAsBool(key string, fallback bool) bool

Get an environment variable given by key or return the fallback.

func GetPredictionPath

func GetPredictionPath(mlDep *machinelearningv1.SeldonDeployment) string

func GetPredictiveUnitAsJson

func GetPredictiveUnitAsJson(params []machinelearningv1.Parameter) string

func HasEnvVar

func HasEnvVar(envVars []v1.EnvVar, name string) bool

func IsEmptyTLS

func IsEmptyTLS(p *machinelearningv1.PredictorSpec) bool

func MountSecretToDeploymentContainers

func MountSecretToDeploymentContainers(deploy *appsv1.Deployment, secretRefName string, containerMountPath string)

Create a volume from the secret provided and mounts it to all the containers of deployment

func SetEnvVar

func SetEnvVar(envVars []v1.EnvVar, newVar v1.EnvVar, override bool) (newEnvVars []v1.EnvVar)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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