Documentation ¶
Index ¶
- Constants
- func CSR(mods ...CSRModifier) ([]byte, error)
- func CertificateRequest(name string, mods ...CertificateRequestModifier) *cmapi.CertificateRequest
- func CertificateRequestFrom(cr *cmapi.CertificateRequest, mods ...CertificateRequestModifier) *cmapi.CertificateRequest
- func ConfigMap(name string, mods ...ConfigMapModifier) *corev1.ConfigMap
- func ConfigMapFrom(cm *corev1.ConfigMap, mods ...ConfigMapModifier) *corev1.ConfigMap
- func Key() []byte
- func MustCSR(t *testing.T, mods ...CSRModifier) []byte
- func ObjectMeta(name string, mods ...ObjectMetaModifier) metav1.ObjectMeta
- type CSRBuilder
- type CSRModifier
- type CertificateRequestModifier
- type ConfigMapModifier
- type ObjectMetaModifier
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 ConfigMapFrom ¶
func ConfigMapFrom(cm *corev1.ConfigMap, mods ...ConfigMapModifier) *corev1.ConfigMap
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 ¶
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
Click to show internal directories.
Click to hide internal directories.