builder

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildBuilder

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

BuildBuilder is a builder for appsv1.DeploymentConfig objects to be usebonly in unit tests.

func NewBuild

func NewBuild() *BuildBuilder

NewBuild returns a new BuildBuilder to builbappsv1.DeploymentConfig objects. It is meant to be usebonly in unit tests.

func (*BuildBuilder) Build

func (b *BuildBuilder) Build() *ocpv1.Build

func (*BuildBuilder) WithDockerImage

func (b *BuildBuilder) WithDockerImage(image string) *BuildBuilder

func (*BuildBuilder) WithName

func (b *BuildBuilder) WithName(name string) *BuildBuilder

func (*BuildBuilder) WithNamespace

func (b *BuildBuilder) WithNamespace(namespace string) *BuildBuilder

type ClusterPodPlacementConfigBuilder

type ClusterPodPlacementConfigBuilder struct {
	*v1beta1.ClusterPodPlacementConfig
}

func NewClusterPodPlacementConfig

func NewClusterPodPlacementConfig() *ClusterPodPlacementConfigBuilder

func (*ClusterPodPlacementConfigBuilder) Build

func (*ClusterPodPlacementConfigBuilder) WithLogVerbosity

func (*ClusterPodPlacementConfigBuilder) WithName

func (*ClusterPodPlacementConfigBuilder) WithNamespaceSelector

func (p *ClusterPodPlacementConfigBuilder) WithNamespaceSelector(labelSelector *v1.LabelSelector) *ClusterPodPlacementConfigBuilder

func (*ClusterPodPlacementConfigBuilder) WithNodeAffinityScoring

func (p *ClusterPodPlacementConfigBuilder) WithNodeAffinityScoring(enabled bool) *ClusterPodPlacementConfigBuilder

func (*ClusterPodPlacementConfigBuilder) WithNodeAffinityScoringTerm

func (p *ClusterPodPlacementConfigBuilder) WithNodeAffinityScoringTerm(architecture string, weight int32) *ClusterPodPlacementConfigBuilder

func (*ClusterPodPlacementConfigBuilder) WithPlugins

type ClusterRoleBindingBuilder

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

ClusterRoleBindingBuilder is a builder for v1.ClusterRoleBinding objects to be used only in unit tests.

func NewClusterRoleBinding

func NewClusterRoleBinding() *ClusterRoleBindingBuilder

NewClusterRoleBinding returns a new ClusterRoleBindingBuilder to build v1.ClusterRoleBinding objects. It is meant to be used only in unit tests.

func (*ClusterRoleBindingBuilder) Build

func (*ClusterRoleBindingBuilder) WithName

func (*ClusterRoleBindingBuilder) WithRoleRef

func (c *ClusterRoleBindingBuilder) WithRoleRef(apiGroup string, kind string, name string) *ClusterRoleBindingBuilder

func (*ClusterRoleBindingBuilder) WithSubjects

func (c *ClusterRoleBindingBuilder) WithSubjects(subjects ...*v1.Subject) *ClusterRoleBindingBuilder

type ClusterRoleBuilder

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

ClusterRoleBuilder is a builder for rbacv1.ClusterRole objects to be used only in unit tests.

func NewClusterRole

func NewClusterRole() *ClusterRoleBuilder

NewClusterRole returns a new ClusterRoleBuilder to build rbacv1.ClusterRole objects. It is meant to be used only in unit tests.

func (*ClusterRoleBuilder) Build

func (*ClusterRoleBuilder) WithName

func (c *ClusterRoleBuilder) WithName(name string) *ClusterRoleBuilder

type ConfigMapBuilder

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

ConfigMapBuilder is a builder for v1.ConfigMap objects to be used only in unit tests.

func NewConfigMap

func NewConfigMap() *ConfigMapBuilder

NewConfigMap returns a new ConfigMapBuilder to build v1.ConfigMap objects. It is meant to be used only in unit tests.

func (*ConfigMapBuilder) Build

func (s *ConfigMapBuilder) Build() *v1.ConfigMap

func (*ConfigMapBuilder) WithBinaryData

func (s *ConfigMapBuilder) WithBinaryData(entries map[string][]byte) *ConfigMapBuilder

func (*ConfigMapBuilder) WithData

func (s *ConfigMapBuilder) WithData(entries map[string]string) *ConfigMapBuilder

func (*ConfigMapBuilder) WithLabels

func (s *ConfigMapBuilder) WithLabels(entries map[string]string) *ConfigMapBuilder

func (*ConfigMapBuilder) WithName

func (s *ConfigMapBuilder) WithName(name string) *ConfigMapBuilder

func (*ConfigMapBuilder) WithNamespace

