helpers

package
v0.0.0-test.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyEnvVars

func CopyEnvVars(in []corev1.EnvVar) []corev1.EnvVar

CopyEnvVars returns a deep copy of the provided environment variables slice.

func CopyPullSecrets

CopyPullSecrets returns a deep copy of the provided image pull secrets slice.

func DeepMergeMap

func DeepMergeMap(dst, src map[string]any)

DeepMergeMap recursively merges src into dst. Values from src take precedence. Nested maps are merged recursively.

func MergeEnvVars

func MergeEnvVars(defaults, overrides []corev1.EnvVar, jsonMergeKeys ...string) []corev1.EnvVar

MergeEnvVars combines default env vars with service-specific overrides. Service env vars take precedence over defaults when env var names match. If jsonMergeKeys is provided, env vars with those names are deep-merged as JSON objects.

func MergeJSONEnvVarValues

func MergeJSONEnvVarValues(base, higher string) string

MergeJSONEnvVarValues deep-merges two JSON object strings. The higher precedence value (from) takes priority in case of key conflicts. Non-JSON values or parsing errors result in the higher precedence value being used directly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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