Documentation ¶
Index ¶
- Constants
- func CanBeStarted(deployment apps_v1.Deployment, clientSet kubernetes.Interface) bool
- func ConfigMapExists(name string, clientSet kubernetes.Interface, namespace string) bool
- func GetConfigMap(name string, clientSet kubernetes.Interface, namespace string) (*v1.ConfigMap, error)
- func GetDeploymentAnnotations(item interface{}) map[string]string
- func GetDeploymentContainers(item interface{}) []v1.Container
- func GetDeploymentInitContainers(item interface{}) []v1.Container
- func GetDeploymentItems(clientset kubernetes.Interface, namespace string, labelSelector string) []interface{}
- func GetDeploymentPodAnnotations(item interface{}) map[string]string
- func GetDeploymentVolumes(item interface{}) []v1.Volume
- func GetDeploymentsReferencingCm(clientSet kubernetes.Interface, configMapName string, namespace string, ...) ([]apps_v1.Deployment, error)
- func GetReferencedConfigMaps(container v1.Container) []string
- func ReloadDeployment(deployment apps_v1.Deployment, clientSet kubernetes.Interface) error
- func ScaleDeployment(command ScaleCommand) error
- func UpdateDeployment(clientset kubernetes.Interface, namespace string, labelSelector string, ...) error
- type AnnotationsFunc
- type Config
- type ContainersFunc
- type InitContainersFunc
- type ItemsFunc
- type PodAnnotationsFunc
- type ScaleCommand
- type UpdateFunc
- type VolumesFunc
Constants ¶
const ( // ConfigmapEnvVarPostfix is a postfix for configmap envVar ConfigmapEnvVarPostfix = "CONFIGMAP" // SecretEnvVarPostfix is a postfix for secret envVar SecretEnvVarPostfix = "SECRET" )
Variables ¶
This section is empty.
Functions ¶
func CanBeStarted ¶
func CanBeStarted(deployment apps_v1.Deployment, clientSet kubernetes.Interface) bool
func ConfigMapExists ¶
func ConfigMapExists(name string, clientSet kubernetes.Interface, namespace string) bool
func GetConfigMap ¶
func GetDeploymentAnnotations ¶
GetDeploymentAnnotations returns the annotations of given deployment
func GetDeploymentContainers ¶
GetDeploymentContainers returns the containers of given deployment
func GetDeploymentInitContainers ¶
GetDeploymentInitContainers returns the containers of given deployment
func GetDeploymentItems ¶
func GetDeploymentItems(clientset kubernetes.Interface, namespace string, labelSelector string) []interface{}
GetDeploymentItems returns the deployments in given namespace
func GetDeploymentPodAnnotations ¶
GetDeploymentPodAnnotations returns the pod's annotations of given deployment
func GetDeploymentVolumes ¶
GetDeploymentVolumes returns the Volumes of given deployment
func GetDeploymentsReferencingCm ¶
func GetDeploymentsReferencingCm(clientSet kubernetes.Interface, configMapName string, namespace string, labelSelector string) ([]apps_v1.Deployment, error)
func GetReferencedConfigMaps ¶
Does not return config maps whose only use is marked "optional"
func ReloadDeployment ¶
func ReloadDeployment(deployment apps_v1.Deployment, clientSet kubernetes.Interface) error
Won't do anything for replicas that are scaled down
func ScaleDeployment ¶
func ScaleDeployment(command ScaleCommand) error
func UpdateDeployment ¶
func UpdateDeployment(clientset kubernetes.Interface, namespace string, labelSelector string, resource interface{}) error
UpdateDeployment performs rolling upgrade on deployment
Types ¶
type AnnotationsFunc ¶
AnnotationsFunc is a generic func to return annotations
type ContainersFunc ¶
ContainersFunc is a generic func to return containers
type InitContainersFunc ¶
InitContainersFunc is a generic func to return containers
type ItemsFunc ¶
type ItemsFunc func(kubernetes.Interface, string, string) []interface{}
ItemsFunc is a generic function to return a specific resource array in given namespace
type PodAnnotationsFunc ¶
PodAnnotationsFunc is a generic func to return annotations
type ScaleCommand ¶
type ScaleCommand struct { ClientSet kubernetes.Interface Namespace string DeploymentName string DesiredReplicas int32 }
type UpdateFunc ¶
type UpdateFunc func(kubernetes.Interface, string, string, interface{}) error
UpdateFunc performs the resource update
type VolumesFunc ¶
VolumesFunc is a generic func to return volumes