Documentation
¶
Index ¶
- Constants
- func AppendKeyfileToKeyfolder(ctx context.Context, cachedStatus inspectorInterface.Inspector, ...) error
- func ArangodbInternalExporterContainer(image string, args []string, livenessProbe *probes.HTTPProbeConfig, ...) (core.Container, error)
- func ChecksumArangoPod(groupSpec api.ServerGroupSpec, pod *core.Pod) (string, error)
- func CreateArangoDVolumes(status api.MemberStatus, input pod.Input, spec api.DeploymentSpec, ...) pod.Volumes
- func CreateArangoPod(ctx context.Context, c generic.ModClient[*core.Pod], ...) (string, types.UID, error)
- func CreatePodFromTemplate(p *core.PodTemplateSpec) *core.Pod
- func CreatePodSuffix(spec api.DeploymentSpec) string
- func CreatePodTolerations(mode api.DeploymentMode, group api.ServerGroup) []core.Toleration
- func CreateServerServicePort() core.ServicePort
- func CreateServerServicePortsWithSidecars(amInspector generic.Inspector[*api.ArangoMember], am string) []core.ServicePort
- func GetCASecretName(apiObject k8sutil.APIObject) string
- func GetGatewayConfigMapName(name string, parts ...string) string
- func IsServerProgressAvailable(group api.ServerGroup, imageInfo api.ImageInfo) bool
- func LabelsForExporterServiceMonitor(name string, obj deploymentApi.DeploymentSpec) map[string]string
- func LabelsForExporterServiceMonitorSelector(name string) map[string]string
- func PDBNameForGroup(depl string, group api.ServerGroup) string
- func RenderArangoPod(ctx context.Context, cachedStatus inspectorInterface.Inspector, ...) (*core.Pod, error)
- type ArangoDContainer
- func (a *ArangoDContainer) GetCommand() ([]string, error)
- func (a *ArangoDContainer) GetEnvs() ([]core.EnvVar, []core.EnvFromSource)
- func (a *ArangoDContainer) GetExecutor() string
- func (a *ArangoDContainer) GetImage() string
- func (a *ArangoDContainer) GetImagePullPolicy() core.PullPolicy
- func (a *ArangoDContainer) GetLifecycle() (*core.Lifecycle, error)
- func (a *ArangoDContainer) GetName() string
- func (a *ArangoDContainer) GetPorts() []core.ContainerPort
- func (a *ArangoDContainer) GetProbes() (*core.Probe, *core.Probe, *core.Probe, error)
- func (a *ArangoDContainer) GetResourceRequirements() core.ResourceRequirements
- func (a *ArangoDContainer) GetSecurityContext() *core.SecurityContext
- func (a *ArangoDContainer) GetVolumeMounts() []core.VolumeMount
- type ArangoGatewayContainer
- func (a *ArangoGatewayContainer) GetCommand() ([]string, error)
- func (a *ArangoGatewayContainer) GetEnvs() ([]core.EnvVar, []core.EnvFromSource)
- func (a *ArangoGatewayContainer) GetExecutor() string
- func (a *ArangoGatewayContainer) GetImage() string
- func (a *ArangoGatewayContainer) GetImagePullPolicy() core.PullPolicy
- func (a *ArangoGatewayContainer) GetLifecycle() (*core.Lifecycle, error)
- func (a *ArangoGatewayContainer) GetName() string
- func (a *ArangoGatewayContainer) GetPorts() []core.ContainerPort
- func (a *ArangoGatewayContainer) GetProbes() (*core.Probe, *core.Probe, *core.Probe, error)
- func (a *ArangoGatewayContainer) GetResourceRequirements() core.ResourceRequirements
- func (a *ArangoGatewayContainer) GetSecurityContext() *core.SecurityContext
- func (a *ArangoGatewayContainer) GetVolumeMounts() []core.VolumeMount
- type ArangoSyncContainer
- func (a *ArangoSyncContainer) GetCommand() ([]string, error)
- func (a *ArangoSyncContainer) GetEnvs() ([]core.EnvVar, []core.EnvFromSource)
- func (a *ArangoSyncContainer) GetExecutor() string
- func (a *ArangoSyncContainer) GetImage() string
- func (a *ArangoSyncContainer) GetImagePullPolicy() core.PullPolicy
- func (a *ArangoSyncContainer) GetLifecycle() (*core.Lifecycle, error)
- func (a *ArangoSyncContainer) GetName() string
- func (a *ArangoSyncContainer) GetPorts() []core.ContainerPort
- func (a *ArangoSyncContainer) GetProbes() (*core.Probe, *core.Probe, *core.Probe, error)
- func (a *ArangoSyncContainer) GetResourceRequirements() core.ResourceRequirements
- func (a *ArangoSyncContainer) GetSecurityContext() *core.SecurityContext
- func (a *ArangoSyncContainer) GetVolumeMounts() []core.VolumeMount
- type ArangoUpgradeContainer
- type ArangoVersionCheckContainer
- type Context
- type EnvBuilder
- type MemberArangoDPod
- func (m *MemberArangoDPod) Annotations() map[string]string
- func (m *MemberArangoDPod) ApplyPodSpec(p *core.PodSpec) error
- func (m *MemberArangoDPod) AsInput() pod.Input
- func (m *MemberArangoDPod) GetContainerCreator() interfaces.ContainerCreator
- func (m *MemberArangoDPod) GetFinalizers() []string
- func (m *MemberArangoDPod) GetImagePullSecrets() []string
- func (m *MemberArangoDPod) GetInitContainers(cachedStatus interfaces.Inspector) ([]core.Container, error)
- func (m *MemberArangoDPod) GetName() string
- func (m *MemberArangoDPod) GetNodeAffinity() *core.NodeAffinity
- func (m *MemberArangoDPod) GetNodeSelector() map[string]string
- func (m *MemberArangoDPod) GetPodAffinity() *core.PodAffinity
- func (m *MemberArangoDPod) GetPodAntiAffinity() *core.PodAntiAffinity
- func (m *MemberArangoDPod) GetRestartPolicy() core.RestartPolicy
- func (m *MemberArangoDPod) GetRole() string
- func (m *MemberArangoDPod) GetServiceAccountName() string
- func (m *MemberArangoDPod) GetSidecars(pod *core.PodTemplateSpec) error
- func (m *MemberArangoDPod) GetTolerations() []core.Toleration
- func (m *MemberArangoDPod) GetVolumes() []core.Volume
- func (m *MemberArangoDPod) Init(_ context.Context, _ interfaces.Inspector, pod *core.PodTemplateSpec) error
- func (m *MemberArangoDPod) IsDeploymentMode() bool
- func (m *MemberArangoDPod) Labels() map[string]string
- func (m *MemberArangoDPod) Profiles() (schedulerApi.ProfileTemplates, error)
- func (m *MemberArangoDPod) Validate(cachedStatus interfaces.Inspector) error
- type MemberGatewayPod
- func (m *MemberGatewayPod) Annotations() map[string]string
- func (m *MemberGatewayPod) ApplyPodSpec(spec *core.PodSpec) error
- func (m *MemberGatewayPod) AsInput() pod.Input
- func (m *MemberGatewayPod) GetContainerCreator() interfaces.ContainerCreator
- func (m *MemberGatewayPod) GetFinalizers() []string
- func (m *MemberGatewayPod) GetImagePullSecrets() []string
- func (m *MemberGatewayPod) GetInitContainers(cachedStatus interfaces.Inspector) ([]core.Container, error)
- func (m *MemberGatewayPod) GetName() string
- func (m *MemberGatewayPod) GetNodeAffinity() *core.NodeAffinity
- func (m *MemberGatewayPod) GetNodeSelector() map[string]string
- func (m *MemberGatewayPod) GetPodAffinity() *core.PodAffinity
- func (m *MemberGatewayPod) GetPodAntiAffinity() *core.PodAntiAffinity
- func (m *MemberGatewayPod) GetRestartPolicy() core.RestartPolicy
- func (m *MemberGatewayPod) GetRole() string
- func (m *MemberGatewayPod) GetServiceAccountName() string
- func (m *MemberGatewayPod) GetSidecars(pod *core.PodTemplateSpec) error
- func (m *MemberGatewayPod) GetTolerations() []core.Toleration
- func (m *MemberGatewayPod) GetVolumes() []core.Volume
- func (m *MemberGatewayPod) Init(ctx context.Context, cachedStatus interfaces.Inspector, ...) error
- func (m *MemberGatewayPod) IsDeploymentMode() bool
- func (m *MemberGatewayPod) Labels() map[string]string
- func (m *MemberGatewayPod) Profiles() (schedulerApi.ProfileTemplates, error)
- func (m *MemberGatewayPod) Validate(cachedStatus interfaces.Inspector) error
- type MemberSyncPod
- func (m *MemberSyncPod) Annotations() map[string]string
- func (m *MemberSyncPod) ApplyPodSpec(spec *core.PodSpec) error
- func (m *MemberSyncPod) GetContainerCreator() interfaces.ContainerCreator
- func (m *MemberSyncPod) GetFinalizers() []string
- func (m *MemberSyncPod) GetImagePullSecrets() []string
- func (m *MemberSyncPod) GetInitContainers(cachedStatus interfaces.Inspector) ([]core.Container, error)
- func (m *MemberSyncPod) GetName() string
- func (m *MemberSyncPod) GetNodeAffinity() *core.NodeAffinity
- func (m *MemberSyncPod) GetNodeSelector() map[string]string
- func (m *MemberSyncPod) GetPodAffinity() *core.PodAffinity
- func (m *MemberSyncPod) GetPodAntiAffinity() *core.PodAntiAffinity
- func (m *MemberSyncPod) GetRestartPolicy() core.RestartPolicy
- func (m *MemberSyncPod) GetRole() string
- func (m *MemberSyncPod) GetServiceAccountName() string
- func (m *MemberSyncPod) GetSidecars(pod *core.PodTemplateSpec) error
- func (m *MemberSyncPod) GetTolerations() []core.Toleration
- func (m *MemberSyncPod) GetVolumes() []core.Volume
- func (m *MemberSyncPod) Init(ctx context.Context, cachedStatus interfaces.Inspector, ...) error
- func (m *MemberSyncPod) IsDeploymentMode() bool
- func (m *MemberSyncPod) Labels() map[string]string
- func (m *MemberSyncPod) Profiles() (schedulerApi.ProfileTemplates, error)
- func (m *MemberSyncPod) Validate(_ interfaces.Inspector) error
- type MetricContainerRestarts
- type MetricMember
- type MetricMemberRestartReason
- type MetricMemberRestarts
- type Metrics
- type PatchFunc
- type Probe
- type Resources
- func (r *Resources) CleanupTerminatedPods(ctx context.Context) (util.Interval, error)
- func (r *Resources) CollectMetrics(m metrics.PushMetric)
- func (r *Resources) CreatePodTolerations(group api.ServerGroup, groupSpec api.ServerGroupSpec) []core.Toleration
- func (r *Resources) EnsureAnnotations(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureArangoMembers(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureArangoProfiles(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureConfigMaps(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureCoreResources(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureLabels(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureLeader(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsurePDBs(ctx context.Context) error
- func (r *Resources) EnsurePVCs(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsurePersistentVolumeClaimsLabels(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsurePodDisruptionBudgetsLabels(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsurePods(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsurePodsLabels(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureResources(ctx context.Context, serviceMonitorEnabled bool, ...) error
- func (r *Resources) EnsureSecretLabels(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureSecrets(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureServiceAccountsLabels(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureServiceMonitor(ctx context.Context, enabled bool) error
- func (r *Resources) EnsureServiceMonitorsLabels(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureServices(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) EnsureServicesLabels(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) GetCertsFromData(caPem []byte) crypto.Certificates
- func (r *Resources) GetCertsFromSecret(secret *core.Secret) crypto.Certificates
- func (r *Resources) InspectPVCs(ctx context.Context, cachedStatus inspectorInterface.Inspector) (util.Interval, error)
- func (r *Resources) InspectPods(ctx context.Context, cachedStatus inspectorInterface.Inspector) (util.Interval, error)
- func (r *Resources) RenderPodForMember(ctx context.Context, acs sutil.ACS, spec api.DeploymentSpec, ...) (*core.Pod, error)
- func (r *Resources) RenderPodTemplateForMember(ctx context.Context, acs sutil.ACS, spec api.DeploymentSpec, ...) (*core.PodTemplateSpec, error)
- func (r *Resources) SelectImage(spec api.DeploymentSpec, status api.DeploymentStatus) (api.ImageInfo, bool)
- func (r *Resources) SelectImageForMember(spec api.DeploymentSpec, status api.DeploymentStatus, member api.MemberStatus) (api.ImageInfo, bool)
- func (r *Resources) SyncMembersInCluster(ctx context.Context, health memberState.Health) error
- func (r *Resources) ValidateSecretHashes(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
- func (r *Resources) WrapLogger(in *zerolog.Event) *zerolog.Event
Constants ¶
const ( ArangoDExecutor = "/usr/sbin/arangod" ArangoDBOverrideDetectedTotalMemoryEnv = "ARANGODB_OVERRIDE_DETECTED_TOTAL_MEMORY" ArangoDBOverrideDetectedNumberOfCoresEnv = "ARANGODB_OVERRIDE_DETECTED_NUMBER_OF_CORES" ArangoDBOverrideServerGroupEnv = "ARANGODB_OVERRIDE_SERVER_GROUP" ArangoDBOverrideDeploymentModeEnv = "ARANGODB_OVERRIDE_DEPLOYMENT_MODE" ArangoDBOverrideVersionEnv = "ARANGODB_OVERRIDE_VERSION" ArangoDBOverrideEnterpriseEnv = "ARANGODB_OVERRIDE_ENTERPRISE" ArangoDBServerPortEnv = "ARANGODB_SERVER_PORT" )
const ( CAKeyName = "ca.key" CACertName = "ca.crt" )
const (
ArangoSyncExecutor string = "/usr/sbin/arangosync"
)
Variables ¶
This section is empty.
Functions ¶
func ArangodbInternalExporterContainer ¶
func ArangodbInternalExporterContainer(image string, args []string, livenessProbe *probes.HTTPProbeConfig, res core.ResourceRequirements, spec api.DeploymentSpec, groupSpec api.ServerGroupSpec) (core.Container, error)
ArangodbInternalExporterContainer creates metrics container based on internal exporter
func ChecksumArangoPod ¶
func CreateArangoDVolumes ¶
func CreateArangoDVolumes(status api.MemberStatus, input pod.Input, spec api.DeploymentSpec, groupSpec api.ServerGroupSpec) pod.Volumes
CreateArangoDVolumes returns wrapper with volumes for a pod and volume mounts for a container.
func CreateArangoPod ¶
func CreateArangoPod(ctx context.Context, c generic.ModClient[*core.Pod], deployment k8sutil.APIObject, deploymentSpec api.DeploymentSpec, group api.ServerGroup, pod *core.Pod) (string, types.UID, error)
CreateArangoPod creates a new Pod with container provided by parameter 'containerCreator' If the pod already exists, nil is returned. If another error occurs, that error is returned.
func CreatePodFromTemplate ¶
func CreatePodFromTemplate(p *core.PodTemplateSpec) *core.Pod
func CreatePodSuffix ¶
func CreatePodSuffix(spec api.DeploymentSpec) string
CreatePodSuffix creates additional string to glue it to the POD name. The suffix is calculated according to the given spec, so it is easily to recognize by name if the pods have the same spec. The additional `postSuffix` can be provided. It can be used to distinguish restarts of POD.
func CreatePodTolerations ¶
func CreatePodTolerations(mode api.DeploymentMode, group api.ServerGroup) []core.Toleration
CreatePodTolerations creates a list of tolerations for a pod created for the given group.
func CreateServerServicePort ¶
func CreateServerServicePort() core.ServicePort
CreateServerServicePort creates main server service port.
func CreateServerServicePortsWithSidecars ¶
func CreateServerServicePortsWithSidecars(amInspector generic.Inspector[*api.ArangoMember], am string) []core.ServicePort
CreateServerServicePortsWithSidecars returns ports for the service.
func GetCASecretName ¶
func GetGatewayConfigMapName ¶
func IsServerProgressAvailable ¶
func IsServerProgressAvailable(group api.ServerGroup, imageInfo api.ImageInfo) bool
IsServerProgressAvailable returns true if server progress is available.
func LabelsForExporterServiceMonitor ¶
func LabelsForExporterServiceMonitor(name string, obj deploymentApi.DeploymentSpec) map[string]string
func PDBNameForGroup ¶
func PDBNameForGroup(depl string, group api.ServerGroup) string
func RenderArangoPod ¶
func RenderArangoPod(ctx context.Context, cachedStatus inspectorInterface.Inspector, deployment k8sutil.APIObject, role, id, podName string, podCreator interfaces.PodCreator) (*core.Pod, error)
RenderArangoPod renders new ArangoD Pod
Types ¶
type ArangoDContainer ¶
type ArangoDContainer struct {
// contains filtered or unexported fields
}
func (*ArangoDContainer) GetCommand ¶
func (a *ArangoDContainer) GetCommand() ([]string, error)
func (*ArangoDContainer) GetEnvs ¶
func (a *ArangoDContainer) GetEnvs() ([]core.EnvVar, []core.EnvFromSource)
GetEnvs returns environment variables for ArangoDB containers.
func (*ArangoDContainer) GetExecutor ¶
func (a *ArangoDContainer) GetExecutor() string
func (*ArangoDContainer) GetImage ¶
func (a *ArangoDContainer) GetImage() string
func (*ArangoDContainer) GetImagePullPolicy ¶
func (a *ArangoDContainer) GetImagePullPolicy() core.PullPolicy
func (*ArangoDContainer) GetLifecycle ¶
func (a *ArangoDContainer) GetLifecycle() (*core.Lifecycle, error)
func (*ArangoDContainer) GetName ¶
func (a *ArangoDContainer) GetName() string
func (*ArangoDContainer) GetPorts ¶
func (a *ArangoDContainer) GetPorts() []core.ContainerPort
func (*ArangoDContainer) GetResourceRequirements ¶
func (a *ArangoDContainer) GetResourceRequirements() core.ResourceRequirements
func (*ArangoDContainer) GetSecurityContext ¶
func (a *ArangoDContainer) GetSecurityContext() *core.SecurityContext
func (*ArangoDContainer) GetVolumeMounts ¶
func (a *ArangoDContainer) GetVolumeMounts() []core.VolumeMount
type ArangoGatewayContainer ¶
type ArangoGatewayContainer struct {
// contains filtered or unexported fields
}
func (*ArangoGatewayContainer) GetCommand ¶
func (a *ArangoGatewayContainer) GetCommand() ([]string, error)
func (*ArangoGatewayContainer) GetEnvs ¶
func (a *ArangoGatewayContainer) GetEnvs() ([]core.EnvVar, []core.EnvFromSource)
func (*ArangoGatewayContainer) GetExecutor ¶
func (a *ArangoGatewayContainer) GetExecutor() string
func (*ArangoGatewayContainer) GetImage ¶
func (a *ArangoGatewayContainer) GetImage() string
func (*ArangoGatewayContainer) GetImagePullPolicy ¶
func (a *ArangoGatewayContainer) GetImagePullPolicy() core.PullPolicy
func (*ArangoGatewayContainer) GetLifecycle ¶
func (a *ArangoGatewayContainer) GetLifecycle() (*core.Lifecycle, error)
func (*ArangoGatewayContainer) GetName ¶
func (a *ArangoGatewayContainer) GetName() string
func (*ArangoGatewayContainer) GetPorts ¶
func (a *ArangoGatewayContainer) GetPorts() []core.ContainerPort
func (*ArangoGatewayContainer) GetResourceRequirements ¶
func (a *ArangoGatewayContainer) GetResourceRequirements() core.ResourceRequirements
func (*ArangoGatewayContainer) GetSecurityContext ¶
func (a *ArangoGatewayContainer) GetSecurityContext() *core.SecurityContext
func (*ArangoGatewayContainer) GetVolumeMounts ¶
func (a *ArangoGatewayContainer) GetVolumeMounts() []core.VolumeMount
type ArangoSyncContainer ¶
type ArangoSyncContainer struct {
// contains filtered or unexported fields
}
func (*ArangoSyncContainer) GetCommand ¶
func (a *ArangoSyncContainer) GetCommand() ([]string, error)
func (*ArangoSyncContainer) GetEnvs ¶
func (a *ArangoSyncContainer) GetEnvs() ([]core.EnvVar, []core.EnvFromSource)
func (*ArangoSyncContainer) GetExecutor ¶
func (a *ArangoSyncContainer) GetExecutor() string
func (*ArangoSyncContainer) GetImage ¶
func (a *ArangoSyncContainer) GetImage() string
func (*ArangoSyncContainer) GetImagePullPolicy ¶
func (a *ArangoSyncContainer) GetImagePullPolicy() core.PullPolicy
func (*ArangoSyncContainer) GetLifecycle ¶
func (a *ArangoSyncContainer) GetLifecycle() (*core.Lifecycle, error)
func (*ArangoSyncContainer) GetName ¶
func (a *ArangoSyncContainer) GetName() string
func (*ArangoSyncContainer) GetPorts ¶
func (a *ArangoSyncContainer) GetPorts() []core.ContainerPort
func (*ArangoSyncContainer) GetResourceRequirements ¶
func (a *ArangoSyncContainer) GetResourceRequirements() core.ResourceRequirements
func (*ArangoSyncContainer) GetSecurityContext ¶
func (a *ArangoSyncContainer) GetSecurityContext() *core.SecurityContext
func (*ArangoSyncContainer) GetVolumeMounts ¶
func (a *ArangoSyncContainer) GetVolumeMounts() []core.VolumeMount
type ArangoUpgradeContainer ¶
type ArangoUpgradeContainer struct { interfaces.ContainerCreator // contains filtered or unexported fields }
ArangoUpgradeContainer can construct ArangoD upgrade container.
func (*ArangoUpgradeContainer) GetCommand ¶
func (a *ArangoUpgradeContainer) GetCommand() ([]string, error)
GetCommand returns list of arguments for the ArangoD upgrade container.
func (*ArangoUpgradeContainer) GetLifecycle ¶
func (a *ArangoUpgradeContainer) GetLifecycle() (*core.Lifecycle, error)
GetLifecycle returns no lifecycle for the ArangoD upgrade container.
func (*ArangoUpgradeContainer) GetName ¶
func (a *ArangoUpgradeContainer) GetName() string
GetName returns the name of the ArangoD upgrade container.
type ArangoVersionCheckContainer ¶
type ArangoVersionCheckContainer struct { interfaces.ContainerCreator // contains filtered or unexported fields }
ArangoVersionCheckContainer can construct ArangoD version check container.
func (*ArangoVersionCheckContainer) GetCommand ¶
func (a *ArangoVersionCheckContainer) GetCommand() ([]string, error)
GetCommand returns list of arguments for the ArangoD version check container.
func (*ArangoVersionCheckContainer) GetLifecycle ¶
func (a *ArangoVersionCheckContainer) GetLifecycle() (*core.Lifecycle, error)
GetLifecycle returns no lifecycle for the ArangoD version check container.
func (*ArangoVersionCheckContainer) GetName ¶
func (a *ArangoVersionCheckContainer) GetName() string
GetName returns the name of the ArangoD version check container.
type Context ¶
type Context interface { reconciler.DeploymentStatusUpdate reconciler.DeploymentAgencyMaintenance reconciler.DeploymentImageManager reconciler.ArangoAgency reconciler.ArangoApplier reconciler.DeploymentGetter reconciler.KubernetesEventGenerator member.StateInspectorGetter sutil.ACSGetter // GetServerGroupIterator returns the deployment as ServerGroupIterator. GetServerGroupIterator() reconciler.ServerGroupIterator // GetOperatorImage returns the image name of operator image GetOperatorImage() string // CreateEvent creates a given event. // On error, the error is logged. CreateEvent(evt *k8sutil.Event) // GetOwnedPVCs returns a list of all PVCs owned by the deployment. GetOwnedPVCs() ([]core.PersistentVolumeClaim, error) // GetBackup receives information about a backup resource GetBackup(ctx context.Context, backup string) (*backupApi.ArangoBackup, error) GetScope() scope.Scope }
Context provides all functions needed by the Resources service to perform its service.
type EnvBuilder ¶
EnvBuilder build environment variables
func (*EnvBuilder) Add ¶
func (e *EnvBuilder) Add(override bool, envs ...core.EnvVar) (modified bool)
Add append or override flag in envs. Flag is value was modified is returned
func (EnvBuilder) GetEnvList ¶
func (e EnvBuilder) GetEnvList() []core.EnvVar
GetEnvList return copy of env list
type MemberArangoDPod ¶
type MemberArangoDPod struct {
// contains filtered or unexported fields
}
func (*MemberArangoDPod) Annotations ¶
func (m *MemberArangoDPod) Annotations() map[string]string
func (*MemberArangoDPod) ApplyPodSpec ¶
func (m *MemberArangoDPod) ApplyPodSpec(p *core.PodSpec) error
func (*MemberArangoDPod) AsInput ¶
func (m *MemberArangoDPod) AsInput() pod.Input
func (*MemberArangoDPod) GetContainerCreator ¶
func (m *MemberArangoDPod) GetContainerCreator() interfaces.ContainerCreator
func (*MemberArangoDPod) GetFinalizers ¶
func (m *MemberArangoDPod) GetFinalizers() []string
func (*MemberArangoDPod) GetImagePullSecrets ¶
func (m *MemberArangoDPod) GetImagePullSecrets() []string
func (*MemberArangoDPod) GetInitContainers ¶
func (m *MemberArangoDPod) GetInitContainers(cachedStatus interfaces.Inspector) ([]core.Container, error)
func (*MemberArangoDPod) GetName ¶
func (m *MemberArangoDPod) GetName() string
func (*MemberArangoDPod) GetNodeAffinity ¶
func (m *MemberArangoDPod) GetNodeAffinity() *core.NodeAffinity
func (*MemberArangoDPod) GetNodeSelector ¶
func (m *MemberArangoDPod) GetNodeSelector() map[string]string
func (*MemberArangoDPod) GetPodAffinity ¶
func (m *MemberArangoDPod) GetPodAffinity() *core.PodAffinity
func (*MemberArangoDPod) GetPodAntiAffinity ¶
func (m *MemberArangoDPod) GetPodAntiAffinity() *core.PodAntiAffinity
func (*MemberArangoDPod) GetRestartPolicy ¶
func (m *MemberArangoDPod) GetRestartPolicy() core.RestartPolicy
func (*MemberArangoDPod) GetRole ¶
func (m *MemberArangoDPod) GetRole() string
func (*MemberArangoDPod) GetServiceAccountName ¶
func (m *MemberArangoDPod) GetServiceAccountName() string
func (*MemberArangoDPod) GetSidecars ¶
func (m *MemberArangoDPod) GetSidecars(pod *core.PodTemplateSpec) error
func (*MemberArangoDPod) GetTolerations ¶
func (m *MemberArangoDPod) GetTolerations() []core.Toleration
func (*MemberArangoDPod) GetVolumes ¶
func (m *MemberArangoDPod) GetVolumes() []core.Volume
func (*MemberArangoDPod) Init ¶
func (m *MemberArangoDPod) Init(_ context.Context, _ interfaces.Inspector, pod *core.PodTemplateSpec) error
func (*MemberArangoDPod) IsDeploymentMode ¶
func (m *MemberArangoDPod) IsDeploymentMode() bool
func (*MemberArangoDPod) Labels ¶
func (m *MemberArangoDPod) Labels() map[string]string
func (*MemberArangoDPod) Profiles ¶
func (m *MemberArangoDPod) Profiles() (schedulerApi.ProfileTemplates, error)
func (*MemberArangoDPod) Validate ¶
func (m *MemberArangoDPod) Validate(cachedStatus interfaces.Inspector) error
type MemberGatewayPod ¶
type MemberGatewayPod struct {
// contains filtered or unexported fields
}
func (*MemberGatewayPod) Annotations ¶
func (m *MemberGatewayPod) Annotations() map[string]string
func (*MemberGatewayPod) ApplyPodSpec ¶
func (m *MemberGatewayPod) ApplyPodSpec(spec *core.PodSpec) error
func (*MemberGatewayPod) AsInput ¶
func (m *MemberGatewayPod) AsInput() pod.Input
func (*MemberGatewayPod) GetContainerCreator ¶
func (m *MemberGatewayPod) GetContainerCreator() interfaces.ContainerCreator
func (*MemberGatewayPod) GetFinalizers ¶
func (m *MemberGatewayPod) GetFinalizers() []string
func (*MemberGatewayPod) GetImagePullSecrets ¶
func (m *MemberGatewayPod) GetImagePullSecrets() []string
func (*MemberGatewayPod) GetInitContainers ¶
func (m *MemberGatewayPod) GetInitContainers(cachedStatus interfaces.Inspector) ([]core.Container, error)
func (*MemberGatewayPod) GetName ¶
func (m *MemberGatewayPod) GetName() string
func (*MemberGatewayPod) GetNodeAffinity ¶
func (m *MemberGatewayPod) GetNodeAffinity() *core.NodeAffinity
func (*MemberGatewayPod) GetNodeSelector ¶
func (m *MemberGatewayPod) GetNodeSelector() map[string]string
func (*MemberGatewayPod) GetPodAffinity ¶
func (m *MemberGatewayPod) GetPodAffinity() *core.PodAffinity
func (*MemberGatewayPod) GetPodAntiAffinity ¶
func (m *MemberGatewayPod) GetPodAntiAffinity() *core.PodAntiAffinity
func (*MemberGatewayPod) GetRestartPolicy ¶
func (m *MemberGatewayPod) GetRestartPolicy() core.RestartPolicy
func (*MemberGatewayPod) GetRole ¶
func (m *MemberGatewayPod) GetRole() string
func (*MemberGatewayPod) GetServiceAccountName ¶
func (m *MemberGatewayPod) GetServiceAccountName() string
func (*MemberGatewayPod) GetSidecars ¶
func (m *MemberGatewayPod) GetSidecars(pod *core.PodTemplateSpec) error
func (*MemberGatewayPod) GetTolerations ¶
func (m *MemberGatewayPod) GetTolerations() []core.Toleration
func (*MemberGatewayPod) GetVolumes ¶
func (m *MemberGatewayPod) GetVolumes() []core.Volume
func (*MemberGatewayPod) Init ¶
func (m *MemberGatewayPod) Init(ctx context.Context, cachedStatus interfaces.Inspector, pod *core.PodTemplateSpec) error
func (*MemberGatewayPod) IsDeploymentMode ¶
func (m *MemberGatewayPod) IsDeploymentMode() bool
func (*MemberGatewayPod) Labels ¶
func (m *MemberGatewayPod) Labels() map[string]string
func (*MemberGatewayPod) Profiles ¶
func (m *MemberGatewayPod) Profiles() (schedulerApi.ProfileTemplates, error)
func (*MemberGatewayPod) Validate ¶
func (m *MemberGatewayPod) Validate(cachedStatus interfaces.Inspector) error
type MemberSyncPod ¶
type MemberSyncPod struct {
// contains filtered or unexported fields
}
func (*MemberSyncPod) Annotations ¶
func (m *MemberSyncPod) Annotations() map[string]string
func (*MemberSyncPod) ApplyPodSpec ¶
func (m *MemberSyncPod) ApplyPodSpec(spec *core.PodSpec) error
func (*MemberSyncPod) GetContainerCreator ¶
func (m *MemberSyncPod) GetContainerCreator() interfaces.ContainerCreator
func (*MemberSyncPod) GetFinalizers ¶
func (m *MemberSyncPod) GetFinalizers() []string
func (*MemberSyncPod) GetImagePullSecrets ¶
func (m *MemberSyncPod) GetImagePullSecrets() []string
func (*MemberSyncPod) GetInitContainers ¶
func (m *MemberSyncPod) GetInitContainers(cachedStatus interfaces.Inspector) ([]core.Container, error)
func (*MemberSyncPod) GetName ¶
func (m *MemberSyncPod) GetName() string
func (*MemberSyncPod) GetNodeAffinity ¶
func (m *MemberSyncPod) GetNodeAffinity() *core.NodeAffinity
func (*MemberSyncPod) GetNodeSelector ¶
func (m *MemberSyncPod) GetNodeSelector() map[string]string
func (*MemberSyncPod) GetPodAffinity ¶
func (m *MemberSyncPod) GetPodAffinity() *core.PodAffinity
func (*MemberSyncPod) GetPodAntiAffinity ¶
func (m *MemberSyncPod) GetPodAntiAffinity() *core.PodAntiAffinity
func (*MemberSyncPod) GetRestartPolicy ¶
func (m *MemberSyncPod) GetRestartPolicy() core.RestartPolicy
func (*MemberSyncPod) GetRole ¶
func (m *MemberSyncPod) GetRole() string
func (*MemberSyncPod) GetServiceAccountName ¶
func (m *MemberSyncPod) GetServiceAccountName() string
func (*MemberSyncPod) GetSidecars ¶
func (m *MemberSyncPod) GetSidecars(pod *core.PodTemplateSpec) error
func (*MemberSyncPod) GetTolerations ¶
func (m *MemberSyncPod) GetTolerations() []core.Toleration
func (*MemberSyncPod) GetVolumes ¶
func (m *MemberSyncPod) GetVolumes() []core.Volume
GetVolumes returns volumes for the ArangoSync container.
func (*MemberSyncPod) Init ¶
func (m *MemberSyncPod) Init(ctx context.Context, cachedStatus interfaces.Inspector, pod *core.PodTemplateSpec) error
Init initializes the arangosync pod.
func (*MemberSyncPod) IsDeploymentMode ¶
func (m *MemberSyncPod) IsDeploymentMode() bool
func (*MemberSyncPod) Labels ¶
func (m *MemberSyncPod) Labels() map[string]string
func (*MemberSyncPod) Profiles ¶
func (m *MemberSyncPod) Profiles() (schedulerApi.ProfileTemplates, error)
func (*MemberSyncPod) Validate ¶
func (m *MemberSyncPod) Validate(_ interfaces.Inspector) error
type MetricContainerRestarts ¶
type MetricContainerRestarts map[string]MetricMemberRestarts
type MetricMember ¶
type MetricMember struct { ContainerRestarts MetricContainerRestarts InitContainerRestarts MetricContainerRestarts EphemeralContainerRestarts MetricContainerRestarts }
type MetricMemberRestarts ¶
type MetricMemberRestarts map[int32]MetricMemberRestartReason
type Metrics ¶
type Metrics struct { Members map[string]MetricMember // contains filtered or unexported fields }
func (*Metrics) IncMemberContainerRestarts ¶
func (*Metrics) IncMemberEphemeralContainerRestarts ¶
func (*Metrics) IncMemberInitContainerRestarts ¶
type Resources ¶
type Resources struct {
// contains filtered or unexported fields
}
Resources is a service that creates low level resources for members and inspects low level resources, put the inspection result in members.
func NewResources ¶
NewResources creates a new Resources service, used to create and inspect low level resources such as pods and services.
func (*Resources) CleanupTerminatedPods ¶
CleanupTerminatedPods removes all pods in Terminated state that belong to a member in Created state. Returns: Interval_till_next_inspection, error
func (*Resources) CollectMetrics ¶
func (r *Resources) CollectMetrics(m metrics.PushMetric)
func (*Resources) CreatePodTolerations ¶
func (r *Resources) CreatePodTolerations(group api.ServerGroup, groupSpec api.ServerGroupSpec) []core.Toleration
CreatePodTolerations creates a list of tolerations for a pod created for the given group.
func (*Resources) EnsureAnnotations ¶
func (*Resources) EnsureArangoMembers ¶
func (*Resources) EnsureArangoProfiles ¶
func (r *Resources) EnsureArangoProfiles(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
EnsureArangoProfiles creates all ArangoProfiles needed to run the given deployment
func (*Resources) EnsureConfigMaps ¶
func (r *Resources) EnsureConfigMaps(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
EnsureConfigMaps creates all ConfigMaps needed to run the given deployment
func (*Resources) EnsureCoreResources ¶
func (*Resources) EnsureLabels ¶
func (*Resources) EnsureLeader ¶
func (r *Resources) EnsureLeader(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
EnsureLeader creates leader label on the pod's agency and creates service to it. When agency leader is not known then all agencies' pods should not have leader label, and consequentially service will not point to any pod. It works only in active fail-over mode.
func (*Resources) EnsurePDBs ¶
EnsurePDBs ensures Pod Disruption Budgets for different server groups in Cluster mode
func (*Resources) EnsurePVCs ¶
func (r *Resources) EnsurePVCs(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
EnsurePVCs creates all PVC's listed in member status
func (*Resources) EnsurePersistentVolumeClaimsLabels ¶
func (*Resources) EnsurePodDisruptionBudgetsLabels ¶
func (*Resources) EnsurePods ¶
func (r *Resources) EnsurePods(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
EnsurePods creates all Pods listed in member status
func (*Resources) EnsurePodsLabels ¶
func (*Resources) EnsureResources ¶
func (*Resources) EnsureSecretLabels ¶
func (*Resources) EnsureSecrets ¶
func (r *Resources) EnsureSecrets(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
EnsureSecrets creates all secrets needed to run the given deployment
func (*Resources) EnsureServiceAccountsLabels ¶
func (*Resources) EnsureServiceMonitor ¶
EnsureServiceMonitor creates or updates a ServiceMonitor.
func (*Resources) EnsureServiceMonitorsLabels ¶
func (*Resources) EnsureServices ¶
func (r *Resources) EnsureServices(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
EnsureServices creates all services needed to service the deployment
func (*Resources) EnsureServicesLabels ¶
func (*Resources) GetCertsFromData ¶
func (r *Resources) GetCertsFromData(caPem []byte) crypto.Certificates
func (*Resources) GetCertsFromSecret ¶
func (r *Resources) GetCertsFromSecret(secret *core.Secret) crypto.Certificates
func (*Resources) InspectPVCs ¶
func (r *Resources) InspectPVCs(ctx context.Context, cachedStatus inspectorInterface.Inspector) (util.Interval, error)
InspectPVCs lists all PVCs that belong to the given deployment and updates the member status of the deployment accordingly.
func (*Resources) InspectPods ¶
func (r *Resources) InspectPods(ctx context.Context, cachedStatus inspectorInterface.Inspector) (util.Interval, error)
InspectPods lists all pods that belong to the given deployment and updates the member status of the deployment accordingly. Returns: Interval_till_next_inspection, error
func (*Resources) RenderPodForMember ¶
func (*Resources) RenderPodTemplateForMember ¶
func (r *Resources) RenderPodTemplateForMember(ctx context.Context, acs sutil.ACS, spec api.DeploymentSpec, status api.DeploymentStatus, memberID string, imageInfo api.ImageInfo) (*core.PodTemplateSpec, error)
func (*Resources) SelectImage ¶
func (r *Resources) SelectImage(spec api.DeploymentSpec, status api.DeploymentStatus) (api.ImageInfo, bool)
func (*Resources) SelectImageForMember ¶
func (r *Resources) SelectImageForMember(spec api.DeploymentSpec, status api.DeploymentStatus, member api.MemberStatus) (api.ImageInfo, bool)
func (*Resources) SyncMembersInCluster ¶
SyncMembersInCluster sets proper condition for all arangod members that belongs to the deployment.
func (*Resources) ValidateSecretHashes ¶
func (r *Resources) ValidateSecretHashes(ctx context.Context, cachedStatus inspectorInterface.Inspector) error
ValidateSecretHashes checks the hash of used secrets against the stored ones. If a hash is different, the deployment is marked with a SecretChangedCondition and the operator will not touch it until this is resolved.
Source Files
¶
- annotations.go
- arango_profiles.go
- certificates.go
- certificates_client_auth.go
- certificates_tls.go
- config_map_gateway.go
- config_map_gateway_member.go
- config_maps.go
- config_maps_member.go
- context.go
- env_builder.go
- exporter.go
- internal_exporter.go
- labels.go
- logger.go
- member_cleanup.go
- metrics.go
- pdbs.go
- pod_cleanup.go
- pod_creator.go
- pod_creator_arangod.go
- pod_creator_gateway.go
- pod_creator_gateway_container.go
- pod_creator_gateway_pod.go
- pod_creator_probes.go
- pod_creator_sync.go
- pod_creator_tolerations.go
- pod_finalizers.go
- pod_init_containers.go
- pod_inspector.go
- pod_leader.go
- pod_termination.go
- pvc_finalizers.go
- pvc_inspector.go
- pvcs.go
- resources.go
- secret_hashes.go
- secrets.go
- servicemonitor.go
- services.go