Documentation ¶
Index ¶
- func AddConfigEnvVar(c *k8v1.Container, envName string, selector string, key string)
- func AddContainer(p *k8v1.PodSpec, c *k8v1.Container)
- func AddContainerVolume(c *k8v1.Container, name string, mountpath string)
- func AddEnvVar(c *k8v1.Container, key string, value string)
- func AddPodConfigVolume(p *k8v1.PodSpec, volName string, configMap string)
- func AddPodEmptyVolume(p *k8v1.PodSpec, name string)
- func AddPodHostVolume(p *k8v1.PodSpec, name string, hostpath string)
- func AddPullSecret(pod *k8v1.PodSpec, secret string)
- func CreateConfigMap(name string, dataKey string, data string) *k8v1.ConfigMap
- func CreateContainer(name string, image string) *k8v1.Container
- func CreateDeployment(name string) *apps.Deployment
- func CreateDeploymentConfig(name string) *appsv1beta2.Deployment
- func CreateJob(name string) *batchv1.Job
- func GetKubeAPI() *kubernetes.Clientset
- type Command
- type ConfigMapCommand
- type DeploymentCommand
- type JobCommand
- type KubeCommand
- type KubernetesCommand
- type ServiceCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddConfigEnvVar ¶
Adds env variable from configMap
func AddContainer ¶
AddContainer adds container to a pod
func AddContainerVolume ¶
Adds a container volume mount to a container
func AddPodConfigVolume ¶
Adds a configMap volume to a pod
func AddPodEmptyVolume ¶
func AddPullSecret ¶
AddPullSecret adds a new pullsecret to the Pod
func CreateConfigMap ¶
CreateConfigMap creates a configmap that can be submitted to kubernetes
func CreateContainer ¶
CreateContainer creates a default container.
func CreateDeployment ¶
func CreateDeployment(name string) *apps.Deployment
func CreateDeploymentConfig ¶
func CreateDeploymentConfig(name string) *appsv1beta2.Deployment
CreateDeployment
func GetKubeAPI ¶
func GetKubeAPI() *kubernetes.Clientset
GetKubeAPI returns the clientset for the container running inside kubernetes. The container must have the RBAC roles in place to use kubernetes api
Types ¶
type ConfigMapCommand ¶
func (*ConfigMapCommand) Add ¶
func (k *ConfigMapCommand) Add(clientset kubernetes.Interface) error
func (*ConfigMapCommand) Undo ¶
func (k *ConfigMapCommand) Undo(clientset kubernetes.Interface) error
Undo deletes the ConfigMap from k8s
func (*ConfigMapCommand) Update ¶
func (k *ConfigMapCommand) Update(clientset kubernetes.Interface) error
type DeploymentCommand ¶
type DeploymentCommand struct {
Deployment *apps.Deployment
}
func (*DeploymentCommand) Add ¶
func (d *DeploymentCommand) Add(clientset kubernetes.Interface) error
func (*DeploymentCommand) Undo ¶
func (d *DeploymentCommand) Undo(clientset kubernetes.Interface) error
func (*DeploymentCommand) Update ¶
func (d *DeploymentCommand) Update(clientset kubernetes.Interface) error
type JobCommand ¶
func (*JobCommand) Add ¶
func (j *JobCommand) Add(clientset kubernetes.Interface) error
func (*JobCommand) Undo ¶
func (j *JobCommand) Undo(clientset kubernetes.Interface) error
func (*JobCommand) Update ¶
func (j *JobCommand) Update(clientset kubernetes.Interface) error
type KubeCommand ¶
type KubeCommand interface { Add(clientset kubernetes.Interface) error Undo(clientset kubernetes.Interface) error Update(clientset kubernetes.Interface) error }
type KubernetesCommand ¶
type ServiceCommand ¶
func CreateService ¶
func CreateService(name string, selector string, ports []k8v1.ServicePort) *ServiceCommand
func (*ServiceCommand) Add ¶
func (s *ServiceCommand) Add(clientset kubernetes.Interface) error
func (*ServiceCommand) Undo ¶
func (s *ServiceCommand) Undo(clientset kubernetes.Interface) error
func (*ServiceCommand) Update ¶
func (s *ServiceCommand) Update(clientset kubernetes.Interface) error
Click to show internal directories.
Click to hide internal directories.