Documentation ¶
Index ¶
- Constants
- func CreateDeploymentWithService(steveclient *steveV1.Client, wlName string, deployment *v1.Deployment, ...) (*steveV1.SteveAPIObject, *steveV1.SteveAPIObject, error)
- func NewContainer(containerName, image string, imagePullPolicy corev1.PullPolicy, ...) corev1.Container
- func NewDaemonSetTemplate(daemonsetName string, namespace string, template corev1.PodTemplateSpec, ...) *appv1.DaemonSet
- func NewDeploymentTemplate(deploymentName string, namespace string, template corev1.PodTemplateSpec, ...) *appv1.Deployment
- func NewJobTemplate(jobName string, namespace string) *batchv1.Job
- func NewPodTemplate(containers []corev1.Container, volumes []corev1.Volume, ...) corev1.PodTemplateSpec
- func VerifyDeployment(steveClient *steveV1.Client, deployment *steveV1.SteveAPIObject) error
Constants ¶
const ( DeploymentSteveType = "apps.deployment" DaemonsetSteveType = "apps.daemonset" )
const (
ServiceType = "service"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDeploymentWithService ¶
func CreateDeploymentWithService(steveclient *steveV1.Client, wlName string, deployment *v1.Deployment, service corev1.Service) (*steveV1.SteveAPIObject, *steveV1.SteveAPIObject, error)
CreateDeploymentWithService is a helper function to create a deployment and service in the downstream cluster.
func NewContainer ¶
func NewContainer(containerName, image string, imagePullPolicy corev1.PullPolicy, volumeMounts []corev1.VolumeMount, envFrom []corev1.EnvFromSource, command []string, securityContext *corev1.SecurityContext, args []string) corev1.Container
NewContainer is a contructor that creates a container for a pod template i.e. corev1.PodTemplateSpec
func NewDaemonSetTemplate ¶
func NewDaemonSetTemplate(daemonsetName string, namespace string, template corev1.PodTemplateSpec, isCattleLabeled bool, matchLabels map[string]string) *appv1.DaemonSet
NewDeploymentTemplate is a constructor that creates a daemonset template. If the isCattleLabeled true, workloadselector labels are assigned to the daemonset and the pod template.
func NewDeploymentTemplate ¶
func NewDeploymentTemplate(deploymentName string, namespace string, template corev1.PodTemplateSpec, isCattleLabeled bool, matchLabels map[string]string) *appv1.Deployment
NewDeploymentTemplate is a constructor that creates a deployment template. If the isCattleLabeled true, workloadselector labels are assigned to the deployment and the pod template.
func NewJobTemplate ¶
NewJobTemplate is a constructor that creates a job template.
func NewPodTemplate ¶
func NewPodTemplate(containers []corev1.Container, volumes []corev1.Volume, imagePullSecrets []corev1.LocalObjectReference, labels map[string]string) corev1.PodTemplateSpec
NewPodTemplate is a constructor that creates the pod template for all types of workloads e.g. cronjobs, daemonsets, deployments, and batch jobs
func VerifyDeployment ¶
func VerifyDeployment(steveClient *steveV1.Client, deployment *steveV1.SteveAPIObject) error
VerifyDeployment waits for a deployment to be ready
Types ¶
This section is empty.