From 341061df0d455cb67bdb75825a5981d6ce3d78a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alby=20Hern=C3=A1ndez?= <61636487+achetronic@users.noreply.github.com> Date: Mon, 4 Nov 2024 03:42:07 +0000 Subject: [PATCH] feat: Add extraResources section (#309) --- charts/devlake/templates/extraresources.yaml | 16 ++++++++++++++++ charts/devlake/values.yaml | 13 +++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 charts/devlake/templates/extraresources.yaml diff --git a/charts/devlake/templates/extraresources.yaml b/charts/devlake/templates/extraresources.yaml new file mode 100644 index 0000000..39338a8 --- /dev/null +++ b/charts/devlake/templates/extraresources.yaml @@ -0,0 +1,16 @@ +{{- if .Values.extraResources }} +{{- range .Values.extraResources }} +--- +{{- $resource := . | deepCopy }} + +{{- $objectLabels := include "devlake.labels" $ | fromYaml }} + +{{- if $resource.metadata.labels }} +{{- $objectLabels = merge $objectLabels $resource.metadata.labels }} +{{- end }} + +{{ $_ := set $resource.metadata "labels" $objectLabels -}} + +{{ toYaml $resource | nindent 0 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/devlake/values.yaml b/charts/devlake/values.yaml index 3605751..d06d6bb 100644 --- a/charts/devlake/values.yaml +++ b/charts/devlake/values.yaml @@ -415,3 +415,16 @@ option: # the existing k8s secret name of db connection auth. The secret name should be as same as .Values.grafana.envFromSecret connectionSecretName: "devlake-mysql-auth" autoCreateSecret: true + +# Define some extra resources to be created +# This section is useful when you need ExternalResource or Secrets, etc. +extraResources: [] + # - apiVersion: v1 + # kind: Secret + # metadata: + # name: example-secret + # labels: {} + # type: Opaque + # stringData: + # username: admin + # password: mypassword \ No newline at end of file