common

by zekker6

Helm chartv0.5.2Verified publisher

Function library for Helm charts

About this chart

common

Function library for Helm charts

This chart is not maintained by the upstream project and any issues with the chart should be raised here

Requirements

Kubernetes: >=1.16.0-0

Dependencies

RepositoryNameVersion

TL;DR

helm repo add zekker6 https://zekker6.github.io/helm-charts/
helm repo update
helm install common zekker6/common

Installing the Chart

To install the chart with the release name common

helm install common zekker6/common

Uninstalling the Chart

To uninstall the common deployment

helm uninstall common

The command removes all the Kubernetes components associated with the chart including persistent volumes and deletes the release.

Configuration

Read through the values.yaml file. It has several commented out suggested values. Other values may be used from the values.yaml from the common library.

Specify each parameter using the --set key=value[,key=value] argument to helm install.

helm install common \
  --set env.TZ="America/New York" \
    zekker6/common

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.

helm install common zekker6/common -f values.yaml

Custom configuration

N/A

Values

Important: When deploying an application Helm chart you can add more values from our common library chart here

KeyTypeDefaultDescription
additionalContainersobject{}Specify any additional containers here as dictionary items. Each additional container should have its own key. Helm templates can be used.
addonsobjectSee belowThe common chart supports several add-ons. These can be configured under this key.
addons.codeserverobjectSee values.yamlThe common library supports adding a code-server add-on to access files. It can be configured under this key. For more info, check out our docs
addons.codeserver.argslist["--auth","none"]Set codeserver command line arguments. Consider setting --user-data-dir to a persistent location to preserve code-server setting changes
addons.codeserver.enabledboolfalseEnable running a code-server container in the pod
addons.codeserver.envobject{}Set any environment variables for code-server here
addons.codeserver.gitobjectSee belowOptionally allow access a Git repository by passing in a private SSH key
addons.codeserver.git.deployKeystring""Raw SSH private key
addons.codeserver.git.deployKeyBase64string""Base64-encoded SSH private key. When both variables are set, the raw SSH key takes precedence.
addons.codeserver.git.deployKeySecretstring""Existing secret containing SSH private key The chart expects it to be present under the id_rsa key.
addons.codeserver.image.pullPolicystring"IfNotPresent"Specify the code-server image pull policy
addons.codeserver.image.repositorystring"ghcr.io/coder/code-server"Specify the code-server image
addons.codeserver.image.tagstring"4.93.1"Specify the code-server image tag
addons.codeserver.ingress.enabledboolfalseEnable an ingress for the code-server add-on.
addons.codeserver.ingress.ingressClassNamestringnilSet the ingressClass that is used for this ingress. Requires Kubernetes >=1.19
addons.codeserver.service.enabledbooltrueEnable a service for the code-server add-on.
addons.codeserver.volumeMountslist[]Specify a list of volumes that get mounted in the code-server container. At least 1 volumeMount is required!
addons.codeserver.workingDirstring""Specify the working dir that will be opened when code-server starts If not given, the app will default to the mountpah of the first specified volumeMount
addons.netshootobjectSee values.yamlThe common library supports adding a netshoot add-on to troubleshoot network issues within a Pod. It can be configured under this key.
addons.netshoot.enabledboolfalseEnable running a netshoot container in the pod
addons.netshoot.envobject{}Set any environment variables for netshoot here
addons.netshoot.image.pullPolicystring"IfNotPresent"Specify the netshoot image pull policy
addons.netshoot.image.repositorystring"ghcr.io/nicolaka/netshoot"Specify the netshoot image
addons.netshoot.image.tagstring"v0.13"Specify the netshoot image tag
addons.promtailobjectSee values.yamlThe common library supports adding a promtail add-on to to access logs and ship them to loki. It can be configured under this key.
addons.promtail.argslist[]Set promtail command line arguments
addons.promtail.enabledboolfalseEnable running a promtail container in the pod
addons.promtail.envobject{}Set any environment variables for promtail here
addons.promtail.image.pullPolicystring"IfNotPresent"Specify the promtail image pull policy
addons.promtail.image.repositorystring"docker.io/grafana/promtail"Specify the promtail image
addons.promtail.image.tagstring"3.2.1"Specify the promtail image tag
addons.promtail.logslist[]The paths to logs on the volume
addons.promtail.lokistring""The URL to Loki
addons.promtail.volumeMountslist[]Specify a list of volumes that get mounted in the promtail container. At least 1 volumeMount is required!
addons.vpnobjectSee values.yamlThe common chart supports adding a VPN add-on. It can be configured under this key.
addons.vpn.argslist[]Override the args for the vpn sidecar container
addons.vpn.configFilestringnilProvide a customized vpn configuration file to be used by the VPN.
addons.vpn.configFileSecretstringnilReference an existing secret that contains the VPN configuration file The chart expects it to be present under the vpnConfigfile key.
addons.vpn.enabledboolfalseEnable running a VPN in the pod to route traffic through a VPN
addons.vpn.envobject{}All variables specified here will be added to the vpn sidecar container See the documentation of the VPN image for all config values
addons.vpn.gluetunobjectSee belowMake sure to read the documentation to see how to configure this addon!
addons.vpn.gluetun.image.pullPolicystring"IfNotPresent"Specify the Gluetun image pull policy
addons.vpn.gluetun.image.repositorystring"docker.io/qmcgaw/gluetun"Specify the Gluetun image
addons.vpn.gluetun.image.tagstring"v3.39.1"Specify the Gluetun image tag
addons.vpn.livenessProbeobject{}Optionally specify a livenessProbe, e.g. to check if the connection is still being protected by the VPN
addons.vpn.networkPolicy.annotationsobject{}Provide additional annotations which may be required.
addons.vpn.networkPolicy.egressstringnilThe egress configuration for your network policy, All outbound traffic from the pod will be blocked unless specified here. [ref] [recipes]
addons.vpn.networkPolicy.enabledboolfalseIf set to true, will deploy a network policy that blocks all outbound traffic except traffic specified as allowed
addons.vpn.networkPolicy.labelsobject{}Provide additional labels which may be required.
addons.vpn.networkPolicy.podSelectorLabelsobject{}Provide additional podSelector labels which may be required.
addons.vpn.scriptsobjectSee values.yamlProvide custom up/down scripts that can be used by the vpn configuration.
addons.vpn.securityContextobjectSee values.yamlSet the VPN container securityContext
addons.vpn.typestring"gluetun"Specify the VPN type. Valid options are gluetun.
affinityobject{}Defines affinity constraint rules. [ref]
argslist[]Override the args for the default container
automountServiceAccountTokenbooltrueSpecifies whether a service account token should be automatically mounted.
autoscalingobjectAdd a Horizontal Pod Autoscaler
commandlist[]Override the command(s) for the default container
configmapobjectSee belowConfigure configMaps for the chart here. Additional configMaps can be added by adding a dictionary key similar to the 'config' object.
configmap.config.annotationsobject{}Annotations to add to the configMap
configmap.config.dataobject{}configMap data content. Helm template enabled.
configmap.config.enabledboolfalseEnables or disables the configMap
configmap.config.labelsobject{}Labels to add to the configMap
controller.annotationsobject{}Set annotations on the deployment/statefulset/daemonset
controller.enabledbooltrueenable the controller.
controller.labelsobject{}Set labels on the deployment/statefulset/daemonset
controller.podManagementPolicystringnilSet statefulset podManagementPolicy, valid values are Parallel and OrderedReady (default).
controller.replicasint1Number of desired pods
controller.revisionHistoryLimitint3ReplicaSet revision history limit
controller.rollingUpdate.partitionstringnilSet statefulset RollingUpdate partition
controller.rollingUpdate.surgestringnilSet deployment RollingUpdate max surge
controller.rollingUpdate.unavailablestringnilSet deployment RollingUpdate max unavailable
controller.strategystringnilSet the controller upgrade strategy For Deployments, valid values are Recreate (default) and RollingUpdate. For StatefulSets, valid values are OnDelete and RollingUpdate (default). DaemonSets ignore this.
controller.typestring"deployment"Set the controller type. Valid options are deployment, daemonset or statefulset
dnsConfigobject{}Optional DNS settings, configuring the ndots option may resolve nslookup issues on some Kubernetes setups.
dnsPolicystringnilDefaults to "ClusterFirst" if hostNetwork is false and "ClusterFirstWithHostNet" if hostNetwork is true.
enableServiceLinksbooltrueEnable/disable the generation of environment variables for services. [ref]
envstringnilMain environment variables. Template enabled. Syntax options: A) TZ: UTC B) PASSWD: '{{ .Release.Name }}' C) PASSWD: configMapKeyRef: name: config-map-name key: key-name D) PASSWD: valueFrom: secretKeyRef: name: secret-name key: key-name ... E) - name: TZ value: UTC F) - name: TZ value: '{{ .Release.Name }}'
envFromlist[]Secrets and/or ConfigMaps that will be loaded as environment variables. [ref]
global.annotationsobject{}Set additional global annotations. Helm templates can be used.
global.fullnameOverridestringnilSet the entire name definition
global.labelsobject{}Set additional global labels. Helm templates can be used.
global.nameOverridestringnilSet an override for the prefix of the fullname
hostAliaseslist[]Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames. [ref]
hostNetworkboolfalseWhen using hostNetwork make sure you set dnsPolicy to ClusterFirstWithHostNet
hostnamestringnilAllows specifying explicit hostname setting
image.pullPolicystringnilimage pull policy
image.repositorystringnilimage repository
image.tagstringnilimage tag
imagePullSecretslist[]Set image pull secrets
ingressobjectSee belowConfigure the ingresses for the chart here. Additional ingresses can be added by adding a dictionary key similar to the 'main' ingress.
ingress.main.annotationsobject{}Provide additional annotations which may be required.
ingress.main.enabledboolfalseEnables or disables the ingress
ingress.main.hosts[0].hoststring"chart-example.local"Host address. Helm template can be passed.
ingress.main.hosts[0].paths[0].pathstring"/"Path. Helm template can be passed.
ingress.main.hosts[0].paths[0].pathTypestring"Prefix"Ignored if not kubeVersion >= 1.14-0
ingress.main.hosts[0].paths[0].service.namestringnilOverrides the service n

Deploy common with OpenTenant

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