Skip to content

Commit

Permalink
[GHA] Update go-monorepo chart
Browse files Browse the repository at this point in the history
  • Loading branch information
krzwiatrzyk committed Jun 25, 2024
1 parent e894ce4 commit f288d77
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/go-monorepo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiVersion: v2
name: go-monorepo
version: 0.0.1
version: 0.0.2
6 changes: 6 additions & 0 deletions charts/go-monorepo/Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 3

tasks:
template:test:
cmds:
- helm template -f values-test.yaml .
7 changes: 7 additions & 0 deletions charts/go-monorepo/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ if .Values.envs }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-envs
data: {{ .Values.envs | toYaml | nindent 2 }}
{{ end }}
11 changes: 4 additions & 7 deletions charts/go-monorepo/templates/lib/containers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
{{ if .Values.args }}
args: {{ .Values.args | toYaml | nindent 2 }}
{{ end }}
{{ if .Values.secretEnvs }}
envFrom:
{{ if .Values.secrets.enabled }}
- secretRef:
name: {{.Values.secretEnvs }}
name: {{ .Release.Name }}-envs
{{ end }}
{{ if .Values.envs }}
env:
{{ range $key, $value := .Values.envs }}
- name: {{ $key }}
value: {{ $value }}
{{ end }}
- configMapRef:
name: {{ .Release.Name }}-envs
{{ end }}
{{ end }}
17 changes: 16 additions & 1 deletion charts/go-monorepo/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
# TODO
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: {{ .Release.Name }}-envs
annotations:
argocd.argoproj.io/sync-wave: "-5"
spec:
secretStoreRef:
name: vault
kind: ClusterSecretStore
refreshInterval: 1h
dataFrom:
- extract:
key: /{{ .Values.environment }}/{{ .Values.name }}
target:
name: {{ .Release.Name }}-envs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ resources:

imagePullSecrets: []

environment: test

# -- Options: deployment | rollout
controller: deployment

Expand Down
2 changes: 1 addition & 1 deletion charts/go-monorepo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ args: []
secrets:
enabled: true

envs:
envs: {}
# KEY: VALUE

0 comments on commit f288d77

Please sign in to comment.