kube-gcp-disks-roomba

by Helm

Helm chartv1.17.0App 1.0Apache-2.0

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

ParameterDescriptionDefault
argsArray of GCP zones to checknull
image.tagTag used for the imagelatest
resourcesNested hash of chart resourcesnull
secretKeyIf 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkube-gcp-disks-roomba is pinned at v1.17.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