util

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ControllerNameFromPod

func ControllerNameFromPod(pod *v1.Pod) (string, *metav1.OwnerReference)

ControllerNameFromPod given a pod will return the root controller from the owner references

func GenerateCertificate

func GenerateCertificate(ctx context.Context, annotations map[string]string, name string, namespace string, ownerReference *metav1.OwnerReference, issuerKind string, issuerName string, certDuration string, certRenewBefore string) (ctrl.Result, error)

GenerateCertificate creates/updates a certificate resource to be used for authentication

func GetCertName

func GetCertName(podAnnotations map[string]string, resourceControllerName string) (certName string)

GetCertName returns the name that should be used for the certificate/secret based on an annotation on the pod or the root owner of the pod's name

func MapContains

func MapContains(m map[string]string, s string) bool

MapContains check to see if a map of [string]string contains a key

Types

This section is empty.

Jump to

Keyboard shortcuts

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