util

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: AGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HostedControlPlaneControllerName = "hosted-control-plane-controller"
	ApplyOptions                     = metav1.ApplyOptions{
		FieldManager: HostedControlPlaneControllerName,
		Force:        true,
	}
)
View Source
var ErrInvalidMount = errors.New("volume mount invalid or using non-existing volume")

Functions

func ArgsToSlice

func ArgsToSlice(
	ctx context.Context,
	userArgs map[string]string,
	controllerArgs map[string]string,
	opts ...ArgOption,
) []string

ArgsToSlice merges user and controller arguments with observability for overrides. Controller args override user args and overrides are logged, traced, and emitted as events.

func CalculateConfigMapChecksum

func CalculateConfigMapChecksum(
	ctx context.Context,
	kubernetesClient kubernetes.Interface,
	namespace string,
	configMapNames []string,
) (string, error)

func CalculateSecretChecksum

func CalculateSecretChecksum(
	ctx context.Context,
	kubernetesClient kubernetes.Interface,
	namespace string,
	secretNames []string,
) (string, error)

func GetMinorVersion

func GetMinorVersion(hostedControlPlane *v1alpha1.HostedControlPlane) (uint64, error)

func GetOwnerReferenceApplyConfiguration

func GetOwnerReferenceApplyConfiguration(
	hostedControlPlane *v1alpha1.HostedControlPlane,
) *metav1ac.OwnerReferenceApplyConfiguration

func PolicyToYaml

func PolicyToYaml(obj auditv1.Policy) (string, error)

func ResolveCoreDNSImage

func ResolveCoreDNSImage(imageSpec *v1alpha1.ImageSpec) string

func ResolveETCDImage

func ResolveETCDImage(imageSpec *v1alpha1.ImageSpec, version string) string

func ResolveKonnectivityImage

func ResolveKonnectivityImage(imageSpec *v1alpha1.ImageSpec, component string, minorVersion uint64) string

func ResolveKubeProxyImage

func ResolveKubeProxyImage(imageSpec *v1alpha1.ImageSpec, version string) string

func ResolveKubernetesComponentImage

func ResolveKubernetesComponentImage(imageSpec *v1alpha1.ImageSpec, component, version string) string

func ResolveNginxImage added in v1.1.0

func ResolveNginxImage(imageSpec *v1alpha1.ImageSpec) string

func ResourceRequirementsToResourcesApplyConfiguration

func ResourceRequirementsToResourcesApplyConfiguration(
	resources *corev1.ResourceRequirements,
) *corev1ac.ResourceRequirementsApplyConfiguration

func ToYaml

func ToYaml(obj runtime.Object) (string, error)

func ValidateMounts

func ValidateMounts(podSpec *corev1ac.PodSpecApplyConfiguration) error

Types

type ArgOption added in v1.1.0

type ArgOption struct {
	Prefix    *string
	Delimiter *string
}

Directories

Path Synopsis
Package names provides consistent naming for multiple resource types.
Package names provides consistent naming for multiple resource types.

Jump to

Keyboard shortcuts

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