Documentation ¶
Index ¶
- func ConfigMapVolumeMounts(xstore *polardbxv1.XStore) []corev1.VolumeMount
- func ConfigMapVolumes(xstore *polardbxv1.XStore) []corev1.Volume
- func NewConfigConfigMap(rc *reconcile.Context, xstore *polardbxv1.XStore, engine string) (*corev1.ConfigMap, error)
- func NewHeadlessService(xstore *polardbxv1.XStore, podName string) *corev1.Service
- func NewPod(rc *reconcile.Context, xstore *polardbxv1.XStore, ...) (*corev1.Pod, error)
- func NewSecret(xstore *polardbxv1.XStore) *corev1.Secret
- func NewTaskConfigMap(xstore *polardbxv1.XStore) *corev1.ConfigMap
- func PatchNodeTemplate(origin *polardbxv1xstore.NodeTemplate, overlay *polardbxv1xstore.NodeTemplate, ...) *polardbxv1xstore.NodeTemplate
- func SystemEnvs() []corev1.EnvVar
- func SystemVolumeMounts() []corev1.VolumeMount
- func SystemVolumes() []corev1.Volume
- type DefaultExtraPodFactory
- func (f *DefaultExtraPodFactory) Command(ctx *PodFactoryContext, container string) []string
- func (f *DefaultExtraPodFactory) ExtraAnnotations(ctx *PodFactoryContext) map[string]string
- func (f *DefaultExtraPodFactory) ExtraLabels(ctx *PodFactoryContext) map[string]string
- func (f *DefaultExtraPodFactory) NewAffinity(ctx *PodFactoryContext) *corev1.Affinity
- func (f *DefaultExtraPodFactory) NewEnvs(ctx *PodFactoryContext) (map[string][]corev1.EnvVar, error)
- func (f *DefaultExtraPodFactory) NewPorts(ctx *PodFactoryContext, allocated map[string]int) (map[string][]corev1.ContainerPort, error)
- func (f *DefaultExtraPodFactory) NewProbes(ctx *PodFactoryContext, container string) *ProbeSpec
- func (f *DefaultExtraPodFactory) NewResources(ctx *PodFactoryContext, container string) corev1.ResourceRequirements
- func (f *DefaultExtraPodFactory) NewVolumeMounts(ctx *PodFactoryContext) (map[string][]corev1.VolumeMount, error)
- func (f *DefaultExtraPodFactory) NewVolumes(ctx *PodFactoryContext, volumes []polardbxv1xstore.HostPathVolume) ([]corev1.Volume, error)
- func (f *DefaultExtraPodFactory) WorkDir(ctx *PodFactoryContext, container string) string
- type ExtraPodFactory
- type PodFactoryContext
- type PodFactoryOptions
- type ProbeSpec
- type TemplateMergePolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigMapVolumeMounts ¶
func ConfigMapVolumeMounts(xstore *polardbxv1.XStore) []corev1.VolumeMount
func ConfigMapVolumes ¶
func ConfigMapVolumes(xstore *polardbxv1.XStore) []corev1.Volume
func NewConfigConfigMap ¶
func NewHeadlessService ¶
func NewHeadlessService(xstore *polardbxv1.XStore, podName string) *corev1.Service
func NewPod ¶
func NewPod(rc *reconcile.Context, xstore *polardbxv1.XStore, nodeSet *polardbxv1xstore.NodeSet, index int, opts PodFactoryOptions) (*corev1.Pod, error)
func NewTaskConfigMap ¶
func NewTaskConfigMap(xstore *polardbxv1.XStore) *corev1.ConfigMap
func PatchNodeTemplate ¶
func PatchNodeTemplate(origin *polardbxv1xstore.NodeTemplate, overlay *polardbxv1xstore.NodeTemplate, overwrite bool) *polardbxv1xstore.NodeTemplate
func SystemEnvs ¶
func SystemVolumeMounts ¶
func SystemVolumeMounts() []corev1.VolumeMount
func SystemVolumes ¶
Types ¶
type DefaultExtraPodFactory ¶
type DefaultExtraPodFactory struct { }
func (*DefaultExtraPodFactory) Command ¶
func (f *DefaultExtraPodFactory) Command(ctx *PodFactoryContext, container string) []string
func (*DefaultExtraPodFactory) ExtraAnnotations ¶
func (f *DefaultExtraPodFactory) ExtraAnnotations(ctx *PodFactoryContext) map[string]string
func (*DefaultExtraPodFactory) ExtraLabels ¶
func (f *DefaultExtraPodFactory) ExtraLabels(ctx *PodFactoryContext) map[string]string
func (*DefaultExtraPodFactory) NewAffinity ¶
func (f *DefaultExtraPodFactory) NewAffinity(ctx *PodFactoryContext) *corev1.Affinity
func (*DefaultExtraPodFactory) NewEnvs ¶
func (f *DefaultExtraPodFactory) NewEnvs(ctx *PodFactoryContext) (map[string][]corev1.EnvVar, error)
func (*DefaultExtraPodFactory) NewPorts ¶
func (f *DefaultExtraPodFactory) NewPorts(ctx *PodFactoryContext, allocated map[string]int) (map[string][]corev1.ContainerPort, error)
func (*DefaultExtraPodFactory) NewProbes ¶
func (f *DefaultExtraPodFactory) NewProbes(ctx *PodFactoryContext, container string) *ProbeSpec
func (*DefaultExtraPodFactory) NewResources ¶
func (f *DefaultExtraPodFactory) NewResources(ctx *PodFactoryContext, container string) corev1.ResourceRequirements
func (*DefaultExtraPodFactory) NewVolumeMounts ¶
func (f *DefaultExtraPodFactory) NewVolumeMounts(ctx *PodFactoryContext) (map[string][]corev1.VolumeMount, error)
func (*DefaultExtraPodFactory) NewVolumes ¶
func (f *DefaultExtraPodFactory) NewVolumes(ctx *PodFactoryContext, volumes []polardbxv1xstore.HostPathVolume) ([]corev1.Volume, error)
func (*DefaultExtraPodFactory) WorkDir ¶
func (f *DefaultExtraPodFactory) WorkDir(ctx *PodFactoryContext, container string) string
type ExtraPodFactory ¶
type ExtraPodFactory interface { NewPorts(ctx *PodFactoryContext, allocated map[string]int) (map[string][]corev1.ContainerPort, error) NewVolumes(ctx *PodFactoryContext, volumes []polardbxv1xstore.HostPathVolume) ([]corev1.Volume, error) NewVolumeMounts(ctx *PodFactoryContext) (map[string][]corev1.VolumeMount, error) NewEnvs(ctx *PodFactoryContext) (map[string][]corev1.EnvVar, error) ExtraLabels(ctx *PodFactoryContext) map[string]string ExtraAnnotations(ctx *PodFactoryContext) map[string]string WorkDir(ctx *PodFactoryContext, container string) string Command(ctx *PodFactoryContext, container string) []string NewProbes(ctx *PodFactoryContext, container string) *ProbeSpec NewResources(ctx *PodFactoryContext, container string) corev1.ResourceRequirements NewAffinity(ctx *PodFactoryContext) *corev1.Affinity }
type PodFactoryContext ¶
type PodFactoryContext struct {
// contains filtered or unexported fields
}
type PodFactoryOptions ¶
type PodFactoryOptions struct { ExtraPodFactory TemplateMergePolicy }
type ProbeSpec ¶
type TemplateMergePolicy ¶
type TemplateMergePolicy int
const ( TemplateMergePolicyOverwrite TemplateMergePolicy = iota TemplateMergePolicyPatch )
Click to show internal directories.
Click to hide internal directories.