func (s *ConfigMapBuilder) WithNamespace(namespace string) *ConfigMapBuilder

type ContainerBuilder

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

ContainerBuilder is a builder for v1.Container objects to be used only in unit tests.

func NewContainer

func NewContainer() *ContainerBuilder

NewContainer returns a new ContainerBuilder to build v1.Container objects. It is meant to be used only in unit tests.

func (*ContainerBuilder) Build

func (c *ContainerBuilder) Build() *v1.Container

func (*ContainerBuilder) WithEnv

func (c *ContainerBuilder) WithEnv(values ...*v1.EnvVar) *ContainerBuilder

func (*ContainerBuilder) WithImage

func (c *ContainerBuilder) WithImage(image string) *ContainerBuilder

func (*ContainerBuilder) WithPorts

func (c *ContainerBuilder) WithPorts(values ...v1.ContainerPort) *ContainerBuilder

func (*ContainerBuilder) WithPortsContainerPort

func (c *ContainerBuilder) WithPortsContainerPort(ports ...int32) *ContainerBuilder

func (*ContainerBuilder) WithSecurityContext

func (c *ContainerBuilder) WithSecurityContext(securityContext *v1.SecurityContext) *ContainerBuilder

func (*ContainerBuilder) WithVolumeMounts

func (c *ContainerBuilder) WithVolumeMounts(volumeMounts ...*v1.VolumeMount) *ContainerBuilder

type ContainerEnvBuilder

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

ContainerEnvBuilder is a builder for v1.EnvVar objects to be used only in unit tests.

func NewContainerEnv

func NewContainerEnv() *ContainerEnvBuilder

NewContainerEnv returns a new ContainerEnvBuilder to build v1.EnvVar objects. It is meant to be used only in unit tests.

func (*ContainerEnvBuilder) Build

func (e *ContainerEnvBuilder) Build() *v1.EnvVar

func (*ContainerEnvBuilder) WithName

func (e *ContainerEnvBuilder) WithName(name string) *ContainerEnvBuilder

func (*ContainerEnvBuilder) WithValue

func (e *ContainerEnvBuilder) WithValue(value string) *ContainerEnvBuilder

type DaemonSetBuilder

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

DaemonSetBuilder is a builder for appsv1.DaemonSet objects to be used only in unit tests.

func NewDaemonSet

func NewDaemonSet() *DaemonSetBuilder

NewDaemonSet returns a new DaemonSetBuilder to build appsv1.DaemonSet objects. It is meant to be used only in unit tests.

func (*DaemonSetBuilder) Build

func (d *DaemonSetBuilder) Build() *appsv1.DaemonSet

func (*DaemonSetBuilder) WithName

func (d *DaemonSetBuilder) WithName(name string) *DaemonSetBuilder

func (*DaemonSetBuilder) WithNamespace

func (d *DaemonSetBuilder) WithNamespace(namespace string) *DaemonSetBuilder

func (*DaemonSetBuilder) WithPodSpec

func (d *DaemonSetBuilder) WithPodSpec(ps corev1.PodSpec) *DaemonSetBuilder

func (*DaemonSetBuilder) WithSelectorAndPodLabels

func (d *DaemonSetBuilder) WithSelectorAndPodLabels(entries map[string]string) *DaemonSetBuilder

type DeploymentBuilder

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

DeploymentBuilder is a builder for appsv1.Deployment objects to be used only in unit tests.

func NewDeployment

func NewDeployment() *DeploymentBuilder

NewDeployment returns a new DeploymentBuilder to build appsv1.Deployment objects. It is meant to be used only in unit tests.

func (*DeploymentBuilder) Build

func (d *DeploymentBuilder) Build() *appsv1.Deployment

func (*DeploymentBuilder) WithName

func (d *DeploymentBuilder) WithName(name string) *DeploymentBuilder

func (*DeploymentBuilder) WithNamespace

func (d *DeploymentBuilder) WithNamespace(namespace string) *DeploymentBuilder

func (*DeploymentBuilder) WithPodSpec

func (d *DeploymentBuilder) WithPodSpec(ps corev1.PodSpec) *DeploymentBuilder

func (*DeploymentBuilder) WithReplicas

func (d *DeploymentBuilder) WithReplicas(num *int32) *DeploymentBuilder

func (*DeploymentBuilder) WithSelectorAndPodLabels

func (d *DeploymentBuilder) WithSelectorAndPodLabels(entries map[string]string) *DeploymentBuilder

type DeploymentConfigBuilder

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

DeploymentConfigBuilder is a builder for ocpv1.DeploymentConfig objects to be usedc only in unit tests.

func NewDeploymentConfig

func NewDeploymentConfig() *DeploymentConfigBuilder

