Documentation ¶
Index ¶
- Constants
- Variables
- func BuildDefaultVolumes() []corev1.VolumeMount
- func GenJvmHeapSize(mem string) (string, string)
- func GetDataVolume(rf *cachev1alpha1.Workload) *corev1.Volume
- func GetExporterImage(rf *cachev1alpha1.Workload) string
- func GetStatefulSet(c k8s.Client, w *cachev1alpha1.Workload, label map[string]string, ...) (*appsv1.StatefulSet, *appsv1.StatefulSet, error)
- func InitContainerVolumeMount(v cm.SharedVolume) corev1.VolumeMount
- func InitContainerVolumeMounts(v cm.SharedVolumeArray) []corev1.VolumeMount
- func IsUpgradeStsResource(expectSts *appsv1.StatefulSet, actualSts *appsv1.StatefulSet) bool
- func NewPrepareFSInitContainer(imageName string) (corev1.Container, error)
- func NewStatefulSet(name, namespace string) *appsv1.StatefulSet
- func PodAffinity(af *cachev1alpha1.PodAffinity, labels map[string]string) *corev1.Affinity
- type STS
Constants ¶
View Source
const ( // EnvPodName and EnvPodIP are injected as env var into the ZK pod at runtime, // to be referenced in ZK configuration file EnvPodName = "POD_NAME" EnvPodIP = "POD_IP" )
View Source
const (
// prepareFilesystemContainerName is the name of the container that prepares the filesystem
PrepareFilesystemContainerName = "zookeeper-internal-init-filesystem"
)
Variables ¶
View Source
var ( // PodDownwardEnvVars inject the runtime Pod Name and IP as environment variables. PodDownwardEnvVars = []corev1.EnvVar{ {Name: EnvPodIP, Value: "", ValueFrom: &corev1.EnvVarSource{ FieldRef: &corev1.ObjectFieldSelector{APIVersion: "v1", FieldPath: "status.podIP"}, }}, {Name: EnvPodName, Value: "", ValueFrom: &corev1.EnvVarSource{ FieldRef: &corev1.ObjectFieldSelector{APIVersion: "v1", FieldPath: "metadata.name"}, }}, } )
Functions ¶
func BuildDefaultVolumes ¶
func BuildDefaultVolumes() []corev1.VolumeMount
func GetDataVolume ¶
func GetDataVolume(rf *cachev1alpha1.Workload) *corev1.Volume
func GetExporterImage ¶
func GetExporterImage(rf *cachev1alpha1.Workload) string
func GetStatefulSet ¶
func GetStatefulSet(c k8s.Client, w *cachev1alpha1.Workload, label map[string]string, scheme *runtime.Scheme, ) (*appsv1.StatefulSet, *appsv1.StatefulSet, error)
func InitContainerVolumeMount ¶
func InitContainerVolumeMount(v cm.SharedVolume) corev1.VolumeMount
func InitContainerVolumeMounts ¶
func InitContainerVolumeMounts(v cm.SharedVolumeArray) []corev1.VolumeMount
func IsUpgradeStsResource ¶
func IsUpgradeStsResource(expectSts *appsv1.StatefulSet, actualSts *appsv1.StatefulSet) bool
func NewStatefulSet ¶
func NewStatefulSet(name, namespace string) *appsv1.StatefulSet
NewStatefulSet returns a StatefulSet object configured for a name
func PodAffinity ¶
func PodAffinity(af *cachev1alpha1.PodAffinity, labels map[string]string) *corev1.Affinity
PodAffinity returns podAffinity options for the pod
Types ¶
type STS ¶
type STS struct { Workload *cachev1alpha1.Workload Labels map[string]string }
func (*STS) CreateAgentContainer ¶
func (r *STS) CreateAgentContainer(vm corev1.VolumeMount) corev1.Container
func (*STS) CreateExporterContainer ¶
func (r *STS) CreateExporterContainer(rf *cachev1alpha1.Workload) corev1.Container
func (*STS) GenerateStatefulset ¶
func (s *STS) GenerateStatefulset() (*appsv1.StatefulSet, error)
Click to show internal directories.
Click to hide internal directories.