gen

package
v0.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DefaultTestNamespace is the default namespace set on resources that
	// are namespaced.
	DefaultTestNamespace = "default-unit-test-ns"
)

Variables

This section is empty.

Functions

func CSR

func CSR(mods ...CSRModifier) ([]byte, error)

func CertificateRequest added in v0.2.0

func CertificateRequest(name string, mods ...CertificateRequestModifier) *cmapi.CertificateRequest

func CertificateRequestFrom added in v0.2.0

func CertificateRequestFrom(cr *cmapi.CertificateRequest, mods ...CertificateRequestModifier) *cmapi.CertificateRequest

func ConfigMap

func ConfigMap(name string, mods ...ConfigMapModifier) *corev1.ConfigMap

func ConfigMapFrom

func ConfigMapFrom(cm *corev1.ConfigMap, mods ...ConfigMapModifier) *corev1.ConfigMap

func Key added in v0.12.0

func Key() []byte

func MustCSR added in v0.1.2

func MustCSR(t *testing.T, mods ...CSRModifier) []byte

func ObjectMeta

func ObjectMeta(name string, mods ...ObjectMetaModifier) metav1.ObjectMeta

ObjectMeta creates a new metav1.ObjectMeta with the given name, optionally applying the provided ObjectMetaModifiers. It applies a DefaultTestNamespace by default. Cluster-scoped resource generators should explicitly add `SetNamespace("")` to their constructors.

Types

type CSRBuilder

type CSRBuilder struct {
	// contains filtered or unexported fields
}

type CSRModifier

type CSRModifier func(*CSRBuilder)

func SetCSRCommonName

func SetCSRCommonName(cn string) CSRModifier

func SetCSRDNS

func SetCSRDNS(dns []string) CSRModifier

func SetCSREmails

func SetCSREmails(emails []string) CSRModifier

func SetCSRIPs

func SetCSRIPs(ips []string) CSRModifier

func SetCSRIdentities

func SetCSRIdentities(ids []string) CSRModifier

type CertificateRequestModifier added in v0.2.0

type CertificateRequestModifier func(*cmapi.CertificateRequest)

func AddCertificateRequestStatusCondition added in v0.2.0

func AddCertificateRequestStatusCondition(c cmapi.CertificateRequestCondition) CertificateRequestModifier

func SetCertificateRequestCA added in v0.2.0

func SetCertificateRequestCA(caPEM []byte) CertificateRequestModifier

func SetCertificateRequestCertificate added in v0.2.0

func SetCertificateRequestCertificate(certPEM []byte) CertificateRequestModifier

type ConfigMapModifier

type ConfigMapModifier func(*corev1.ConfigMap)

func SetConfigMapData

func SetConfigMapData(data map[string]string) ConfigMapModifier

func SetConfigMapLabels

func SetConfigMapLabels(labels map[string]string) ConfigMapModifier

func SetConfigMapNamespace

func SetConfigMapNamespace(ns string) ConfigMapModifier

func SetConfigMapResourceVersion

func SetConfigMapResourceVersion(version string) ConfigMapModifier

type ObjectMetaModifier

type ObjectMetaModifier func(*metav1.ObjectMeta)

ObjectMetaModifier applies a transformation to the provider ObjectMeta

Jump to

Keyboard shortcuts

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