workloads

package
v0.0.0-...-2bcb20d Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DeploymentSteveType = "apps.deployment"
	DaemonsetSteveType  = "apps.daemonset"
)
View Source
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

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) 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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