Documentation ¶
Overview ¶
Package constructors provides functions to prepare new objects (as described by the name of the function) This implements factory pattern.
Index ¶
- func AddPVCToPod(pod *apiv1.Pod, pvc *apiv1.PersistentVolumeClaim)
- func CapabilityObjectList(capList []string) []apiv1.Capability
- func DefaultContainerSecurityContext() *apiv1.SecurityContext
- func DefaultEntrypoint() []string
- func DefaultPodSecurityContext() *apiv1.PodSecurityContext
- func DynamicPersistentVolumeClaim(baseName, namespace, storageClass string) *apiv1.PersistentVolumeClaim
- func PodSpec(baseName, namespace, image string) *apiv1.Pod
- type PersistentVolumeClaimConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPVCToPod ¶
func AddPVCToPod(pod *apiv1.Pod, pvc *apiv1.PersistentVolumeClaim)
AddPVCToPod adds a PersistentVolumeClaim to a Pod
func CapabilityObjectList ¶
func CapabilityObjectList(capList []string) []apiv1.Capability
CapabilityObjectList converts a list of strings into a list of capability objects
func DefaultContainerSecurityContext ¶
func DefaultContainerSecurityContext() *apiv1.SecurityContext
DefaultContainerSecurityContext returns an SC with the drop capabilities specified in config vars
func DefaultEntrypoint ¶
func DefaultEntrypoint() []string
DefaultEntrypoint is used by all default pods
func DefaultPodSecurityContext ¶
func DefaultPodSecurityContext() *apiv1.PodSecurityContext
DefaultPodSecurityContext returns a basic PSC
func DynamicPersistentVolumeClaim ¶
func DynamicPersistentVolumeClaim(baseName, namespace, storageClass string) *apiv1.PersistentVolumeClaim
DynamicPersistentVolumeClaim constructs a simple Dynamic PersistentVolumeClaim
Types ¶
type PersistentVolumeClaimConfig ¶
type PersistentVolumeClaimConfig struct { Name string // Name of the PVC. If set, overrides NamePrefix NamePrefix string // NamePrefix defaults to "pvc-" if unspecified ClaimSize string // ClaimSize must be specified in the Quantity format. Defaults to 2Gi if unspecified AccessModes []apiv1.PersistentVolumeAccessMode // AccessModes defaults to RWO if unspecified Annotations map[string]string Selector *metav1.LabelSelector StorageClassName *string VolumeMode *apiv1.PersistentVolumeMode // VolumeMode defaults to nil if unspecified or specified as the empty string }
PersistentVolumeClaimConfig holds the state of the PVC
Click to show internal directories.
Click to hide internal directories.