kamaji-etcd

by Clastix

Helm chartv0.18.1App 3.6.12Apache-2.0Verified publisher

Helm chart for deploying a multi-tenant `etcd` cluster.

About this chart

kamaji-etcd

Helm chart for deploying a multi-tenant etcd cluster.

Kamaji turns any Kubernetes cluster into an admin cluster to orchestrate other Kubernetes clusters called tenant clusters. The Control Plane of a tenant cluster is made of regular pods running in a namespace of the admin cluster instead of a dedicated set of Virtual Machines. This solution makes running control planes at scale cheaper and easier to deploy and operate.

As of any Kubernetes cluster, a tenant cluster needs a datastore where to save the state and be able to retrieve data. This chart provides a multi-tenant etcd as datastore for Kamaji as well as a standalone multi-tenant etcd cluster.

Install kamaji-etcd

To install the Chart with the release name kamaji-etcd:

    helm repo add clastix https://clastix.github.io/charts
    helm repo update
    helm install kamaji-etcd clastix/kamaji-etcd -n kamaji-etcd --create-namespace

Show the status:

    helm status kamaji-etcd -n kamaji-etcd

Upgrade the Chart

    helm upgrade kamaji-etcd -n kamaji-etcd clastix/kamaji-etcd

Uninstall the Chart

    helm uninstall kamaji-etcd -n kamaji-etcd

Customize the installation

There are two methods for specifying overrides of values during Chart installation: --values and --set.

The --values option is the preferred method because it allows you to keep your overrides in a YAML file, rather than specifying them all on the command line. Create a copy of the YAML file values.yaml and add your overrides to it.

Specify your overrides file when you install the Chart:

    helm upgrade kamaji-etcd --install --namespace kamaji-etcd --create-namespacekamaji-etcd --values myvalues.yaml

The values in your overrides file myvalues.yaml will override their counterparts in the Chart's values.yaml file. Any values in values.yaml that weren't overridden will keep their defaults.

If you only need to make minor customizations, you can specify them on the command line by using the --set option. For example:

    helm upgrade kamaji-etcd --install --namespace kamaji-etcd --create-namespace kamaji-etcd --set replicas=5

Here the values you can override:

Values

