From b03908079f5e2d6a25ca70674d1f0aa2e207aa13 Mon Sep 17 00:00:00 2001 From: Kyle Rockman Date: Wed, 9 Oct 2024 14:15:13 -0500 Subject: [PATCH] Add ability to configure the AWS integration --- .../unreleased/Feature-20241009-141509.yaml | 3 +++ charts/opslevel/Chart.yaml | 2 +- charts/opslevel/templates/_helpers.tpl | 4 ++++ charts/opslevel/templates/opslevel/secret.yaml | 18 ++++++++++++++++++ charts/opslevel/values.yaml | 7 +++++++ 5 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Feature-20241009-141509.yaml diff --git a/.changes/unreleased/Feature-20241009-141509.yaml b/.changes/unreleased/Feature-20241009-141509.yaml new file mode 100644 index 0000000..f348f60 --- /dev/null +++ b/.changes/unreleased/Feature-20241009-141509.yaml @@ -0,0 +1,3 @@ +kind: Feature +body: Add ability to configure the AWS Cloud Integration in OpsLevel self-hosted +time: 2024-10-09T14:15:09.001435-05:00 diff --git a/charts/opslevel/Chart.yaml b/charts/opslevel/Chart.yaml index 48aa41a..4cc99cb 100644 --- a/charts/opslevel/Chart.yaml +++ b/charts/opslevel/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: "v2" name: "opslevel" type: "application" -version: "2024.9.16" +version: "2024.10.11" appVersion: "2024.9.16" description: "The OpsLevel internal developer portal helps your team ship fast without risking your software standards." home: "https://www.opslevel.com/" diff --git a/charts/opslevel/templates/_helpers.tpl b/charts/opslevel/templates/_helpers.tpl index 922b985..52ab97a 100644 --- a/charts/opslevel/templates/_helpers.tpl +++ b/charts/opslevel/templates/_helpers.tpl @@ -13,6 +13,10 @@ {{- end }} {{- define "opslevel.integration.secrets" -}} +{{- if .Values.integrations.aws.enabled }} + - secretRef: + name: '{{ .Values.integrations.aws.secret.name }}' +{{- end }} {{- if .Values.integrations.azureDevOps.enabled }} - secretRef: name: '{{ .Values.integrations.azureDevOps.secret.name }}' diff --git a/charts/opslevel/templates/opslevel/secret.yaml b/charts/opslevel/templates/opslevel/secret.yaml index cbec3bb..617c5c5 100644 --- a/charts/opslevel/templates/opslevel/secret.yaml +++ b/charts/opslevel/templates/opslevel/secret.yaml @@ -31,6 +31,24 @@ data: SMTP_PASSWORD: '{{ .Values.smtp.secret.password | b64enc }}' THROTTLER_PEPPER: '{{ .Values.opslevel.secret.throttlerPepper | b64enc }}' +{{- if .Values.integrations.aws.enabled }} +{{- if .Values.integrations.aws.secret.create }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: '{{ .Values.integrations.aws.secret.name }}' + labels: + app.kubernetes.io/component: secret + app.kubernetes.io/part-of: opslevel +type: Opaque +data: + AWS_INTEGRATION_ENABLED: '{{ .Values.integrations.aws.enabled | toString | b64enc }}' + AWS_INT_ACCESS_KEY: '{{ required "please provide 'integrations.aws.secret.appId'" .Values.integrations.aws.secret.appId | b64enc }}' + AWS_INT_SECRET_ACCESS_KEY: '{{ required "please provide 'integrations.aws.secret.clientSecret'" .Values.integrations.aws.secret.clientSecret | b64enc }}' +{{- end }} +{{- end }} + {{- if .Values.integrations.azureDevOps.enabled }} {{- if .Values.integrations.azureDevOps.secret.create }} --- diff --git a/charts/opslevel/values.yaml b/charts/opslevel/values.yaml index b8da582..7c01dbc 100644 --- a/charts/opslevel/values.yaml +++ b/charts/opslevel/values.yaml @@ -214,6 +214,13 @@ smtp: username: "" integrations: + aws: # Docs: + enabled: false + secret: + create: true + name: "opslevel-aws-devops" + accessKey: "" + secretKey: "" azureDevOps: # Docs: enabled: false secret: