Documentation ¶
Index ¶
- Constants
- func CSR(mods ...CSRModifier) ([]byte, error)
- func ConfigMap(name string, mods ...ConfigMapModifier) *corev1.ConfigMap
- func ConfigMapFrom(cm *corev1.ConfigMap, mods ...ConfigMapModifier) *corev1.ConfigMap
- func MustCSR(t *testing.T, mods ...CSRModifier) []byte
- func ObjectMeta(name string, mods ...ObjectMetaModifier) metav1.ObjectMeta
- type CSRBuilder
- type CSRModifier
- 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 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 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.