ingress

by ameijer

Helm chartv1.1.0App v1.0.0Verified publisher

Helm Chart representing a single Ingress Kubernetes API object

About this chart

Ingress Chart

TL;DR;

$ helm repo add k8s-as-helm https://ameijer.github.io/k8s-as-helm/
$ helm install my-release k8s-as-helm/ingress

Introduction

Helm charts are great! They are really configurable and let you build complicated software stacks in seconds. Tools like Helmfile combine helm charts together to allow you to set up an environment consisting entirely of helm releases.

Let's say, though, you want to add additional code to a third party helm chart. You could make a new chart with your K8s API resource and the third party chart as a dependency, but that requires maintenance which might not be worth it if you only needed a single additional resource created. That's where k8s-as-helm charts come in. These charts wrap a single Kubernetes resource in a helm chart with all the key parameters exposed.

The ingress chart deploys a single Kubernetes Ingress object.

Installation

$ helm repo add k8s-as-helm https://ameijer.github.io/k8s-as-helm/
$ helm install my-release k8s-as-helm/ingress

Configuration

The following table lists the configurable parameters of the ingress chart and their default values.

ParameterDescriptionDefault
nameOverrideoverride name of the chart component.Release.Name
apiVersionapi version of k8s object"networking.k8s.io/v1"
ingressClassNameSpecify the class of the ingressnull
annotationsannotations in yaml map format to be added to the objectnull
labelslabels to add to Ingress objectnull
ingressClassNameIngressClass represents the class of the Ingressnull
hostsyaml list representing the host list entries for the Ingress objectnull
hosts[].urlURL of host list entrynull
hosts[].protocolthe protocol of the hosthttp
hosts[].pathsthe paths k8s yaml object containing the contents of the paths field for the ingressnull
tlsthe list of TLS block entries for the ingress objectnull

Upgrade

From 1.0.x to 2.0.x

When using kubernetes 1.19+, the apiVersion is now networking.k8s.io/v1, the hosts hash must be updated to use the new API.

Example Configuration

For some examples of values used to configure this chart, see the ci/example values for this chart

Deploy ingress with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ingress 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 chartingress 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