kube-gcp-disks-roomba
by Helm
Helm chart for kubernetes for running an script that runs as a cronjob resource in kubernetes in GKE environments.Removes disks from GCP that are not in use.
About this chart
kube-gcp-disks-roomba-chart
Helm chart for https://github.com/softonic/kube-gcp-disks-roomba
Overview
| Parameter | Description | Default |
|---|---|---|
args | Array of GCP zones to check | null |
image.tag | Tag used for the image | latest |
resources | Nested hash of chart resources | null |
secretKey | If the google auth file is saved in a different secret key | key.json |
If the google auth file is saved in a different secret key you can specify it here secretKey: key.json
Usage
YOU SHOULD PROVIDE A SECRET NAME CALLED credentials. And should contain the json service account credentials that will have the permissions to delete the unused disks in GCP.
If we want this chart to work, we need to set the following secrets:
- credentials:
Will be a secret mount with the contents of the environment variable GOOGLE_APPLICATION_CREDENTIALS
This is an extract of cronjob yaml definition
volumeMounts:
- name: google-cloud-key
mountPath: /secrets
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /secrets/key.json
{{- end }}
{{- if .Values.secret }}
volumes:
- name: google-cloud-key
secret:
secretName: {{ .Values.secret }}
items:
- key: {{ default "key.json" .Values.secretKey }}
path: key.json
{{- end }}
Deploy kube-gcp-disks-roomba with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kube-gcp-disks-roomba 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 chartkube-gcp-disks-roomba is pinned at v1.17.0 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