NewDeploymentConfig returns a new DeploymentConfigBuilder to buildc ocpv1.DeploymentConfig objects. It is meant to be usedc only in unit tests.

func (*DeploymentConfigBuilder) Build

func (*DeploymentConfigBuilder) WithName

func (*DeploymentConfigBuilder) WithNamespace

func (dc *DeploymentConfigBuilder) WithNamespace(namespace string) *DeploymentConfigBuilder

func (*DeploymentConfigBuilder) WithPodSpec

func (*DeploymentConfigBuilder) WithReplicas

func (dc *DeploymentConfigBuilder) WithReplicas(num int32) *DeploymentConfigBuilder

func (*DeploymentConfigBuilder) WithSelectorAndPodLabels

func (dc *DeploymentConfigBuilder) WithSelectorAndPodLabels(entries map[string]string) *DeploymentConfigBuilder

type ImageContentSourcePolicyBuilder

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

ImageContentSourcePolicyBuilder is a builder for ocpoperatorv1alpha1.ImageContentSourcePolicy objects to be used only in unit tests.

func NewImageContentSourcePolicy

func NewImageContentSourcePolicy() *ImageContentSourcePolicyBuilder

NewImageContentSourcePolicy returns a new ImageContentSourcePolicyBuilder to build ocpoperatorv1alpha1.ImageContentSourcePolicy objects. It is meant to be used only in unit tests.

func (*ImageContentSourcePolicyBuilder) Build

func (*ImageContentSourcePolicyBuilder) WithName

func (*ImageContentSourcePolicyBuilder) WithRepositoryDigestMirrors

type ImageDigestMirrorSetBuilder

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

ImageDigestMirrorSetBuilder is a builder for ocpconfigv1.ImageDigestMirrorSet objects to be used only in unit tests.

func NewImageDigestMirrorSet

func NewImageDigestMirrorSet() *ImageDigestMirrorSetBuilder

NewImageDigestMirrorSet returns a new ImageDigestMirrorSetBuilder to build ocpconfigv1.ImageDigestMirrorSet objects. It is meant to be used only in unit tests.

func (*ImageDigestMirrorSetBuilder) Build

func (*ImageDigestMirrorSetBuilder) WithImageDigestMirrors

func (*ImageDigestMirrorSetBuilder) WithName

type ImageDigestMirrorsBuilder

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

ImageDigestMirrorsBuilder is a builder for ocpconfigv1.imageDigestMirrorset objects to be used only in unit tests.

func NewImageDigestMirrors

func NewImageDigestMirrors() *ImageDigestMirrorsBuilder

NewImageDigestMirrors returns a new ImageDigestMirrorsBuilder to build ocpconfigv1.imageDigestMirrorset objects. It is meant to be used only in unit tests.

func (*ImageDigestMirrorsBuilder) Build

func (*ImageDigestMirrorsBuilder) WithMirrorAllowContactingSource

func (t *ImageDigestMirrorsBuilder) WithMirrorAllowContactingSource() *ImageDigestMirrorsBuilder

func (*ImageDigestMirrorsBuilder) WithMirrorNeverContactSource

func (t *ImageDigestMirrorsBuilder) WithMirrorNeverContactSource() *ImageDigestMirrorsBuilder

func (*ImageDigestMirrorsBuilder) WithMirrorSourcePolicy

func (*ImageDigestMirrorsBuilder) WithMirrors

func (*ImageDigestMirrorsBuilder) WithSource

type ImageTagMirrorSetBuilder

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

ImageTagMirrorSetBuilder is a builder for ocpconfigv1.ImageTagMirrorSet objects to be used only in unit tests.

func NewImageTagMirrorSet

func NewImageTagMirrorSet() *ImageTagMirrorSetBuilder

NewImageTagMirrorSet returns a new ImageTagMirrorSetBuilder to build ocpconfigv1.ImageTagMirrorSet objects. It is meant to be used only in unit tests.

func (*ImageTagMirrorSetBuilder) Build

func (*ImageTagMirrorSetBuilder) WithImageTagMirrors

func (*ImageTagMirrorSetBuilder) WithName

type ImageTagMirrorsBuilder

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

ImageTagMirrorsBuilder is a builder for ocpconfigv1.ImageTagMirrorSet objects to be used only in unit tests.

func NewImageTagMirrors

func NewImageTagMirrors() *ImageTagMirrorsBuilder

NewImageTagMirrors returns a new ImageTagMirrorsBuilder to build ocpconfigv1.ImageTagMirrorSet objects. It is meant to be used only in unit tests.

func (*ImageTagMirrorsBuilder) Build

func (*ImageTagMirrorsBuilder) WithMirrorAllowContactingSource

