workloads

package
v0.0.0-...-ba6d279 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 5 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

NewDaemonSetTemplate 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

func NewJobTemplate(jobName string, namespace string) *batchv1.Job

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, nodeSelector 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

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