pod-gateway-setter

by funkypenguin

Helm chartv1.0.0App 1.0.0Verified publisher

Admision controller to change the default gateway and DNS server of PODs

About this chart

pod-gateway-setter

Admision controller to change the default gateway and DNS server of PODs

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

Source Code

Requirements

Kubernetes: >=1.16.0-0

Dependencies

RepositoryNameVersion
https://library-charts.k8s-at-home.comcommon2.5.0

TL;DR

helm repo add k8s-at-home https://k8s-at-home.com/charts/
helm repo update
helm install pod-gateway-setter k8s-at-home/pod-gateway-setter

Installing the Chart

To install the chart with the release name pod-gateway-setter

helm install pod-gateway-setter k8s-at-home/pod-gateway-setter

Uninstalling the Chart

To uninstall the pod-gateway-setter deployment

helm uninstall pod-gateway-setter

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 pod-gateway-setter \
  --set env.TZ="America/New York" \
    k8s-at-home/pod-gateway-setter

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

helm install pod-gateway-setter k8s-at-home/pod-gateway-setter -f values.yaml

Custom configuration

You need to set gateway to the hostname or address of your gateway. Then all PODs in namespaces with the matching label (routed-gateway=true by default) will be processed by the webhook.

The webhook by default changes all processed pods (remove --setGatewayDefault if you want to change the default). You can also change the default for a POD by adding a label or annotation (setGateway by default).

Processed PODs will get their default gateway changed. DNS server will also be set to the gateway (at least the option --keepDNS is used).

Multiple instances of this chart might be installed that use different label values. This is usufull, for example, to route multiple pod groups, each with a different gateway.

IMPORTANT: Do not deploy this chart to a namespace controlled by this webhook. This would result in a likelly deathlock when upgrading the chart.

NOTE: This char requires the cert-manager CRD to generate the required certificates.

Values

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

KeyTypeDefaultDescription
additionalVolumeMounts[0].mountPathstring"/tls"
additionalVolumeMounts[0].namestring"certs"
additionalVolumeMounts[0].readOnlybooltrue
args[0]string"--tls-cert-file-path=/tls/tls.crt"
args[1]string"--tls-key-file-path=/tls/tls.key"
args[2]string"--setGatewayDefault"
args[3]string"--setGatewayLabel=setGateway"
args[4]string"--setGatewayAnnotation=setGateway"
gatewaystring"10.0.2.7"Gateway to route traffic to. Can be an hostname or an IP
image.pullPolicystring"IfNotPresent"
image.repositorystring"ghcr.io/k8s-at-home/gateway-admision-controller"
image.tagstring"v2.0.0"
ingress.enabledboolfalse
namespaceSelectorobject{"matchLabels":{"routed-gateway":"true"}}Selector for namespace. All pods in this namespace will get their default gateway changed
probes.liveness.custombooltrue
probes.liveness.enabledbooltrue
probes.liveness.spec.failureThresholdint5
probes.liveness.spec.httpGet.pathstring"/wh/health"
probes.liveness.spec.httpGet.portint8080
probes.liveness.spec.httpGet.schemestring"HTTPS"
probes.liveness.spec.initialDelaySecondsint1
probes.liveness.spec.timeoutSecondsint10
probes.readiness.custombooltrue
probes.readiness.enabledbooltrue
probes.readiness.spec.failureThresholdint5
probes.readiness.spec.httpGet.pathstring"/wh/health"
probes.readiness.spec.httpGet.portint8080
probes.readiness.spec.httpGet.schemestring"HTTPS"
probes.readiness.spec.initialDelaySecondsint1
probes.readiness.spec.timeoutSecondsint10
probes.startup.custombooltrue
probes.startup.enabledbooltrue
probes.startup.spec.failureThresholdint30
probes.startup.spec.httpGet.pathstring"/wh/health"
probes.startup.spec.httpGet.portint8080
probes.startup.spec.httpGet.schemestring"HTTPS"
probes.startup.spec.periodSecondsint1
service.port.pathstring"/wh/mutating/setgateway"
service.port.portint8080
strategy.typestring"RollingUpdate"

Changelog

All notable changes to this application Helm chart will be documented in this file but does not include changes from our common library. To read those click here.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0

Added

  • Initial version

Changed

  • N/A

Removed

  • N/A

Support


Autogenerated from chart metadata using helm-docs v1.5.0

Deploy pod-gateway-setter with OpenTenant

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