app
by BitDeps
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
| Name | Description | Value |
|---|---|---|
workload | Specifies the workload type (deployment/statefulset) for the component | deployment |
app.name | Specifies the chart/application name (app.kubernetes.io/name), since this is a generic chart | app |
app.components | Components configuration block. | {} |
reuse | Enables reuse/merge of the upper-level component values (applicable for containers/initContainers) | false |
containers | Specify a map of additional pod containers | {} |
initContainers | Specifies initContainers (use, values map for order and data) | {} |
env | Name Map of environment variables for the main container | {} |
envFrom | Configures of envFrom to include into the main container | [] |
volumes | Specify volumes for the main pod | {} |
volumeMounts | Specify volumeMounts for the main container | {} |
configMaps | Creates application сonfigMaps (note the name is prefixed with the app name) | {} |
secrets | Creates application secrets (note the name is prefixed with the app name) | {} |
templateChecksums | Specifies list of template files to add as an annotation checksum into the pod. | [] |
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
nameOverride | String to partially override common.names.name | "" |
fullnameOverride | String to fully override common.names.fullname | "" |
namespaceOverride | String to fully override common.names.namespace | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
clusterDomain | Kubernetes cluster domain name | cluster.local |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
Main pod Parameters
| Name | Description | Value |
|---|---|---|
image.registry | image registry | "" |
image.repository | image repository | "" |
image.tag | image tag (immutable tags are recommended) | "" |
image.digest | image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | "" |
image.pullPolicy | image pull policy | IfNotPresent |
image.pullSecrets | image pull secrets | [] |
image.debug | Enable image debug mode | false |
replicaCount | Number of replicas to deploy | 1 |
containerPorts | Specifies container ports | {} |
livenessProbe.enabled | Enable livenessProbe on containers | false |
livenessProbe.initialDelaySeconds | Initial delay seconds for livenessProbe | 0 |
livenessProbe.periodSeconds | Period seconds for livenessProbe | 10 |
livenessProbe.timeoutSeconds | Timeout seconds for livenessProbe | 1 |
livenessProbe.failureThreshold | Failure threshold for livenessProbe | 3 |
livenessProbe.successThreshold | Success threshold for livenessProbe | 1 |
livenessProbe.exec | Specifies exec action (must set before enabling) | |
livenessProbe.grpc | Specifies GRPC action (must set before enabling) | |
livenessProbe.httpGet | Specifies HTTPGet action (must set before enabling) | |
livenessProbe.tcpSocket | Specifies TCPSocket action (must set before enabling) | |
readinessProbe.enabled | Enable readinessProbe on containers | false |
readinessProbe.initialDelaySeconds | Initial delay seconds for readinessProbe | 0 |
readinessProbe.periodSeconds | Period seconds for readinessProbe | 10 |
readinessProbe.timeoutSeconds | Timeout seconds for readinessProbe | 1 |
readinessProbe.failureThreshold | Failure threshold for readinessProbe | 3 |
readinessProbe.successThreshold | Success threshold for readinessProbe | 1 |
readinessProbe.exec | Specifies exec action (one of the actions must be set before enabling) | |
readinessProbe.grpc | Specifies GRPC action (one of the actions must be set before enabling) | |
readinessProbe.httpGet | Specifies HTTPGet action (one of the actions must be set before enabling) | |
readinessProbe.tcpSocket | Specifies 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartapp is pinned at v1.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