psmdb

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const (

	// MongodDataVolClaimName is a PVC Claim name
	MongodDataVolClaimName = "mongod-data"
	// MongodContainerDataDir is a mondo data path in container
	MongodContainerDataDir = "/data/db"

	EncryptionKeyName = "encryption-key"
)
View Source
const (
	PMMUserKey     = "PMM_SERVER_USER"
	PMMPasswordKey = "PMM_SERVER_PASSWORD"
)

Variables

This section is empty.

Functions

func CreateResources

func CreateResources(r *api.ResourcesSpec) (rr corev1.ResourceRequirements, err error)

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 NewStatefulSet

func NewStatefulSet(name, namespace string) *appsv1.StatefulSet

NewStatefulSet returns a StatefulSet object configured for a name

func PMMContainer

func PMMContainer(spec api.PMMSpec, secrets string, customLogin bool, clusterName string, v120OrGreater bool) 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(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, sv *version.ServerVersion) (appsv1.StatefulSetSpec, error)

StatefulSpec returns spec for stateful set TODO: Unify Arbiter and Node. Shoudn't be 100500 parameters

Types

type ServiceAddr

type ServiceAddr struct {
	Host string
	Port int
}

func GetServiceAddr

func GetServiceAddr(svc corev1.Service, pod corev1.Pod, cl client.Client) (*ServiceAddr, error)

func (ServiceAddr) String

func (s ServiceAddr) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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