func (t *ImageTagMirrorsBuilder) WithMirrorAllowContactingSource() *ImageTagMirrorsBuilder

func (*ImageTagMirrorsBuilder) WithMirrorNeverContactSource

func (t *ImageTagMirrorsBuilder) WithMirrorNeverContactSource() *ImageTagMirrorsBuilder

func (*ImageTagMirrorsBuilder) WithMirrorSourcePolicy

func (*ImageTagMirrorsBuilder) WithMirrors

func (*ImageTagMirrorsBuilder) WithSource

func (t *ImageTagMirrorsBuilder) WithSource(registry string) *ImageTagMirrorsBuilder

type Jobbuilder

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

Jobbuilder is a builder for batchv1.Job objects to be used only in unit tests.

func NewJob

func NewJob() *Jobbuilder

NewJob returns a new Jobbuilder to build batchv1.Job objects. It is meant to be used only in unit tests.

func (*Jobbuilder) Build

func (j *Jobbuilder) Build() *batchv1.Job

func (*Jobbuilder) WithName

func (j *Jobbuilder) WithName(name string) *Jobbuilder

func (*Jobbuilder) WithNamespace

func (j *Jobbuilder) WithNamespace(namespace string) *Jobbuilder

func (*Jobbuilder) WithPodLabels

func (j *Jobbuilder) WithPodLabels(entries map[string]string) *Jobbuilder

func (*Jobbuilder) WithPodSpec

func (j *Jobbuilder) WithPodSpec(ps corev1.PodSpec) *Jobbuilder

type MutatingWebhookConfigurationBuilder

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

func NewMutatingWebhookConfiguration

func NewMutatingWebhookConfiguration() *MutatingWebhookConfigurationBuilder

func (*MutatingWebhookConfigurationBuilder) Build

func (*MutatingWebhookConfigurationBuilder) WithName

type NodeSelectorRequirementBuilder

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

NodeSelectorRequirementBuilder is a builder for v1.NodeSelectorRequirement objects to be used only in unit tests.

func NewNodeSelectorRequirement

func NewNodeSelectorRequirement() *NodeSelectorRequirementBuilder

NewNodeSelectorRequirement returns a new NodeSelectorRequirementBuilder to build v1.NodeSelectorRequirement objects. It is meant to be used only in unit tests.

func (*NodeSelectorRequirementBuilder) Build

func (*NodeSelectorRequirementBuilder) WithKeyAndValues

type NodeSelectorTermBuilder

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

NodeSelectorTermBuilder is a builder for v1.NodeSelectorTerm objects to be used only in unit tests.

func NewNodeSelectorTerm

func NewNodeSelectorTerm() *NodeSelectorTermBuilder

NewNodeSelectorTerm returns a new NodeSelectorTermBuilder to build v1.NodeSelectorTerm objects. It is meant to be used only in unit tests.

func (*NodeSelectorTermBuilder) Build

func (*NodeSelectorTermBuilder) WithMatchExpressions

func (n *NodeSelectorTermBuilder) WithMatchExpressions(values ...*v1.NodeSelectorRequirement) *NodeSelectorTermBuilder

func (*NodeSelectorTermBuilder) WithMatchFields

type OwnerReferenceBuilder

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

OwnerReferenceBuilder is a builder for metav1.OwnerReference objects to be used only in unit tests.

func NewOwnerReferenceBuilder

func NewOwnerReferenceBuilder() *OwnerReferenceBuilder

NewOwnerReferenceBuilder returns a new OwnerReferenceBuilder to build metav1.OwnerReference objects. It is meant to be used only in unit tests.

func (*OwnerReferenceBuilder) Build

func (*OwnerReferenceBuilder) WithController

func (o *OwnerReferenceBuilder) WithController(controller *bool) *OwnerReferenceBuilder

func (*OwnerReferenceBuilder) WithKind

type PodBuilder

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

PodBuilder is a builder for v1.Pod objects to be used only in unit tests.

func NewPod

func NewPod() *PodBuilder

NewPod returns a new PodBuilder to build v1.Pod objects. It is meant to be used only in unit tests.

func (*PodBuilder) Build

func (p *PodBuilder) Build() *v1.Pod

func (*PodBuilder) WithAffinity

func (p *PodBuilder) WithAffinity(initialAffinity *v1.Affinity) *PodBuilder

WithAffinity adds the affinity to the pod. If initialAffinity is not nil, it is used as the initial value of the pod's affinity. Otherwise, the pod's affinity is initialized to an empty affinity if it is nil.

func (*PodBuilder) WithContainer

func (p *PodBuilder) WithContainer(image string, imagePullPolicy v1.PullPolicy) *PodBuilder

