gcp-night-king

by joaquinito2051

Helm chartv1.0.2App 1

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.

ParameterDescriptionDefault
image.pullPolicyContainer pull policyIfNotPresent
image.repositoryContainer image to useitamarost/gcp-night-king
image.tagContainer image tag to deployv1-golang
replicaCountk8s replicas1
resourcesService resource requests and limitsnil
projectIDGCE project ID for GCE APIMandatory parameter
subscriptionNamePub/Sub subscription name to listen onnil
nodeSelectorNode 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgcp-night-king is pinned at v1.0.2 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