From 6585975dfd5c6f9a00f0e2b889965f48a0bb46f8 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 6 Nov 2023 22:42:07 +0100 Subject: [PATCH] Added AWS S3 access token to cluster_setup --- helm/cluster_setup/Chart.yaml | 4 ++-- .../cluster_setup/templates/thanos-object-storage.yaml | 10 ++++++++++ helm/cluster_setup/thanos.yaml | 6 ++++++ helm/cluster_setup/values.yaml | 9 ++++++++- 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 helm/cluster_setup/templates/thanos-object-storage.yaml create mode 100644 helm/cluster_setup/thanos.yaml diff --git a/helm/cluster_setup/Chart.yaml b/helm/cluster_setup/Chart.yaml index 877b355..a302bb5 100644 --- a/helm/cluster_setup/Chart.yaml +++ b/helm/cluster_setup/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: cluster_setup -version: 0.2.0 +version: 0.3.0 type: application description: "Initial cluster setup" maintainers: @@ -9,7 +9,7 @@ maintainers: annotations: artifacthub.io/changes: | - kind: added - description: Added support for hcloud token + description: Added support for thanos AWS S3 token artifacthub.io/signKey: | fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc diff --git a/helm/cluster_setup/templates/thanos-object-storage.yaml b/helm/cluster_setup/templates/thanos-object-storage.yaml new file mode 100644 index 0000000..ebfe8cd --- /dev/null +++ b/helm/cluster_setup/templates/thanos-object-storage.yaml @@ -0,0 +1,10 @@ +{{- if .Values.thanos.enabled }} +apiVersion: v1 +kind: Secret +metadata: + namespace: {{ .Values.thanos.namespace | default "observability" }} + name: thanos-object-storage-config +data: + thanos.yaml: |- + {{ tpl (.Files.Get "thanos.yaml") . | b64enc }} +{{- end }} \ No newline at end of file diff --git a/helm/cluster_setup/thanos.yaml b/helm/cluster_setup/thanos.yaml new file mode 100644 index 0000000..d7386d5 --- /dev/null +++ b/helm/cluster_setup/thanos.yaml @@ -0,0 +1,6 @@ +type: s3 +config: + bucket: {{ .Values.thanos.bucketName }} + endpoint: s3.{{ .Values.thanos.awsRegion }}.amazonaws.com + access_key: {{ .Values.thanos.accessKey }} + secret_key: {{ .Values.thanos.secretKey }} \ No newline at end of file diff --git a/helm/cluster_setup/values.yaml b/helm/cluster_setup/values.yaml index cbe90aa..990b14f 100644 --- a/helm/cluster_setup/values.yaml +++ b/helm/cluster_setup/values.yaml @@ -9,4 +9,11 @@ hcloud: enabled: false token: "" # if empty, hcloud will be used - namespace: "" \ No newline at end of file + namespace: "" +thanos: + enabled: true + namespace: "" + bucketName: "" + awsRegion: "eu-central-1" + accessKey: "" + secretKey: "" \ No newline at end of file