func (*PodBuilder) WithContainerImagePullAlways

func (p *PodBuilder) WithContainerImagePullAlways(image string) *PodBuilder

func (*PodBuilder) WithContainersImages

func (p *PodBuilder) WithContainersImages(images ...string) *PodBuilder

func (*PodBuilder) WithGenerateName

func (p *PodBuilder) WithGenerateName(name string) *PodBuilder

func (*PodBuilder) WithImagePullSecrets

func (p *PodBuilder) WithImagePullSecrets(imagePullSecrets ...string) *PodBuilder

func (*PodBuilder) WithInitContainersImages

func (p *PodBuilder) WithInitContainersImages(images ...string) *PodBuilder

func (*PodBuilder) WithLabels

func (p *PodBuilder) WithLabels(labelsKeyValuesPair ...string) *PodBuilder

func (*PodBuilder) WithNamespace

func (p *PodBuilder) WithNamespace(namespace string) *PodBuilder

func (*PodBuilder) WithNodeAffinity

func (p *PodBuilder) WithNodeAffinity() *PodBuilder

func (*PodBuilder) WithNodeName

func (p *PodBuilder) WithNodeName(nodeName string) *PodBuilder

func (*PodBuilder) WithNodeSelectorTermsMatchExpressions

func (p *PodBuilder) WithNodeSelectorTermsMatchExpressions(
	nodeSelectorTermsMatchExpressions ...[]v1.NodeSelectorRequirement) *PodBuilder

func (*PodBuilder) WithNodeSelectors

func (p *PodBuilder) WithNodeSelectors(kv ...string) *PodBuilder

func (*PodBuilder) WithOwnerReferences

func (p *PodBuilder) WithOwnerReferences(values ...*metav1.OwnerReference) *PodBuilder

func (*PodBuilder) WithPreferredDuringSchedulingIgnoredDuringExecution

func (p *PodBuilder) WithPreferredDuringSchedulingIgnoredDuringExecution(values ...*v1.PreferredSchedulingTerm) *PodBuilder

func (*PodBuilder) WithRequiredDuringSchedulingIgnoredDuringExecution

func (p *PodBuilder) WithRequiredDuringSchedulingIgnoredDuringExecution() *PodBuilder

func (*PodBuilder) WithSchedulingGates

func (p *PodBuilder) WithSchedulingGates(schedulingGates ...string) *PodBuilder

type PodSpecBuilder

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

PodSpecBuilder is a builder for v1.PodSpec objects to be used only in unit tests.

func NewPodSpec

func NewPodSpec() *PodSpecBuilder

NewPodSpec returns a new PodSpecBuilder to build v1.PodSpec objects. It is meant to be used only in unit tests.

func (*PodSpecBuilder) Build

func (ps *PodSpecBuilder) Build() v1.PodSpec

func (*PodSpecBuilder) WithAffinity

func (ps *PodSpecBuilder) WithAffinity(initialAffinity *v1.Affinity) *PodSpecBuilder

WithAffinity adds the affinity to the pod. If initialAffinity is not nil, it is used as the initial value of the pod's affinity. Otherwise, the pod's affinity is initialized to an empty affinity if it is nil.

func (*PodSpecBuilder) WithContainers

func (ps *PodSpecBuilder) WithContainers(containers ...*v1.Container) *PodSpecBuilder

func (*PodSpecBuilder) WithContainersImages

func (ps *PodSpecBuilder) WithContainersImages(images ...string) *PodSpecBuilder

func (*PodSpecBuilder) WithImagePullSecrets

func (ps *PodSpecBuilder) WithImagePullSecrets(imagePullSecrets ...string) *PodSpecBuilder

func (*PodSpecBuilder) WithInitContainersImages

func (ps *PodSpecBuilder) WithInitContainersImages(images ...string) *PodSpecBuilder

func (*PodSpecBuilder) WithNodeAffinity

func (ps *PodSpecBuilder) WithNodeAffinity() *PodSpecBuilder

func (*PodSpecBuilder) WithNodeName

func (ps *PodSpecBuilder) WithNodeName(nodeName string) *PodSpecBuilder

func (*PodSpecBuilder) WithNodeSelectorTerms

func (ps *PodSpecBuilder) WithNodeSelectorTerms(nodeSelectorTerms ...v1.NodeSelectorTerm) *PodSpecBuilder

func (*PodSpecBuilder) WithNodeSelectors

func (ps *PodSpecBuilder) WithNodeSelectors(entries map[string]string) *PodSpecBuilder

func (*PodSpecBuilder) WithPreferredNodeAffinities