KeyTypeDefaultDescription
affinityobject{}Kubernetes affinity rules to apply to etcd pods
alerts.annotationsobject{}Assign additional Annotations
alerts.enabledboolfalseEnable alerts for Alertmanager
alerts.labelsobject{}Assign additional labels according to Prometheus' Alerts matching labels
alerts.namespacestring""Install the Alerts into a different Namespace, as the monitoring stack one (default: the release one)
alerts.ruleslist[]The rules for alerts
autoCompactionModestring"periodic"Interpret 'auto-compaction-retention' one of: periodic
autoCompactionRetentionstring"5m"Auto compaction retention length. 0 means disable auto compaction.
certManager.ca.createbooltrue
certManager.ca.nameOverridestring""
certManager.ca.validitystring"87600h"CertManager etcd CA validity
certManager.caBundle.additionalCASecretslist[]Additional CA Secrets to concatenate in, alongside this chart's own CA (certManager.ca), which is always included first - e.g. the external root CA that certManager.issuerRef chains up to. Unlike a cert-manager-issued Secret, a manually provisioned one may only have tls.crt (no ca.crt) - set key per entry to match whatever that specific Secret actually has.
certManager.caBundle.enabledboolfalseBuild etcd's trusted-ca-file as a merged bundle of CA sources via an init container in the etcd Pods, instead of relying on trust-manager. Required when certManager.issuerRef points to an Issuer backed by a CA that is itself signed by another, external CA (a chained/intermediate setup): in that case cert-manager only ever propagates a single certificate into a Certificate's secret ca.crt field, so etcd would trust either the intermediate or the root, never both. The init container reads each source Secret directly (across namespaces, via the etcd Pods' own ServiceAccount RBAC - no fixed "trust namespace" restriction to work around) and writes the concatenated PEM into an emptyDir which etcd uses as its trusted-ca-file. It only re-syncs when a Pod (re)starts, not continuously - if a source CA rotates, perform a rollout restart of the etcd StatefulSet to refresh it. Unlike a Helm hook, this is compatible with helm install --wait: the init container waits for cert-manager to populate the source Secrets, restarting until they are available.
certManager.caBundle.imageobject{"pullPolicy":"IfNotPresent","repository":"clastix/kubectl","tag":"v1.35"}Container image for the ca-bundle init container. Only needs a POSIX shell and kubectl.
certManager.caBundle.ownCAKeystring"tls.crt"Secret data key holding this chart's own CA certificate (certManager.ca). When a cert-manager-issued CA Certificate's Secret pointing to an already existing CA, the ca.crt key contains the root certificate, and tls.crt the intermediate one, so the default is pointing to the latter; override only if certManager.ca ends up backed by something that doesn't follow that convention.
certManager.clientCert.createbooltrue
certManager.clientCert.nameOverridestring""
certManager.enabledboolfalseEnable CertManager for etcd certificates
certManager.issuerRefobject{}CertManager Issuer to use for the etcd certificates
certManager.peerCert.additionalDnsNameslist[]
certManager.peerCert.createbooltrue
certManager.peerCert.nameOverridestring""
certManager.serverCert.additionalDnsNameslist[]
certManager.serverCert.createbooltrue
certManager.serverCert.nameOverridestring""
clientPortint2379The client request port.
clusterDomainstring"cluster.local"Domain of the Kubernetes cluster.
datastore.annotationsobject{}Assign additional Annotations to the datastore
datastore.enabledbooltrueCreate a datastore custom resource for Kamaji
datastore.headlessbooltrueExpose the headless service endpoints in the datastore. Set to false to expose with regular service.
datastore.namestring""Name of Kamaji datastore, set to fully qualified etcd name when null or not provided
extraArgslist[]A list of extra arguments to add to the etcd default ones
fullnameOverridestring""
image.pullPolicystring"IfNotPresent"Pull policy to use
image.repositorystring"quay.io/coreos/etcd"Install image from specific repo
image.tagstring""Install image with specific tag, overwrite the tag in the chart
imagePullSecretslist[]
jobs.affinityobject{}Kubernetes affinity rules to apply to ancillary jobs
jobs.cfsslobject{"image":"cfssl/cfssl","tag":""}addional images to use for ancillary jobs
jobs.etcd.imagestring"quay.io/coreos/etcd"
jobs.etcd.pullPolicystring"IfNotPresent"
jobs.etcd.tagstring"v3.5.6"
jobs.kubectl.imagestring"clastix/kubectl"
jobs.kubectl.tagstring""
jobs.nodeSelectorobject{"kubernetes.io/os":"linux"}Kubernetes node selector rules for ancillary jobs
jobs.tolerationslist[]Kubernetes node taints that the ancillary jobs would tolerate
livenessProbeobject{"failureThreshold":3,"httpGet":{"path":"/livez","port":2381,"scheme":"HTTP"},"initialDelaySeconds":10,"periodSeconds":10,"timeoutSeconds":15}The livenessProbe for the etcd container
metricsPortint2381The port where etcd exposes metrics.
nameOverridestring""
nodeSelectorobject{"kubernetes.io/os":"linux"}Kubernetes node selector rules to schedule etcd
peerApiPortint2380The peer API port which servers are listening to.
persistentVolumeClaim.accessModeslist["ReadWriteOnce"]The Access Mode to storage
persistentVolumeClaim.customAnnotationsobject{}The custom annotations to add to the PVC
persistentVolumeClaim.retentionPolicyWhenDeletedstring"Retain"What happens to PVCs created when the StatefulSet is deleted. Retain causes PVCs to not be affected by StatefulSet deletion, Delete policy causes those PVCs to be deleted
persistentVolumeClaim.sizestring"8Gi"The size of persistent storage for etcd data
persistentVolumeClaim.storageClassNamestring""A specific storage class
podAnnotationsobject{}Annotations to add to all etcd pods
podLabelsobject{"application":"kamaji-etcd"}Labels to add to all etcd pods
podSecurityContextobject{}The securityContext to apply to etcd pods
priorityClassNamestring"system-cluster-critical"The priorityClassName to apply to etcd
quotaBackendBytesstring"8589934592"Raise alarms when backend size exceeds the given quota. It will put the cluster into a maintenance mode which only accepts key reads and deletes.
replicasint3Size of the etcd cluster
resourcesobject{"limits":{},"requests":{}}Resources assigned to the etcd containers
securityContextobject{"allowPrivilegeEscalation":false}The securityContext to apply to etcd containers
selfSignedCertificates.enabledbooltrueEnables the generation of self-signed certificates for etcd using the cfssl, and kubectl jobs.
serviceAccountobject{"create":true,"name":""}Install an etcd with enabled multi-tenancy
serviceAccount.createbooltrueCreate a ServiceAccount, required to install and provision the etcd backing storage (default: true)
serviceAccount.namestring""Define the ServiceAccount name to use during the setup and provision of the etcd backing storage (default: "")
serviceMonitor.annotationsobject{}Assign additional Annotations
serviceMonitor.enabledboolfalseEnable ServiceMonitor for Prometheus
serviceMonitor.endpoint.intervalstring"15s"Set the scrape interval for the endpoint of the serviceMonitor
serviceMonitor.endpoint.metricRelabelingslist[]Set metricRelabelings for the endpoint of the serviceMonitor
serviceMonitor.endpoint.relabelingslist[]Set relabelings for the endpoint of the serviceMonitor
serviceMonitor.endpoint.scrapeTimeoutstring""Set the scrape timeout for the endpoint of the serviceMonitor
serviceMonitor.labelsobject{"release":"kube-prometheus-stack"}Assign additional labels according to Prometheus' serviceMonitorSelector matching labels. By default, it uses the kube-prometheus-stack one.
serviceMonitor.matchLabelsobject{}Change matching labels. By default, it uses client service labels.
serviceMonitor.namespacestring""Install the ServiceMonitor into a different namespace than release one.
serviceMonitor.serviceAccountobject{"name":"kube-prometheus-stack-prometheus","namespace":"monitoring-system"}ServiceAccount for scraping metrics from etcd. By defult, it uses the kube-prometheus-stack one.
serviceMonitor.serviceAccount.namestring"kube-prometheus-stack-prometheus"ServiceAccount name
serviceMonitor.serviceAccount.namespacestring"monitoring-system"ServiceAccount namespace
serviceMonitor.targetLabelslist[]Set targetLabels for the serviceMonitor
snapshotCountstring"10000"Number of committed transactions to trigger a snapshot to disk.
tolerationslist[]Kubernetes node taints that the etcd pods would tolerate
topologySpreadConstraintslist[]Kubernetes topology spread constraints to apply to etcd pods

Maintainers

NameEmailUrl
Adriano Pezzuto[email protected]https://clastix.io
Dario Tranchitella[email protected]https://clastix.io

Source Code

Deploy kamaji-etcd with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kamaji-etcd on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkamaji-etcd is pinned at v0.18.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply