dr-controlplane-agent
OCM addon chart that installs the dr-controlplane per data center agent (Deployment, ServiceAccount, Role, RoleBinding) onto a ManagedCluster. Rendered by the addon-framework, one release per ManagedCluster, with the cluster name injected as the agent --dc-name.
About this chart
DR Control Plane Agent
DR Control Plane Agent by AppsCode - Per data center agent of the DC failover service
TL;DR;
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search repo appscode/dr-controlplane-agent --version=v0.1.0
$ helm upgrade -i dr-controlplane-agent appscode/dr-controlplane-agent -n dc-failover --create-namespace --version=v0.1.0
Introduction
This chart deploys a DR Control Plane Agent on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.26+
Installing the Chart
To install/upgrade the chart with the release name dr-controlplane-agent:
$ helm upgrade -i dr-controlplane-agent appscode/dr-controlplane-agent -n dc-failover --create-namespace --version=v0.1.0
The command deploys a DR Control Plane Agent on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall the dr-controlplane-agent:
$ helm uninstall dr-controlplane-agent -n dc-failover
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of the dr-controlplane-agent chart and their default values.
| Parameter | Description | Default |
|---|---|---|
| clusterName | clusterName is the ManagedCluster name. Injected by the addon manager and used as the agent --dc-name. Required at render time. | "" |
| namespace | namespace where the agent runs and the coordination Leases live on the spoke. It must be the namespace that already holds the coordination credential Secret (agent.coordKubeconfigSecret), otherwise the agent pod never leaves ContainerCreating. The addon manager pins this to its --agent-install-namespace and also sets the addon-framework install namespace to the same value. | dc-failover |
| addonInstallNamespace | addonInstallNamespace is a built in value the addon-framework always sets to the effective addon install namespace. It wins over namespace when present, so the rendered objects can never drift from where the framework installs the release. | "" |
| createNamespace | createNamespace makes the chart emit the target Namespace object, which makes the addon's ManifestWork OWN that namespace. Default false on purpose: the agent shares the pre existing dc-failover namespace with the coordination credential Secret, the active DC markers and, on some clusters, etcd. If the addon owned that namespace, deleting the addon would garbage collect the entire DR install with it. Only turn this on for a namespace nothing else lives in. | false |
| registryFQDN | Docker registry fqdn used to pull the dr-controlplane image. Set this to use docker registry hosted at ${registryFQDN}/${registry}/${repository}. Injected by the addon manager from --agent-registry-fqdn. | ghcr.io |
| image.registry | Docker registry used to pull the image | appscode |
| image.repository | Name of the container image | dr-controlplane |
| image.tag | Container image tag | "" # defaults to .Chart.AppVersion |
| imagePullPolicy | Container image pull policy | IfNotPresent |
| imagePullSecrets | imagePullSecrets are Secret references that must exist in .Values.namespace on each spoke. Injected by the addon manager from --agent-image-pull-secrets. | [] |
| replicas | replicas is the agent pod count on this spoke. Injected by the addon manager from --agent-replicas. More than one is pod crash insurance only: every replica shares the DC identity (same --dc-name), renews the same Leases, and projects the same markers, so extras are harmless but carry no quorum weight; quorum lives in the etcd members alone. | 1 |
| agent.coordKubeconfigData | base64 kubeconfig injected by the addon manager; empty means an operator provisioned Secret of the same name is used instead. | "" |
| agent.coordKubeconfigSecret | Kubeconfig Secret for the coordination control plane (key: kubeconfig). Empty disables the mount and the agent uses the in cluster config. | coord-kubeconfig |
| agent.metricsAddr | ":8080" | |
| agent.health.leaseDurationSeconds | 15 | |
| agent.health.renewIntervalSeconds | 5 | |
| agent.election.leaseDurationSeconds | 45 | |
| agent.election.renewDeadlineSeconds | 40 | |
| agent.election.retryPeriodSeconds | 5 | |
| agent.resources | {} | |
| nodeSelector |
Deploy dr-controlplane-agent with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dr-controlplane-agent 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartdr-controlplane-agent is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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