func (ps *PodSpecBuilder) WithPreferredNodeAffinities(preferredNodeAffinities ...v1.PreferredSchedulingTerm) *PodSpecBuilder

func (*PodSpecBuilder) WithRequiredDuringSchedulingIgnoredDuringExecution

func (ps *PodSpecBuilder) WithRequiredDuringSchedulingIgnoredDuringExecution() *PodSpecBuilder

func (*PodSpecBuilder) WithRestartPolicy

func (ps *PodSpecBuilder) WithRestartPolicy(restartPolicy v1.RestartPolicy) *PodSpecBuilder

func (*PodSpecBuilder) WithSchedulingGates

func (ps *PodSpecBuilder) WithSchedulingGates(schedulingGates ...string) *PodSpecBuilder

func (*PodSpecBuilder) WithServiceAccountName

func (ps *PodSpecBuilder) WithServiceAccountName(serviceAccountName string) *PodSpecBuilder

func (*PodSpecBuilder) WithVolumes

func (ps *PodSpecBuilder) WithVolumes(volumes ...*v1.Volume) *PodSpecBuilder

type PreferredSchedulingTermBuilder

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

PreferredSchedulingTermBuilder is a builder for v1.NodeSelectorTerm objects to be used only in unit tests.

func NewPreferredSchedulingTerm

func NewPreferredSchedulingTerm() *PreferredSchedulingTermBuilder

NewPreferredSchedulingTerm returns a new PreferredSchedulingTermBuilder to build v1.NodeSelectorTerm objects. It is meant to be used only in unit tests.

func (*PreferredSchedulingTermBuilder) Build

func (*PreferredSchedulingTermBuilder) WithArchitecture

func (p *PreferredSchedulingTermBuilder) WithArchitecture(architecture string) *PreferredSchedulingTermBuilder

func (*PreferredSchedulingTermBuilder) WithCustomKeyValue added in v1.1.1

func (*PreferredSchedulingTermBuilder) WithKeyAndValues

func (p *PreferredSchedulingTermBuilder) WithKeyAndValues(weight int, nodeSelectorTerm v1.NodeSelectorTerm) *PreferredSchedulingTermBuilder

func (*PreferredSchedulingTermBuilder) WithWeight

type PreferredSchedulingTermsBuilder

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

PreferredSchedulingTermsBuilder is a builder for v1.NodeSelectorTerm objects to be used only in unit tests.

func NewPreferredSchedulingTerms

func NewPreferredSchedulingTerms() *PreferredSchedulingTermsBuilder

NewPreferredSchedulingTerms returns a new PreferredSchedulingTermsBuilder to build v1.NodeSelectorTerm objects. It is meant to be used only in unit tests.

func (*PreferredSchedulingTermsBuilder) Build

func (*PreferredSchedulingTermsBuilder) WithArchitectureWeight

func (p *PreferredSchedulingTermsBuilder) WithArchitectureWeight(architecture string, weight int32) *PreferredSchedulingTermsBuilder

func (*PreferredSchedulingTermsBuilder) WithPreferredSchedulingTerm

func (p *PreferredSchedulingTermsBuilder) WithPreferredSchedulingTerm(preferredSchedulingTerm *v1.PreferredSchedulingTerm) *PreferredSchedulingTermsBuilder

type RepositoryDigestMirrorsBuilder

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

RepositoryDigestMirrorsBuilder is a builder for ocpoperatorv1alpha1.RepositoryDigestMirrorset objects to be used only in unit tests.

func NewRepositoryDigestMirrors

func NewRepositoryDigestMirrors() *RepositoryDigestMirrorsBuilder

NewRepositoryDigestMirrors returns a new RepositoryDigestMirrorsBuilder to build ocpoperatorv1alpha1.RepositoryDigestMirrorset objects. It is meant to be used only in unit tests.

func (*RepositoryDigestMirrorsBuilder) Build

func (*RepositoryDigestMirrorsBuilder) WithMirrors

func (*RepositoryDigestMirrorsBuilder) WithSource

type RoleBindingBuilder

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

func NewRoleBinding

func NewRoleBinding() *RoleBindingBuilder

NewRoleBinding returns a new RoleBindingBuilder to build rbacv1.RoleBinding objects. It is meant to be used only in unit tests.

func (*RoleBindingBuilder) Build

func (*RoleBindingBuilder) WithName

func (c *RoleBindingBuilder) WithName(name string) *RoleBindingBuilder

func (*RoleBindingBuilder) WithNamespace

func (c *RoleBindingBuilder) WithNamespace(namespace string) *RoleBindingBuilder

type RoleBuilder

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

RoleBuilder is a builder for rbacv1.ClusterRole objects to be used only in unit tests.

func NewRole

func NewRole() *RoleBuilder

