templates

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyTemplateWithExtraArgs

func ApplyTemplateWithExtraArgs(ctx context.Context, template *corev1.ConfigMap, dataKey, containerName string, values, extraArgs map[string]string) error

ApplyTemplateWithExtraArgs renders and merges extra args then applies the manifests into cluster.

func LoadTemplate

func LoadTemplate(ctx context.Context, namespacedName types.NamespacedName) (*corev1.ConfigMap, error)

LoadTemplate returns the yurt template with given namespace/name

func MergeExtraArgs

func MergeExtraArgs(yamlContent string, extraArgs map[string]string, containerName string) (string, error)

MergeExtraArgs merges extra args for the target container which defined in the yaml content

func MergeExtraArgsForContainer

func MergeExtraArgsForContainer(container *corev1.Container, extraArgs map[string]string)

MergeExtraArgsForContainer merges extraArgs into the given container args

func MergeExtraArgsForDaemonSet

func MergeExtraArgsForDaemonSet(daemonset *appsv1.DaemonSet, containerName string, extraArgs map[string]string) (string, error)

MergeExtraArgsForDaemonSet merges the extra args for DaemonSet container and returns the merged yaml content

func MergeExtraArgsForDeployment

func MergeExtraArgsForDeployment(deployment *appsv1.Deployment, containerName string, extraArgs map[string]string) (string, error)

MergeExtraArgsForDeployment merges the extra args for Deployment container and returns the merged yaml content

func MergeExtraArgsForPod

func MergeExtraArgsForPod(pod *corev1.Pod, containerName string, extraArgs map[string]string) (string, error)

MergeExtraArgsForPod merges the extra args for Pod container and returns the merged yaml content

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