Helm chartv0.1.18App 1.16.0

A generic reuseable Helm chart for deploying almost any dockerized application exposing a web interface to a HTTPS route on OpenShift and Kubernetes

About this chart

webapp

A generic reuseable Helm chart for deploying almost any dockerized application exposing a web interface to a HTTPS route on OpenShift and Kubernetes

The aim of this Helm chart is to give an easy and straightforward way to deploy any Docker image exposing a web interface on OpenShift and Kubernetes clusters. Currently the chart is mostly optimized and used in OpenShift/OKD clusters, if you are using it with other Kubernetes distributions please let us know in the GitHub repository issues, we would love to hear about it!

Installing the Chart

Install the DSRI Helm Charts on your machine, if not already done:

helm repo add dsri https://maastrichtu-ids.github.io/dsri-helm-charts/
helm repo update

Visit the dsri-helm-charts GitHub repository for more details on how to develop and tests the charts, feel free to send us pull requests to propose your improvements!

Deploying the Chart

To deploy the chart with the release name webapp, here is an example to deploy VisualStudio Code server:

helm install webapp dsri/webapp \
  --set serviceAccount.name=anyuid \
  --set service.openshiftRoute.enabled=true \
  --set service.port=8080 \
  --set image.repository=ghcr.io/maastrichtu-ids/code-server \
  --set image.tag=latest \
  --set storage.mountPath=/home/coder/project \
  --set extraEnvs[0].name=PASSWORD \
  --set extraEnvs[0].value=changeme

Updating the image in a deployed chart

To be able to trigger an update of the image deployed by the chart you will need to set image.pullPolicy=Always when deploying the chart.

You can then update the image used by the running webapp:

helm upgrade webapp dsri/webapp

Uninstalling the Chart

To uninstall/delete the webapp deployment:

helm delete webapp

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 webapp chart and their default values. They can be defined in the values.yaml file, or using the flag --set.

KeyTypeDefaultDescription
affinityobject{}
autoscaling.enabledboolfalse
extraEnvslist[]
image.pullPolicystring"Always"
image.repositorystring"ghcr.io/maastrichtu-ids/code-server"
image.tagstring"latest"
imagePullSecretslist[]drop: - ALL readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000
nodeSelectorobject{}
podAnnotationsobject{}
podSecurityContextobject{}
replicaCountint1
resourcesobject{}
securityContextobject{}
service.ingress.annotationsobject{}
service.ingress.enabledboolfalse
service.ingress.hosts[0].hoststring"chart-example.local"
service.ingress.hosts[0].pathslist[]
service.ingress.tlslist[]
service.openshiftRoute.enabledbooltrue
service.openshiftRoute.hoststring""
service.openshiftRoute.pathstring""
service.openshiftRoute.tls.enabledbooltrue
service.openshiftRoute.tls.insecureEdgeTerminationPolicystring"Redirect"
service.openshiftRoute.tls.terminationstring"edge"
service.openshiftRoute.wildcardPolicystring"None"
service.portint8080
service.typestring"ClusterIP"
serviceAccount.annotationsobject{}
serviceAccount.createboolfalse
serviceAccount.namestring"anyuid"
storage.enabledbooltrue
storage.mountPathstring"/home/coder/project"
storage.sizestring"5Gi"
tolerationslist[]

Deploy webapp with OpenTenant

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