NewRole returns a new ClusterRoleBuilder to build rbacv1.ClusterRole objects. It is meant to be used only in unit tests.

func (*RoleBuilder) Build

func (c *RoleBuilder) Build() *rbacv1.Role

func (*RoleBuilder) WithName

func (c *RoleBuilder) WithName(name string) *RoleBuilder

func (*RoleBuilder) WithNamespace

func (c *RoleBuilder) WithNamespace(namespace string) *RoleBuilder

type SecretBuilder

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

SecretBuilder is a builder for v1.Secret objects to be used only in unit tests.

func NewSecret

func NewSecret() *SecretBuilder

NewSecret returns a new SecretBuilder to build v1.Secret objects. It is meant to be used only in unit tests.

func (*SecretBuilder) Build

func (s *SecretBuilder) Build() *v1.Secret

func (*SecretBuilder) WithData

func (s *SecretBuilder) WithData(entries map[string][]byte) *SecretBuilder

func (*SecretBuilder) WithDockerConfigJSONType added in v1.1.1

func (s *SecretBuilder) WithDockerConfigJSONType() *SecretBuilder

func (*SecretBuilder) WithName

func (s *SecretBuilder) WithName(name string) *SecretBuilder

func (*SecretBuilder) WithNameSpace

func (s *SecretBuilder) WithNameSpace(namespace string) *SecretBuilder

func (*SecretBuilder) WithOpaqueType

func (s *SecretBuilder) WithOpaqueType() *SecretBuilder

func (*SecretBuilder) WithType

func (s *SecretBuilder) WithType(value v1.SecretType) *SecretBuilder

type SecurityContextBuilder

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

SecurityContextBuilder is a builder for v1.SecurityContext objects to be used only in unit tests.

func NewSecurityContext

func NewSecurityContext() *SecurityContextBuilder

NewSecurityContext returns a new SecurityContextBuilder to build v1.SecurityContext objects. It is meant to be used only in unit tests.

func (*SecurityContextBuilder) Build

func (*SecurityContextBuilder) WithPrivileged

func (s *SecurityContextBuilder) WithPrivileged(privileged *bool) *SecurityContextBuilder

func (*SecurityContextBuilder) WithRunAsGroup

func (s *SecurityContextBuilder) WithRunAsGroup(group *int64) *SecurityContextBuilder

func (*SecurityContextBuilder) WithRunAsUSer

func (s *SecurityContextBuilder) WithRunAsUSer(user *int64) *SecurityContextBuilder

func (*SecurityContextBuilder) WithSeccompProfileType

func (s *SecurityContextBuilder) WithSeccompProfileType(seccompProfileType v1.SeccompProfileType) *SecurityContextBuilder

type ServiceAccountBuilder

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

func NewServiceAccount

func NewServiceAccount() *ServiceAccountBuilder

NewServiceAccount returns a new ServiceAccountBuilder to build v1.ServiceAccount objects. It is meant to be used only in unit tests.

func (*ServiceAccountBuilder) Build

func (*ServiceAccountBuilder) WithName

func (*ServiceAccountBuilder) WithNamespace

func (c *ServiceAccountBuilder) WithNamespace(namespace string) *ServiceAccountBuilder

type ServiceBuilder

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

ServiceBuilder is a builder for v1.Service objects to be used only in unit tests.

func NewService

func NewService() *ServiceBuilder

NewService returns a new ServiceBuilder to build v1.Service objects. It is meant to be used only in unit tests.

func (*ServiceBuilder) Build

func (s *ServiceBuilder) Build() *v1.Service

func (*ServiceBuilder) WithName

func (s *ServiceBuilder) WithName(name string) *ServiceBuilder

func (*ServiceBuilder) WithNamespace

func (s *ServiceBuilder) WithNamespace(namespace string) *ServiceBuilder

func (*ServiceBuilder) WithPorts

func (s *ServiceBuilder) WithPorts(values ...*v1.ServicePort) *ServiceBuilder

func (*ServiceBuilder) WithSelector

func (s *ServiceBuilder) WithSelector(entries map[string]string) *ServiceBuilder

type ServicePortBuilder

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

ServicePortBuilder is a builder for v1.ServicePort objects to be used only in unit tests.

func NewServicePort

func NewServicePort() *ServicePortBuilder

NewServicePort returns a new ServicePortBuilder to build v1.ServicePort objects. It is meant to be used only in unit tests.

func (*ServicePortBuilder) Build

func (s *ServicePortBuilder) Build() *v1.ServicePort

func (*ServicePortBuilder) WithPort

func (s *ServicePortBuilder) WithPort(value int32) *ServicePortBuilder

func (*ServicePortBuilder) WithProtocol

