Documentation ¶
Index ¶
- func Apply(funcs ...Modification) func(*appsv1.StatefulSet)
- func CreateOrUpdate(getUpdateCreator GetUpdateCreator, sts appsv1.StatefulSet) error
- func CreateVolumeFromConfigMap(name, sourceName string) corev1.Volume
- func CreateVolumeFromEmptyDir(name string) corev1.Volume
- func CreateVolumeFromSecret(name, sourceName string) corev1.Volume
- func CreateVolumeMount(name, path string, options ...func(*corev1.VolumeMount)) corev1.VolumeMount
- func GetAndUpdate(getUpdater GetUpdater, nsName types.NamespacedName, ...) error
- func IsReady(sts appsv1.StatefulSet, expectedReplicas int) bool
- func New(mods ...Modification) appsv1.StatefulSet
- func WithReadOnly(readonly bool) func(*corev1.VolumeMount)
- func WithSubPath(subPath string) func(*corev1.VolumeMount)
- type Builder
- func (s *Builder) AddVolume(volume corev1.Volume) *Builder
- func (s *Builder) AddVolumeAndMount(containerName string, volumeMountData VolumeMountData) *Builder
- func (s *Builder) AddVolumeClaimTemplates(claims []corev1.PersistentVolumeClaim) *Builder
- func (s *Builder) AddVolumeMount(containerName string, mount corev1.VolumeMount) *Builder
- func (s *Builder) AddVolumeMounts(containerName string, mounts []corev1.VolumeMount) *Builder
- func (s *Builder) AddVolumes(volumes []corev1.Volume) *Builder
- func (s Builder) Build() (appsv1.StatefulSet, error)
- func (s *Builder) SetLabels(labels map[string]string) *Builder
- func (s *Builder) SetMatchLabels(matchLabels map[string]string) *Builder
- func (s *Builder) SetName(name string) *Builder
- func (s *Builder) SetNamespace(namespace string) *Builder
- func (s *Builder) SetOwnerReference(ownerReference []metav1.OwnerReference) *Builder
- func (s *Builder) SetPodTemplateSpec(podTemplateSpec corev1.PodTemplateSpec) *Builder
- func (s *Builder) SetReadinessProbe(probe *corev1.Probe, containerName string) *Builder
- func (s *Builder) SetReplicas(replicas int) *Builder
- func (s *Builder) SetServiceName(serviceName string) *Builder
- func (s *Builder) SetUpdateStrategy(updateStrategyType appsv1.StatefulSetUpdateStrategyType) *Builder
- type Creator
- type Deleter
- type GetUpdateCreateDeleter
- type GetUpdateCreator
- type GetUpdater
- type Getter
- type Modification
- func WithLabels(labels map[string]string) Modification
- func WithMatchLabels(matchLabels map[string]string) Modification
- func WithName(name string) Modification
- func WithNamespace(namespace string) Modification
- func WithOwnerReference(ownerRefs []metav1.OwnerReference) Modification
- func WithPodSpecTemplate(templateFunc func(*corev1.PodTemplateSpec)) Modification
- func WithReplicas(replicas int) Modification
- func WithServiceName(svcName string) Modification
- func WithUpdateStrategyType(strategyType appsv1.StatefulSetUpdateStrategyType) Modification
- func WithVolumeClaim(name string, f func(*corev1.PersistentVolumeClaim)) Modification
- type Updater
- type VolumeMountData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶ added in v0.0.7
func Apply(funcs ...Modification) func(*appsv1.StatefulSet)
func CreateOrUpdate ¶
func CreateOrUpdate(getUpdateCreator GetUpdateCreator, sts appsv1.StatefulSet) error
CreateOrUpdate creates the given StatefulSet if it doesn't exist, or updates it if it does.
func CreateVolumeFromConfigMap ¶ added in v0.0.4
func CreateVolumeFromEmptyDir ¶ added in v0.0.4
func CreateVolumeFromSecret ¶ added in v0.0.4
func CreateVolumeMount ¶ added in v0.0.4
func CreateVolumeMount(name, path string, options ...func(*corev1.VolumeMount)) corev1.VolumeMount
CreateVolumeMount returns a corev1.VolumeMount with options.
func GetAndUpdate ¶
func GetAndUpdate(getUpdater GetUpdater, nsName types.NamespacedName, updateFunc func(*appsv1.StatefulSet)) error
GetAndUpdate applies the provided function to the most recent version of the object
func New ¶ added in v0.0.7
func New(mods ...Modification) appsv1.StatefulSet
func WithReadOnly ¶ added in v0.0.4
func WithReadOnly(readonly bool) func(*corev1.VolumeMount)
WithReadOnly sets the ReadOnly attribute of this VolumeMount
func WithSubPath ¶ added in v0.0.4
func WithSubPath(subPath string) func(*corev1.VolumeMount)
WithSubPath sets the SubPath for this VolumeMount
Types ¶
type Builder ¶ added in v0.0.4
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶ added in v0.0.4
func NewBuilder() *Builder
func (*Builder) AddVolumeAndMount ¶ added in v0.0.4
func (s *Builder) AddVolumeAndMount(containerName string, volumeMountData VolumeMountData) *Builder
func (*Builder) AddVolumeClaimTemplates ¶ added in v0.0.4
func (s *Builder) AddVolumeClaimTemplates(claims []corev1.PersistentVolumeClaim) *Builder
func (*Builder) AddVolumeMount ¶ added in v0.0.4
func (s *Builder) AddVolumeMount(containerName string, mount corev1.VolumeMount) *Builder
func (*Builder) AddVolumeMounts ¶ added in v0.0.4
func (s *Builder) AddVolumeMounts(containerName string, mounts []corev1.VolumeMount) *Builder
func (*Builder) AddVolumes ¶ added in v0.0.4
func (*Builder) SetMatchLabels ¶ added in v0.0.4
func (*Builder) SetNamespace ¶ added in v0.0.4
func (*Builder) SetOwnerReference ¶ added in v0.0.4
func (s *Builder) SetOwnerReference(ownerReference []metav1.OwnerReference) *Builder
func (*Builder) SetPodTemplateSpec ¶ added in v0.0.4
func (s *Builder) SetPodTemplateSpec(podTemplateSpec corev1.PodTemplateSpec) *Builder
func (*Builder) SetReadinessProbe ¶ added in v0.0.4
func (*Builder) SetReplicas ¶ added in v0.0.4
func (*Builder) SetServiceName ¶ added in v0.0.4
func (*Builder) SetUpdateStrategy ¶ added in v0.0.4
func (s *Builder) SetUpdateStrategy(updateStrategyType appsv1.StatefulSetUpdateStrategyType) *Builder
type Creator ¶
type Creator interface {
CreateStatefulSet(sts appsv1.StatefulSet) error
}
type GetUpdateCreateDeleter ¶
type GetUpdateCreator ¶
type GetUpdater ¶
type Getter ¶
type Getter interface {
GetStatefulSet(objectKey client.ObjectKey) (appsv1.StatefulSet, error)
}
type Modification ¶ added in v0.0.7
type Modification func(*appsv1.StatefulSet)
func WithLabels ¶ added in v0.0.7
func WithLabels(labels map[string]string) Modification
func WithMatchLabels ¶ added in v0.0.7
func WithMatchLabels(matchLabels map[string]string) Modification
func WithName ¶ added in v0.0.7
func WithName(name string) Modification
func WithNamespace ¶ added in v0.0.7
func WithNamespace(namespace string) Modification
func WithOwnerReference ¶ added in v0.0.7
func WithOwnerReference(ownerRefs []metav1.OwnerReference) Modification
func WithPodSpecTemplate ¶ added in v0.0.7
func WithPodSpecTemplate(templateFunc func(*corev1.PodTemplateSpec)) Modification
func WithReplicas ¶ added in v0.0.7
func WithReplicas(replicas int) Modification
func WithServiceName ¶ added in v0.0.7
func WithServiceName(svcName string) Modification
func WithUpdateStrategyType ¶ added in v0.0.7
func WithUpdateStrategyType(strategyType appsv1.StatefulSetUpdateStrategyType) Modification
func WithVolumeClaim ¶ added in v0.0.7
func WithVolumeClaim(name string, f func(*corev1.PersistentVolumeClaim)) Modification
type Updater ¶
type Updater interface {
UpdateStatefulSet(sts appsv1.StatefulSet) error
}
Click to show internal directories.
Click to hide internal directories.