Documentation ¶
Overview ¶
Package base provides various utility functions regarding base k8s resources used by the sf-operator
Package base provides various utility functions regarding base k8s resources used by the sf-operator
Index ¶
- Variables
- func BusyboxImage() string
- func FluentBitImage(debug bool) string
- func GitServerImage() string
- func HTTPDImage() string
- func IsDeploymentReady(dep *appsv1.Deployment) bool
- func IsDeploymentRolloutDone(obj *appsv1.Deployment) bool
- func IsStatefulSetRolloutDone(obj *appsv1.StatefulSet) bool
- func MariaDBImage() string
- func MkContainer(name string, image string) apiv1.Container
- func MkContainerPort(port int, name string) apiv1.ContainerPort
- func MkDeployment(name string, ns string, image string, extraLabels map[string]string) appsv1.Deployment
- func MkEmptyDirVolume(name string) apiv1.Volume
- func MkEnvVar(env string, value string) apiv1.EnvVar
- func MkEnvVarFromFieldRef(env string, fieldPath string) apiv1.EnvVar
- func MkHTTPSRoute(name string, ns string, host string, serviceName string, path string, port int, ...) apiroutev1.Route
- func MkHeadlessService(name string, ns string, selector string, ports []int32, portName string, ...) apiv1.Service
- func MkHeadlessServicePod(name string, ns string, podName string, ports []int32, portName string, ...) apiv1.Service
- func MkJob(name string, ns string, container apiv1.Container, ...) batchv1.Job
- func MkLiveHTTPProbe(path string, port int) *apiv1.Probe
- func MkLivenessCMDProbe(cmd []string) *apiv1.Probe
- func MkPVC(name string, ns string, storageParams StorageConfig, ...) apiv1.PersistentVolumeClaim
- func MkReadinessCMDProbe(cmd []string) *apiv1.Probe
- func MkReadinessHTTPProbe(path string, port int) *apiv1.Probe
- func MkReadinessTCPProbe(port int) *apiv1.Probe
- func MkSSHKeySecret(name string, namespace string) apiv1.Secret
- func MkSecretEnvVar(env string, secret string, key string) apiv1.EnvVar
- func MkSecretFromFunc(name string, namespace string, getData func() string) apiv1.Secret
- func MkSecurityContext(privileged bool) *apiv1.SecurityContext
- func MkService(name string, ns string, selector string, ports []int32, portName string, ...) apiv1.Service
- func MkServicePod(name string, ns string, podName string, ports []int32, portName string, ...) apiv1.Service
- func MkStartupCMDProbe(cmd []string) *apiv1.Probe
- func MkStartupHTTPProbe(path string, port int) *apiv1.Probe
- func MkStatefulset(name string, ns string, replicas int32, serviceName string, ...) appsv1.StatefulSet
- func MkVolumeCM(volumeName string, configMapRef string) apiv1.Volume
- func MkVolumeSecret(name string, secretName ...string) apiv1.Volume
- func NodeExporterImage() string
- func NodepoolBuilderImage() string
- func NodepoolLauncherImage() string
- func PurgelogsImage() string
- func SSHDImage() string
- func SetContainerLimits(container *apiv1.Container, memRequest resource.Quantity, ...)
- func SetContainerLimitsHighProfile(container *apiv1.Container)
- func SetContainerLimitsLowProfile(container *apiv1.Container)
- func StatsdExporterImage() string
- func UpdateContainerLimit(limits *v1.LimitsSpec, container *apiv1.Container) string
- func ZookeeperImage() string
- func ZuulExecutorImage() string
- func ZuulMergerImage() string
- func ZuulSchedulerImage() string
- func ZuulWebImage() string
- type ContainerImages
- type Image
- type StorageConfig
Constants ¶
This section is empty.
Variables ¶
var DefaultPodSecurityContext = apiv1.PodSecurityContext{ RunAsNonRoot: ptr.To(true), SeccompProfile: &apiv1.SeccompProfile{ Type: "RuntimeDefault", }, }
DefaultPodSecurityContext is the PodSecurityContext used by sf-operator Pods
Functions ¶
func BusyboxImage ¶
func BusyboxImage() string
func FluentBitImage ¶
func GitServerImage ¶
func GitServerImage() string
func HTTPDImage ¶
func HTTPDImage() string
func IsDeploymentReady ¶
func IsDeploymentReady(dep *appsv1.Deployment) bool
func IsDeploymentRolloutDone ¶
func IsDeploymentRolloutDone(obj *appsv1.Deployment) bool
IsDeploymentRolloutDone returns True when the Deployment rollout is over
func IsStatefulSetRolloutDone ¶
func IsStatefulSetRolloutDone(obj *appsv1.StatefulSet) bool
IsStatefulSetRolloutDone returns True when the StatefulSet rollout is over
func MariaDBImage ¶ added in v0.0.27
func MariaDBImage() string
func MkContainer ¶
MkContainer produces a Container with the default settings
func MkContainerPort ¶
func MkContainerPort(port int, name string) apiv1.ContainerPort
MkContainerPort produces a TCP ContainerPort
func MkDeployment ¶
func MkDeployment(name string, ns string, image string, extraLabels map[string]string) appsv1.Deployment
MkDeployment produces a Deployment.
func MkEmptyDirVolume ¶
MkEmptyDirVolume produces a EmptyDir Volume
func MkHTTPSRoute ¶
func MkHTTPSRoute( name string, ns string, host string, serviceName string, path string, port int, extraLabels map[string]string) apiroutev1.Route
MkHTTPSRoute produces a Route on top of a Service
func MkHeadlessService ¶
func MkHeadlessService(name string, ns string, selector string, ports []int32, portName string, extraLabels map[string]string) apiv1.Service
MkHeadlessService produces a headless service.
func MkHeadlessServicePod ¶
func MkHeadlessServicePod(name string, ns string, podName string, ports []int32, portName string, extraLabels map[string]string) apiv1.Service
MkHeadlessServicePod produces a headless service.
func MkJob ¶
func MkJob(name string, ns string, container apiv1.Container, extraLabels map[string]string) batchv1.Job
MkJob produces a Job
func MkLivenessCMDProbe ¶
func MkPVC ¶
func MkPVC(name string, ns string, storageParams StorageConfig, accessMode apiv1.PersistentVolumeAccessMode) apiv1.PersistentVolumeClaim
MkPVC produces PerssistentVolumeClaim
func MkReadinessCMDProbe ¶
func MkReadinessTCPProbe ¶
func MkSSHKeySecret ¶
MkSSHKeySecret produces a Secret storing a SSH Key pair
func MkSecretEnvVar ¶
MkSecretEnvVar produces an EnvVar from a Secret's key. When the 'key' parameter is empty the key name is the Secret name
func MkSecretFromFunc ¶
MkSecretFromFunc produces a Secret where data is the result of getData
func MkSecurityContext ¶
func MkSecurityContext(privileged bool) *apiv1.SecurityContext
MkSecurityContext produces a SecurityContext
func MkService ¶
func MkService(name string, ns string, selector string, ports []int32, portName string, extraLabels map[string]string) apiv1.Service
MkService produces a Service
func MkServicePod ¶
func MkServicePod(name string, ns string, podName string, ports []int32, portName string, extraLabels map[string]string) apiv1.Service
MkServicePod produces a Service that target a single Pod by name
func MkStartupCMDProbe ¶
func MkStatefulset ¶
func MkStatefulset( name string, ns string, replicas int32, serviceName string, container apiv1.Container, pvc apiv1.PersistentVolumeClaim, extraLabels map[string]string) appsv1.StatefulSet
MkStatefulset produces a StatefulSet.
func MkVolumeCM ¶
MkVolumeCM produce a Volume from a ConfigMap
func MkVolumeSecret ¶
MkVolumeSecret produces a Volume from a Secret source When the secretName var is not set then Secret name is the same as the Volume name
func NodeExporterImage ¶
func NodeExporterImage() string
func NodepoolBuilderImage ¶
func NodepoolBuilderImage() string
func NodepoolLauncherImage ¶
func NodepoolLauncherImage() string
func PurgelogsImage ¶ added in v0.0.27
func PurgelogsImage() string
func SetContainerLimits ¶ added in v0.0.29
func SetContainerLimits(container *apiv1.Container, memRequest resource.Quantity, memLimit resource.Quantity, cpuRequest resource.Quantity, cpuLimit resource.Quantity)
SetContainerLimits sets the Resource limit according to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
func SetContainerLimitsHighProfile ¶ added in v0.0.29
func SetContainerLimitsLowProfile ¶ added in v0.0.29
func StatsdExporterImage ¶
func StatsdExporterImage() string
func UpdateContainerLimit ¶ added in v0.0.29
func UpdateContainerLimit(limits *v1.LimitsSpec, container *apiv1.Container) string
func ZookeeperImage ¶
func ZookeeperImage() string
func ZuulExecutorImage ¶ added in v0.0.27
func ZuulExecutorImage() string
func ZuulMergerImage ¶ added in v0.0.27
func ZuulMergerImage() string
func ZuulSchedulerImage ¶ added in v0.0.27
func ZuulSchedulerImage() string
func ZuulWebImage ¶ added in v0.0.27
func ZuulWebImage() string
Types ¶
type ContainerImages ¶ added in v0.0.27
type ContainerImages struct {
Images []Image `yaml:"images"`
}