Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (*corev1.Pod, error)
- func (b *Builder) WithAnnotations(annotations map[string]string) *Builder
- func (b *Builder) WithAnnotationsNew(annotations map[string]string) *Builder
- func (b *Builder) WithContainerBuilder(containerBuilder *container.Builder) *Builder
- func (b *Builder) WithImagePullSecrets(secrets []corev1.LocalObjectReference) *Builder
- func (b *Builder) WithLabels(labels map[string]string) *Builder
- func (b *Builder) WithName(name string) *Builder
- func (b *Builder) WithNamespace(namespace string) *Builder
- func (b *Builder) WithNodeSelector(nodeselectors map[string]string) *Builder
- func (b *Builder) WithNodeSelectorNew(nodeselectors map[string]string) *Builder
- func (b *Builder) WithRestartPolicy(restartpolicy corev1.RestartPolicy) *Builder
- func (b *Builder) WithServiceAccountName(serviceaccountname string) *Builder
- func (b *Builder) WithTerminationGracePeriodSeconds(gracePeriod int64) *Builder
- func (b *Builder) WithTolerations(tolerations ...corev1.Toleration) *Builder
- func (b *Builder) WithTolerationsNew(tolerations ...corev1.Toleration) *Builder
- func (b *Builder) WithVolumeBuilders(volumeBuilderList []*volume.Builder) *Builder
- type Pod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is the builder object for Pod
func (*Builder) WithAnnotations ¶
WithAnnotations merges existing annotations if any with the ones that are provided here
func (*Builder) WithAnnotationsNew ¶
WithAnnotationsNew resets the annotation field of pod obj with provided arguments
func (*Builder) WithContainerBuilder ¶
WithContainerBuilder adds a container to this pod object.
NOTE:
container details are present in the provided container
builder object
func (*Builder) WithImagePullSecrets ¶
func (b *Builder) WithImagePullSecrets(secrets []corev1.LocalObjectReference) *Builder
WithImagePullSecrets sets the image pull secret for the container
func (*Builder) WithLabels ¶
WithLabels sets the labels field of Pod with provided value
func (*Builder) WithNamespace ¶
WithNamespace sets the Namespace field of Pod with provided value.
func (*Builder) WithNodeSelector ¶
WithNodeSelector merges the nodeselectors if present with the provided arguments
func (*Builder) WithNodeSelectorNew ¶
WithNodeSelectorNew resets the nodeselector field of pod with provided arguments
func (*Builder) WithRestartPolicy ¶
func (b *Builder) WithRestartPolicy(restartpolicy corev1.RestartPolicy) *Builder
WithRestartPolicy sets the restartpolicy field of Pod spec with provided value
func (*Builder) WithServiceAccountName ¶
WithServiceAccountName sets the serviceaccountname field of Pod with provided value
func (*Builder) WithTerminationGracePeriodSeconds ¶
WithTerminationGracePeriodSeconds sets the termination grace period seconds to pod
func (*Builder) WithTolerations ¶
func (b *Builder) WithTolerations(tolerations ...corev1.Toleration) *Builder
WithTolerations merges the existing tolerations with the provided arguments
func (*Builder) WithTolerationsNew ¶
func (b *Builder) WithTolerationsNew(tolerations ...corev1.Toleration) *Builder
WithTolerationsNew sets the tolerations field of pod spec