func (s *ServicePortBuilder) WithProtocol(value v1.Protocol) *ServicePortBuilder

func (*ServicePortBuilder) WithTCPProtocol

func (s *ServicePortBuilder) WithTCPProtocol() *ServicePortBuilder

func (*ServicePortBuilder) WithTargetPort

func (s *ServicePortBuilder) WithTargetPort(value int32) *ServicePortBuilder

type StatefulSetBuilder

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

StatefulSetBuilder is a builder for appsv1.StatefulSet objects to be used only in unit tests.

func NewStatefulSet

func NewStatefulSet() *StatefulSetBuilder

NewStatefulSet returns a new StatefulSetBuilder to build appsv1.StatefulSet objects. It is meant to be used only in unit tests.

func (*StatefulSetBuilder) Build

func (*StatefulSetBuilder) WithName

func (s *StatefulSetBuilder) WithName(name string) *StatefulSetBuilder

func (*StatefulSetBuilder) WithNamespace

func (s *StatefulSetBuilder) WithNamespace(namespace string) *StatefulSetBuilder

func (*StatefulSetBuilder) WithPodSpec

func (*StatefulSetBuilder) WithReplicas

func (s *StatefulSetBuilder) WithReplicas(num *int32) *StatefulSetBuilder

func (*StatefulSetBuilder) WithSelectorAndPodLabels

func (s *StatefulSetBuilder) WithSelectorAndPodLabels(entries map[string]string) *StatefulSetBuilder

type SubjectBuilder

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

SubjectBuilder is a builder for v1.Subject objects to be used only in unit tests.

func NewSubject

func NewSubject() *SubjectBuilder

NewSubject returns a new DeploymentBuilder to build v1.Subject objects. It is meant to be used only in unit tests.

func (*SubjectBuilder) Build

func (s *SubjectBuilder) Build() *v1.Subject

func (*SubjectBuilder) WithKind

func (s *SubjectBuilder) WithKind(kind string) *SubjectBuilder

func (*SubjectBuilder) WithName

func (s *SubjectBuilder) WithName(name string) *SubjectBuilder

func (*SubjectBuilder) WithNamespace

func (s *SubjectBuilder) WithNamespace(namespace string) *SubjectBuilder

type VolumeBuilder

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

VolumeBuilder is a builder for v1.Volume objects to be used only in unit tests.

func NewVolume

func NewVolume() *VolumeBuilder

NewVolume returns a new VolumeBuilder to build v1.Volume objects. It is meant to be used only in unit tests.

func (*VolumeBuilder) Build

func (v *VolumeBuilder) Build() *v1.Volume

func (*VolumeBuilder) WithName

func (v *VolumeBuilder) WithName(name string) *VolumeBuilder

func (*VolumeBuilder) WithVolumeEmptyDir

func (v *VolumeBuilder) WithVolumeEmptyDir(value *v1.EmptyDirVolumeSource) *VolumeBuilder

func (*VolumeBuilder) WithVolumeProjectedDefaultMode

func (v *VolumeBuilder) WithVolumeProjectedDefaultMode(value *int32) *VolumeBuilder

func (*VolumeBuilder) WithVolumeProjectedSourcesSecretLocalObjectReference

func (v *VolumeBuilder) WithVolumeProjectedSourcesSecretLocalObjectReference(names ...string) *VolumeBuilder

func (*VolumeBuilder) WithVolumeSourceConfigmap

func (v *VolumeBuilder) WithVolumeSourceConfigmap(name string, values ...v1.KeyToPath) *VolumeBuilder

func (*VolumeBuilder) WithVolumeSourceHostPath

func (v *VolumeBuilder) WithVolumeSourceHostPath(path string, pathType *v1.HostPathType) *VolumeBuilder

type VolumeMountBuilder

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

VolumeMountBuilder is a builder for v1.VolumeMount objects to be used only in unit tests.

func NewVolumeMount

func NewVolumeMount() *VolumeMountBuilder

NewVolumeMount returns a new VolumeMountBuilder to build v1.VolumeMount objects. It is meant to be used only in unit tests.

func (*VolumeMountBuilder) Build

func (v *VolumeMountBuilder) Build() *v1.VolumeMount

func (*VolumeMountBuilder) WithMountPath

func (v *VolumeMountBuilder) WithMountPath(path string) *VolumeMountBuilder

func (*VolumeMountBuilder) WithName

func (v *VolumeMountBuilder) WithName(name string) *VolumeMountBuilder

func (*VolumeMountBuilder) WithReadOnly

func (v *VolumeMountBuilder) WithReadOnly() *VolumeMountBuilder

Jump to

Keyboard shortcuts

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