Documentation ¶
Index ¶
- Constants
- func AddPMMContainer(cr *api.PerconaServerMongoDB, usersSecretName string, pmmsec corev1.Secret, ...) (corev1.Container, error)
- func CreateResources(r *api.ResourcesSpec) (rr corev1.ResourceRequirements, err error)
- func EntrypointInitContainer(initImageName string) corev1.Container
- func ExternalService(m *api.PerconaServerMongoDB, replset *api.ReplsetSpec, podName string) *corev1.Service
- func GetAddr(m *api.PerconaServerMongoDB, pod, replset string) string
- func GetReplsetAddrs(cl client.Client, m *api.PerconaServerMongoDB, replset *api.ReplsetSpec, ...) ([]string, error)
- func InitContainers(cr *api.PerconaServerMongoDB, operatorPod corev1.Pod) []corev1.Container
- func InternalKey(cr *api.PerconaServerMongoDB) string
- func MongoHost(cl client.Client, m *api.PerconaServerMongoDB, replset *api.ReplsetSpec, ...) (string, error)
- func MongosDeployment(cr *api.PerconaServerMongoDB) *appsv1.Deployment
- func MongosDeploymentSpec(cr *api.PerconaServerMongoDB, operatorPod corev1.Pod) (appsv1.DeploymentSpec, error)
- func MongosService(cr *api.PerconaServerMongoDB) corev1.Service
- func MongosServiceSpec(cr *api.PerconaServerMongoDB) corev1.ServiceSpec
- func NewStatefulSet(name, namespace string) *appsv1.StatefulSet
- func PMMAgentScript() []corev1.EnvVar
- func PMMContainer(spec api.PMMSpec, secrets string, customLogin bool, clusterName string, ...) corev1.Container
- func PersistentVolumeClaim(name, namespace string, spec *corev1.PersistentVolumeClaimSpec) corev1.PersistentVolumeClaim
- func PodAffinity(cr *api.PerconaServerMongoDB, af *api.PodAffinity, labels map[string]string) *corev1.Affinity
- func PodDisruptionBudget(spec *api.PodDisruptionBudgetSpec, labels map[string]string, namespace string) *policyv1beta1.PodDisruptionBudget
- func Service(m *api.PerconaServerMongoDB, replset *api.ReplsetSpec) *corev1.Service
- func StatefulSpec(m *api.PerconaServerMongoDB, replset *api.ReplsetSpec, containerName string, ...) (appsv1.StatefulSetSpec, error)
- type ServiceAddr
Constants ¶
const ( // MongodDataVolClaimName is a PVC Claim name MongodDataVolClaimName = "mongod-data" // MongodContainerDataDir is a mondo data path in container MongodContainerDataDir = "/data/db" EncryptionKeyName = "encryption-key" )
const ( PMMUserKey = "PMM_SERVER_USER" PMMPasswordKey = "PMM_SERVER_PASSWORD" )
Variables ¶
This section is empty.
Functions ¶
func AddPMMContainer ¶ added in v1.6.0
func AddPMMContainer(cr *api.PerconaServerMongoDB, usersSecretName string, pmmsec corev1.Secret, customAdminParams string) (corev1.Container, error)
AddPMMContainer creates the container object for a pmm-client
func CreateResources ¶
func CreateResources(r *api.ResourcesSpec) (rr corev1.ResourceRequirements, err error)
func EntrypointInitContainer ¶ added in v1.5.0
func ExternalService ¶
func ExternalService(m *api.PerconaServerMongoDB, replset *api.ReplsetSpec, podName string) *corev1.Service
ExternalService returns a Service object needs to serve external connections
func GetAddr ¶ added in v1.6.0
func GetAddr(m *api.PerconaServerMongoDB, pod, replset string) string
GetAddr returns replicaSet pod address in cluster
func GetReplsetAddrs ¶ added in v1.4.0
func GetReplsetAddrs(cl client.Client, m *api.PerconaServerMongoDB, replset *api.ReplsetSpec, pods []corev1.Pod) ([]string, error)
GetReplsetAddrs returns a slice of replset host:port addresses
func InitContainers ¶ added in v1.6.0
func InternalKey ¶ added in v1.6.0
func InternalKey(cr *api.PerconaServerMongoDB) string
func MongoHost ¶ added in v1.4.0
func MongoHost(cl client.Client, m *api.PerconaServerMongoDB, replset *api.ReplsetSpec, pod corev1.Pod) (string, error)
MongoHost returns the mongo host for given pod
func MongosDeployment ¶ added in v1.6.0
func MongosDeployment(cr *api.PerconaServerMongoDB) *appsv1.Deployment
func MongosDeploymentSpec ¶ added in v1.6.0
func MongosDeploymentSpec(cr *api.PerconaServerMongoDB, operatorPod corev1.Pod) (appsv1.DeploymentSpec, error)
func MongosService ¶ added in v1.6.0
func MongosService(cr *api.PerconaServerMongoDB) corev1.Service
func MongosServiceSpec ¶ added in v1.6.0
func MongosServiceSpec(cr *api.PerconaServerMongoDB) corev1.ServiceSpec
func NewStatefulSet ¶
func NewStatefulSet(name, namespace string) *appsv1.StatefulSet
NewStatefulSet returns a StatefulSet object configured for a name
func PMMAgentScript ¶ added in v1.6.0
func PMMContainer ¶
func PMMContainer(spec api.PMMSpec, secrets string, customLogin bool, clusterName string, v120OrGreater bool, v160OrGreater bool, customAdminParams string) corev1.Container
PMMContainer returns a pmm container from given spec
func PersistentVolumeClaim ¶
func PersistentVolumeClaim(name, namespace string, spec *corev1.PersistentVolumeClaimSpec) corev1.PersistentVolumeClaim
PersistentVolumeClaim returns a Persistent Volume Claims for Mongod pod
func PodAffinity ¶
func PodAffinity(cr *api.PerconaServerMongoDB, af *api.PodAffinity, labels map[string]string) *corev1.Affinity
PodAffinity returns podAffinity options for the pod
func PodDisruptionBudget ¶
func PodDisruptionBudget(spec *api.PodDisruptionBudgetSpec, labels map[string]string, namespace string) *policyv1beta1.PodDisruptionBudget
func Service ¶
func Service(m *api.PerconaServerMongoDB, replset *api.ReplsetSpec) *corev1.Service
Service returns a core/v1 API Service
func StatefulSpec ¶
func StatefulSpec(m *api.PerconaServerMongoDB, replset *api.ReplsetSpec, containerName string, ls map[string]string, multiAZ api.MultiAZ, size int32, ikeyName string, initContainers []corev1.Container) (appsv1.StatefulSetSpec, error)
StatefulSpec returns spec for stateful set TODO: Unify Arbiter and Node. Shoudn't be 100500 parameters
Types ¶
type ServiceAddr ¶
func GetServiceAddr ¶
func (ServiceAddr) String ¶
func (s ServiceAddr) String() string