gcp-night-king
A Helm chart for GCP Night King
About this chart
GCP Night King Helm Chart
This directory contains a Kubernetes chart to deploy a GCP Night King service.
TL;DR;
$ helm install <helm-repo>/gcp-night-king --set projectID=$( gcloud config get-value project )
$ helm install stable/gcp-night-king --set projectID=$( gcloud config get-value project )
Chart Details
This chart will do the following:
- Install a service (K8s Deployment) that listens on a Pub/Sub subscription for instance preemption messages and resurrects preempted instances once they are terminated.
Installing the Chart
To install the chart with the release name my-release:
$ helm install --name my-release <helm-repo>/gcp-night-king
$ helm install --name my-release stable/gcp-night-king
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of this chart and their default values.
| Parameter | Description | Default |
|---|---|---|
image.pullPolicy | Container pull policy | IfNotPresent |
image.repository | Container image to use | itamarost/gcp-night-king |
image.tag | Container image tag to deploy | v1-golang |
replicaCount | k8s replicas | 1 |
resources | Service resource requests and limits | nil |
projectID | GCE project ID for GCE API | Mandatory parameter |
subscriptionName | Pub/Sub subscription name to listen on | nil |
nodeSelector | Node labels for pod assignment | {} |
Specify each parameter using the --set key=value[,key=value] argument to helm install.
Deploy gcp-night-king with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has gcp-night-king 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 chartgcp-night-king is pinned at v1.0.2 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