From 8b125220a38bfabb77430df601baf0f4cca9f3e9 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 6 Nov 2023 18:03:21 +0100 Subject: [PATCH] Added hcloud token to cluster_setup --- helm/cluster_setup/Chart.yaml | 6 +++--- helm/cluster_setup/templates/hcloud-token.yaml | 14 ++++++++++++++ .../templates/vault-service-principal.yaml | 1 + helm/cluster_setup/values.yaml | 8 +++++++- 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 helm/cluster_setup/templates/hcloud-token.yaml diff --git a/helm/cluster_setup/Chart.yaml b/helm/cluster_setup/Chart.yaml index 7b9f907..877b355 100644 --- a/helm/cluster_setup/Chart.yaml +++ b/helm/cluster_setup/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: cluster_setup -version: 0.1.3 +version: 0.2.0 type: application description: "Initial cluster setup" maintainers: @@ -8,8 +8,8 @@ maintainers: url: https://2martens.de annotations: artifacthub.io/changes: | - - kind: changed - description: Don't create namespace anymore + - kind: added + description: Added support for hcloud token artifacthub.io/signKey: | fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc diff --git a/helm/cluster_setup/templates/hcloud-token.yaml b/helm/cluster_setup/templates/hcloud-token.yaml new file mode 100644 index 0000000..e352da6 --- /dev/null +++ b/helm/cluster_setup/templates/hcloud-token.yaml @@ -0,0 +1,14 @@ +{{- if .Values.hcloud.enabled }} +apiVersion: v1 +kind: Namespace +metadata: + name: {{ .Values.hcloud.namespace | default "hcloud" }} +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: hcloud +data: + token: {{ .Values.hcloud.token | b64enc }} +{{- end }} \ No newline at end of file diff --git a/helm/cluster_setup/templates/vault-service-principal.yaml b/helm/cluster_setup/templates/vault-service-principal.yaml index 3431a15..7b811ba 100644 --- a/helm/cluster_setup/templates/vault-service-principal.yaml +++ b/helm/cluster_setup/templates/vault-service-principal.yaml @@ -8,6 +8,7 @@ metadata: --- apiVersion: v1 kind: Secret +type: Opaque metadata: name: vault-service-principal namespace: {{ .name }} diff --git a/helm/cluster_setup/values.yaml b/helm/cluster_setup/values.yaml index a17509b..cbe90aa 100644 --- a/helm/cluster_setup/values.yaml +++ b/helm/cluster_setup/values.yaml @@ -3,4 +3,10 @@ vault: enabled: false clientId: "" clientSecret: "" - applicationNamespaces: [] \ No newline at end of file + # creates each of the namespaces + applicationNamespaces: [] +hcloud: + enabled: false + token: "" + # if empty, hcloud will be used + namespace: "" \ No newline at end of file