common

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructFullImageName

func ConstructFullImageName(image *components.Image, registry string) string

ConstructFullImageName returns name of image in the following format: <registry>/<image_name>:<image_tag>

func ConstructLabelAppMap

func ConstructLabelAppMap() map[string]string

ConstructLabelAppMap creates the map contains app labels

func ConstructLabelMap

func ConstructLabelMap(appName, componentName string) map[string]string

ConstructLabelMap creates the map contains pod labels

func ConstructResourceRequirements

func ConstructResourceRequirements(resources *components.ResourceRequirements) corev1.ResourceRequirements

ConstructResourceRequirements creates the ResourceRequirements contains Limits and Requests lists

func ConstructSelectorMap

func ConstructSelectorMap(appName string) map[string]string

ConstructSelectorMap creates the map contains deployment/daemonset selectors

func GetSelectedNodes

func GetSelectedNodes(ctx context.Context, c kubernetes.Interface, selector *components.NodeSelector) (*corev1.NodeList, error)

GetSelectedNodes returns a list of nodes filtered with NodeSelector

func MakeImagePullSecrets

func MakeImagePullSecrets(rs string) []corev1.LocalObjectReference

MakeImagePullSecrets creates list with imagePullSecret from csi spec

func MakeNodeSelectorMap

func MakeNodeSelectorMap(ns *components.NodeSelector) map[string]string

MakeNodeSelectorMap creates map with node selector from csi spec

func MatchLogFormat

func MatchLogFormat(format components.Format) string

MatchLogFormat checks if passed logFormat is allowed

func MatchLogLevel

func MatchLogLevel(level components.Level) string

MatchLogLevel checks if passed logLevel is allowed

func PrepareScheme

func PrepareScheme() (*runtime.Scheme, error)

PrepareScheme returns a scheme to manager setup

func UpdateConfigMap

func UpdateConfigMap(ctx context.Context, client kubernetes.Interface, expected *coreV1.ConfigMap, log *logrus.Entry) error

UpdateConfigMap updates found configmap with Spec from expected, creates one if not found

func UpdateDaemonSet

func UpdateDaemonSet(ctx context.Context, client kubernetes.Interface, expected *appsv1.DaemonSet, log *logrus.Entry) error

UpdateDaemonSet updates found daemonset with Spec from expected, creates one if not found nolint

func UpdateDeployment

func UpdateDeployment(ctx context.Context, client kubernetes.Interface, expected *appsv1.Deployment, log *logrus.Entry) error

UpdateDeployment updates found deployment with Spec from expected, creates one if not found nolint

Types

This section is empty.

Jump to

Keyboard shortcuts

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