consul

by joaquinito2051

Helm chartv10.9.2App 1.13.2

HashiCorp Consul is a tool for discovering and configuring services in your infrastructure.

About this chart

HashiCorp Consul packaged by Bitnami

HashiCorp Consul is a tool for discovering and configuring services in your infrastructure.

Overview of HashiCorp Consul

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

Azure-ready Charts with Containers from marketplace.azurecr.io

This Helm Chart has been configured to pull the Container Images from the Azure Marketplace Public Repository. The following command allows you to download and install all the charts from this repository.

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo

TL;DR

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo
$ helm install my-release bitnami-azure/consul

Introduction

This chart bootstraps a HashiCorp Consul deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo
$ helm install my-release bitnami-azure/consul

These commands deploy HashiCorp Consul on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release. Remove also the chart using --purge option:

$ helm delete --purge my-release

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionOverride Kubernetes version""
nameOverrideString to partially override common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""
commonLabelsLabels to add to all deployed objects (sub-charts are not considered){}
commonAnnotationsAnnotations to add to all deployed objects (sub-charts are not considered){}
clusterDomainKubernetes cluster domain namecluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

HashiCorp Consul parameters

NameDescriptionValue
image.registryHashiCorp Consul image registrydocker.io
image.repositoryHashiCorp Consul image repositorybitnami/consul
image.tagHashiCorp Consul image tag (immutable tags are recommended)1.13.2-debian-11-r0
image.digestHashiCorp Consul image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyHashiCorp Consul image pull policyIfNotPresent
image.pullSecretsHashiCorp Consul image pull secrets[]
image.debugEnable image debug modefalse
datacenterNameDatacenter name for Consul. If not supplied, will use the Consuldc1
domainConsul domain nameconsul
raftMultiplierMultiplier used to scale key Raft timing parameters1
gossipKeyGossip key for all members. The key must be 16-bytes, can be generated with $(consul keygen)""
tlsEncryptionSecretNameName of existing secret with TLS encryption data""
hostAliasesDeployment pod host aliases[]
configurationHashiCorp Consul configuration to be injected as ConfigMap""
existingConfigmapConfigMap with HashiCorp Consul configuration""
localConfigExtra configuration that will be added to the default one""
podLabelsPod labels{}
priorityClassNamePriority class assigned to the Pods""
runtimeClassNameName of the runtime class to be used by pod(s)""
schedulerNameAlternative scheduler""
terminationGracePeriodSecondsIn seconds, time the given to the Consul pod needs to terminate gracefully""
topologySpreadConstraintsTopology Spread Constraints for pod assignment[]
commandCommand for running the container (set to default if not set). Use array form[]
argsArgs for running the container (set to default if not set). Use array form[]
extraEnvVarsExtra environment variables to be set on HashiCorp Consul container[]
extraEnvVarsCMName of existing ConfigMap containing extra env vars""
extraEnvVarsSecretName of existing Secret containing extra env vars""
containerPorts.httpPort to open for HTTP in Consul8500
containerPorts.dnsPort to open for DNS server in Consul8600
containerPorts.rpcPort to open for RPC in Consul8400
containerPorts.rpcServerPort to open for RPC Server in Consul8300
containerPorts.serfLANPort to open for Serf LAN in Consul8301
lifecycleHooksAdd lifecycle hooks to the deployment{}

Statefulset parameters

NameDescriptionValue
replicaCountNumber of HashiCorp Consul replicas to deploy3
updateStrategy.typeUpdate strategy type for the HashiCorp Consul statefulsetRollingUpdate
podManagementPolicyStatefulSet pod management policyParallel
podAnnotationsAdditional pod annotations{}
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: soft or hard""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hardsoft
nodeAffinityPreset.typeNode affinity preset type. Ignored if affinity is set. Allowed values: soft or hard""
nodeAffinityPreset.keyNode label key to match. Ignored if affinity is set.""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set.[]
affinityAffinity for pod assignment{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
podSecurityContext.enabledEnable security context for HashiCorp Consul podstrue
podSecurityContext.fsGroupGroup ID for the volumes of the pod1001
containerSecurityContext.enabledHashiCorp Consul Container securityContexttrue
containerSecurityContext.runAsUserUser ID for the HashiCorp Consul container1001
containerSecurityContext.runAsNonRootForce the container to be run as non roottrue
containerSecurityContext.allowPrivilegeEscalationForce the child process to be run as nonprivilegefalse
resources.limitsThe resources limits for HashiCorp Consul containers

Deploy consul with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has consul 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 chartconsul is pinned at v10.9.2 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