app

by BitDeps

Helm chartv1.1.0

Generic application Helm chart

About this chart

Generic application Helm chart

Generic application Helm chart (based on bitnami template). App chart provides a generic interface to deploy an application straight away without necessity to create your own chart. In other words it might exempt a user from repeating "helm create & make a new chart again and again" which is the chart's main goal.

Introduction

The app chart basically generates a generic application based on the provided helm values input. Just specify app.name and the image.repository and the deployment along with a couple of other resources (ServiceAccount namely) will be deployed straight away. Evidently such an installation might bring insufficient value to an enduser, thus this chart is charged with other resources (PR and add yours into the list :)).

As of now bitdepscharts/app chart ships the following resources:

  • Deployment
  • Service
  • Secrets. Provides configuration for generic secrets and TLS provided via .Value.ingress.secrets.
  • ConfigMaps
  • Ingress
  • HorizontalPodAutoscaler
  • PersistentVolumeClaim
  • ServiceAccount
  • ServiceMonitor

TL;DR

The chart provides an extensive value interface based on bitnami/template, it also uses bitnami/common chart. App chart's flexible configuration helps you to deploy applications of very different shapes. Not only app chart can render a simple deployment, it can render a multi-container deployment. There's a need for a multi-component application, here again this chart can aid and this is without adding too much code and copy-paste.

Moreover this chart can be used as a library chart in case you decide to create your own-specific chart. Don't forget to copy-over values.yaml and in you chart any app template can be include, for example:

{{- include "app.template" (dict "resource" "deployment" "top" $) -}}

But let's use app chart directly which is the most common usecase, bellow there's just a silly demo install example:

helm install example oci://ghcr.io/bitdepscharts/app --set app.name=my-nginx,image.repository=bitnami/nginx

Source Code

Parameters

App chart parameters

NameDescriptionValue
workloadSpecifies the workload type (deployment/statefulset) for the componentdeployment
app.nameSpecifies the chart/application name (app.kubernetes.io/name), since this is a generic chartapp
app.componentsComponents configuration block.{}
reuseEnables reuse/merge of the upper-level component values (applicable for containers/initContainers)false
containersSpecify a map of additional pod containers{}
initContainersSpecifies initContainers (use, values map for order and data){}
envName Map of environment variables for the main container{}
envFromConfigures of envFrom to include into the main container[]
volumesSpecify volumes for the main pod{}
volumeMountsSpecify volumeMounts for the main container{}
configMapsCreates application сonfigMaps (note the name is prefixed with the app name){}
secretsCreates application secrets (note the name is prefixed with the app name){}
templateChecksumsSpecifies list of template files to add as an annotation checksum into the pod.[]

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.name""
fullnameOverrideString to fully override common.names.fullname""
namespaceOverrideString to fully override common.names.namespace""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
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"]

Main pod Parameters

NameDescriptionValue
image.registryimage registry""
image.repositoryimage repository""
image.tagimage tag (immutable tags are recommended)""
image.digestimage digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended)""
image.pullPolicyimage pull policyIfNotPresent
image.pullSecretsimage pull secrets[]
image.debugEnable image debug modefalse
replicaCountNumber of replicas to deploy1
containerPortsSpecifies container ports{}
livenessProbe.enabledEnable livenessProbe on containersfalse
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe0
livenessProbe.periodSecondsPeriod seconds for livenessProbe10
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe1
livenessProbe.failureThresholdFailure threshold for livenessProbe3
livenessProbe.successThresholdSuccess threshold for livenessProbe1
livenessProbe.execSpecifies exec action (must set before enabling)
livenessProbe.grpcSpecifies GRPC action (must set before enabling)
livenessProbe.httpGetSpecifies HTTPGet action (must set before enabling)
livenessProbe.tcpSocketSpecifies TCPSocket action (must set before enabling)
readinessProbe.enabledEnable readinessProbe on containersfalse
readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe0
readinessProbe.periodSecondsPeriod seconds for readinessProbe10
readinessProbe.timeoutSecondsTimeout seconds for readinessProbe1
readinessProbe.failureThresholdFailure threshold for readinessProbe3
readinessProbe.successThresholdSuccess threshold for readinessProbe1
readinessProbe.execSpecifies exec action (one of the actions must be set before enabling)
readinessProbe.grpcSpecifies GRPC action (one of the actions must be set before enabling)
readinessProbe.httpGetSpecifies HTTPGet action (one of the actions must be set before enabling)
readinessProbe.tcpSocketSpecifies TCPSocket action (one of the actions must be set before

Deploy app with OpenTenant

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