controller

package
v0.0.0-...-ac4f492 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Export    = "export"
	SelectAll = -999
	SpecHash  = "etcd-operator/spec-hash"
)
View Source
const (
	PortClientName = "client"
)

Variables

This section is empty.

Functions

func AddSuffix

func AddSuffix(a string, arr ...string) string

func ExportSvcLabel

func ExportSvcLabel(meta metav1.ObjectMeta, id int) map[string]string

func Inject

func Inject(cli client.Client, scheme *runtime.Scheme, cr *v1.Etcd, log *zap.SugaredLogger, cfg conf.Config) *controller

func MemberLabel

func MemberLabel(meta metav1.ObjectMeta, id int) map[string]string

func MergeLabels

func MergeLabels(allLabels ...map[string]string) map[string]string

MergeLabels merges all the label maps received as argument into a single new label map.

Types

type ResourceBuilder

type ResourceBuilder struct {
	// contains filtered or unexported fields
}

func NewResourceBuilder

func NewResourceBuilder(cr *dbv1.Etcd) *ResourceBuilder

func (*ResourceBuilder) EmptyDirVolume

func (s *ResourceBuilder) EmptyDirVolume(name string) corev1.Volume

func (*ResourceBuilder) Env

func (s *ResourceBuilder) Env() []corev1.EnvVar

func (*ResourceBuilder) ExportService

func (s *ResourceBuilder) ExportService(name string, labels, selector map[string]string) *corev1.Service

func (*ResourceBuilder) HeadlessService

func (s *ResourceBuilder) HeadlessService(name string, labels, selector map[string]string) *corev1.Service

func (*ResourceBuilder) PVC

func (s *ResourceBuilder) PVC(name, storage string) *corev1.PersistentVolumeClaim

func (*ResourceBuilder) StatefulSet

func (s *ResourceBuilder) StatefulSet(labels map[string]string) *appv1.StatefulSet

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL