Skip to main content
Version: Next

Instance

An Instance is one running deployment of a technology. It is namespaced and references a cluster-scoped Provider, which reconciles it.

Example​

apiVersion: core.openeverest.io/v1alpha1
kind: Instance
metadata:
name: orders-db
namespace: demo
spec:
providerRef:
name: provider-percona-postgresql
version: 18.4-1
topology:
type: cluster
components:
engine:
replicas: 3
resources:
requests:
cpu: "1"
memory: 2Gi
limits:
cpu: "1"
memory: 2Gi
storage:
size: 50Gi
storageClass: fast-ssd
proxy:
type: pgbouncer
replicas: 2
service:
serviceType: LoadBalancer
backup:
enabled: true
classRef:
name: pg
storages:
- storageRef:
name: s3-backups
schedules:
- name: daily
enabled: true
cron: "0 2 * * *"
retention:
type: count
count: 7
pitr:
enabled: true
deletionPolicy: Cascade

Spec​

FieldDescription
providerRef.nameRequired. Name of the Provider. List them with kubectl get providers.
versionVersion bundle to deploy. Defaults to the provider's defaultVersion.
topology.typeTopology, as defined by the provider in spec.topologies. When omitted, the provider decides; set it explicitly when the provider offers more than one.
topology.parametersTopology-level settings defined by the provider.
parametersInstance-level settings defined by the provider.
componentsMap of component name to component settings. Valid names depend on the provider and topology.
backupBackup class, storages, schedules and point-in-time recovery. See Backups and restores.
dataSourceCreate the instance from a backup or a point in time. See Create an instance from a backup.
monitoring.destinationsUp to 8 monitoring destinations to send to, each with a name, a destinationRef.name and optional parameters. See Monitoring.
userSecretRef.nameSecret with the initial credentials, for providers that support it. Immutable. When omitted, the provider generates credentials.
maintenanceHow disruptive changes are approved. See Maintenance.
deletionPolicyWhat happens to the instance's Backup and Restore resources when it is deleted: Cascade (default) deletes them, Orphan keeps them.

Fields you omit get the provider's defaults.

Components​

Each entry in spec.components configures one component. The provider decides which fields each component supports — see the topology's supportedFields in the Provider.

FieldDescription
typeComponent type, when the provider offers several — for example the proxy type.
version, imageOverride the version or image of this component.
replicasNumber of pods.
resourcesCPU and memory requests and limits, as in a Kubernetes container.
storage.size, storage.storageClassSize and StorageClass of the data volumes.
service.serviceTypeHow the component is exposed: ClusterIP, NodePort or LoadBalancer. service.annotations and service.loadBalancerService configure the service further.
schedulingPolicynodeSelector, affinity, tolerations, topologySpreadConstraints and schedulerName. See Pod scheduling.
parametersComponent settings defined by the provider, such as engine configuration.

Maintenance​

Some changes need a restart or downtime — for example, the new images that a provider upgrade brings. spec.maintenance decides which of them the provider applies on its own:

FieldDescription
maintenance.autoApproveUpToThe most disruptive change applied automatically: NonDisruptive (default), RollingRestart or Downtime.
maintenance.approvedOne-time approval for a held change. Set it to the approvalToken of the change in status.pendingMaintenance.

Held changes are listed in status.pendingMaintenance with a description, a severity and an approval token. Version changes that you request through spec.version are not held.

Status​

FieldDescription
phasePending, Provisioning, Initializing, Ready, Updating, Restoring, Suspending, Suspended, Resuming, Terminating or Failed.
versionThe version bundle that is currently applied.
messageA human-readable summary of the state.
conditionsSee Conditions.
componentsFor each component: the label selector of its pods, the number of replicas and the number of ready replicas.
connectionSecretRefThe Secret with the connection details, named <instance>-conn. See Connect to an instance.
backupBackup state, including the point-in-time recovery window of each storage.
monitoringThe metrics endpoints the instance exposes (sources) and the state of each monitoring destination (destinations).
pendingMaintenanceDisruptive changes waiting for approval.

Conditions​

ConditionMeaning
ReadyThe instance is up and accepting connections.
PodsScheduledFalse when a pod has waited more than a minute for a node. The message says which component and why.
PodsReadyFalse when pods are not ready. The reason names the worst problem, for example CrashLoopBackOff, ImagePullBackOff, CreateContainerConfigError or NotReady.
BackupConfiguredWhether the backup configuration was applied. False when, for example, the provider doesn't support a requested setting.
MonitoringConfiguredWhether every monitoring destination is configured. Present only when the instance has monitoring destinations.

Example status of a PostgreSQL instance that is starting:

status:
phase: Initializing
message: database is initializing
version: 18.4-1
components:
- name: engine
replicas: 2
readyReplicas: 0
selector: core.openeverest.io/component=engine,core.openeverest.io/instance=orders-db
- name: proxy
replicas: 2
readyReplicas: 0
selector: core.openeverest.io/component=proxy,core.openeverest.io/instance=orders-db
conditions:
- type: BackupConfigured
status: "True"
reason: Configured
message: Backup configuration applied to engine
- type: PodsScheduled
status: "True"
reason: Scheduled
- type: PodsReady
status: "False"
reason: NotReady
message: |-
engine: 2 of 2 pods are not ready
proxy: 2 of 2 pods are not ready
- type: Ready
status: "False"
reason: Initializing
message: database is initializing