Skip to content

Commit

Permalink
feat: Add extraResources section (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
achetronic authored Nov 4, 2024
1 parent 21626f7 commit 341061d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions charts/devlake/templates/extraresources.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
13 changes: 13 additions & 0 deletions charts/devlake/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 341061d

Please sign in to comment.