Skip to content

Commit

Permalink
Fix all-in-one chart to use prefix for external secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
sky1045 committed Oct 11, 2023
1 parent dd55e7d commit 6d1e367
Show file tree
Hide file tree
Showing 14 changed files with 58 additions and 13 deletions.
4 changes: 3 additions & 1 deletion 9c-internal/9c-claim-items-test/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ global:

resetSnapshot: true
rollbackSnapshot: false
useExternalSecret: true

externalSecret:
enabled: true

snapshot:
downloadSnapshot: true
Expand Down
4 changes: 3 additions & 1 deletion 9c-internal/9c-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ global:

resetSnapshot: true
rollbackSnapshot: false
useExternalSecret: true

externalSecret:
enabled: true

snapshot:
downloadSnapshot: true
Expand Down
5 changes: 4 additions & 1 deletion 9c-internal/9c-single/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ global:
consensusType: pbft

resetSnapshot: false
useExternalSecret: true
slackToken: ""
slackWebHookUrl: ""

externalSecret:
enabled: true
prefix: "9c-single"

snapshot:
downloadSnapshot: false
fullSnapshot:
Expand Down
4 changes: 3 additions & 1 deletion 9c-main/9c-network/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ global:

resetSnapshot: false
rollbackSnapshot: false
useExternalSecret: true

externalSecret:
enabled: true

snapshot:
slackChannel: "9c-mainnet"
Expand Down
6 changes: 5 additions & 1 deletion charts/all-in-one/templates/secret-aws-keys.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecret.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
Expand All @@ -16,7 +16,11 @@ spec:
creationPolicy: Owner
dataFrom:
- extract:
{{- if .Values.externalSecret.prefix }}
key: {{ .Values.externalSecret.prefix }}/aws-keys
{{- else }}
key: {{ .Values.clusterName }}/aws-keys
{{- end }}
{{ else }}
apiVersion: v1
kind: Secret
Expand Down
6 changes: 5 additions & 1 deletion charts/all-in-one/templates/secret-bridge.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if .Values.bridge.enabled }}
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecret.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
Expand All @@ -17,7 +17,11 @@ spec:
creationPolicy: Owner
dataFrom:
- extract:
{{- if .Values.externalSecret.prefix }}
key: {{ .Values.externalSecrets.prefix }}/bridge
{{- else }}
key: {{ .Values.clusterName }}/bridge
{{- end }}
{{ else }}
apiVersion: v1
kind: Secret
Expand Down
6 changes: 5 additions & 1 deletion charts/all-in-one/templates/secret-data-provider.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if .Values.dataProvider.enabled }}
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecret.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
Expand All @@ -17,7 +17,11 @@ spec:
creationPolicy: Owner
dataFrom:
- extract:
{{- if .Values.externalSecret.prefix }}
key: {{ .Values.externalSecret.prefix }}/data-provider
{{- else }}
key: {{ .Values.clusterName }}/data-provider
{{- end }}
{{ else }}
apiVersion: v1
kind: Secret
Expand Down
6 changes: 5 additions & 1 deletion charts/all-in-one/templates/secret-market-db.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if .Values.marketService.enabled }}
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecret.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
Expand All @@ -17,7 +17,11 @@ spec:
creationPolicy: Owner
dataFrom:
- extract:
{{- if .Values.externalSecret.prefix }}
key: {{ .Values.externalSecret.prefix }}/market-db
{{- else }}
key: {{ .Values.clusterName }}/market-db
{{- end }}
{{ else }}
apiVersion: v1
kind: Secret
Expand Down
6 changes: 5 additions & 1 deletion charts/all-in-one/templates/secret-patrol-reward.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if .Values.patrolRewardService.enabled }}
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecrets.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
Expand All @@ -17,7 +17,11 @@ spec:
creationPolicy: Owner
dataFrom:
- extract:
{{- if .Values.externalSecret.prefix }}
key: {{ .Values.externalSecret.prefix }}/patrol-reward
{{- else }}
key: {{ .Values.clusterName }}/patrol-reward
{{- end }}
{{ else }}
apiVersion: v1
kind: Secret
Expand Down
6 changes: 5 additions & 1 deletion charts/all-in-one/templates/secret-private-keys.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecret.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
Expand All @@ -16,7 +16,11 @@ spec:
creationPolicy: Owner
dataFrom:
- extract:
{{- if .Values.externalSecret.prefix }}
key: {{ .Values.externalSecret.prefix }}/private-keys
{{- else }}
key: {{ .Values.clusterName }}/private-keys
{{- end }}
{{ else }}
apiVersion: v1
kind: Secret
Expand Down
6 changes: 5 additions & 1 deletion charts/all-in-one/templates/secret-slack-token.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecret.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
Expand All @@ -16,7 +16,11 @@ spec:
creationPolicy: Owner
dataFrom:
- extract:
{{- if .Values.externalSecret.prefix }}
key: {{ .Values.externalSecret.prefix }}/slack
{{- else }}
key: {{ .Values.clusterName }}/slack
{{- end }}
{{ else }}
apiVersion: v1
kind: Secret
Expand Down
2 changes: 1 addition & 1 deletion charts/all-in-one/templates/secret-store.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecret.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: SecretStore
metadata:
Expand Down
6 changes: 5 additions & 1 deletion charts/all-in-one/templates/secret-world-boss.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if .Values.worldBoss.enabled }}
{{ if .Values.global.useExternalSecret }}
{{ if .Values.externalSecret.enabled }}
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
Expand All @@ -17,7 +17,11 @@ spec:
creationPolicy: Owner
dataFrom:
- extract:
{{- if .Values.externalSecret.prefix }}
key: {{ .Values.externalSecret.prefix }}/world-boss-env
{{- else }}
key: {{ .Values.clusterName }}/world-boss-env
{{- end }}
{{ else }}
apiVersion: v1
kind: Secret
Expand Down
4 changes: 4 additions & 0 deletions charts/all-in-one/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ global:
slackToken: ""
slackWebHookUrl: ""

externalSecret:
enabled: false
prefix: ""

snapshot:
downloadSnapshot: false
fullSnapshot:
Expand Down

0 comments on commit 6d1e367

Please sign in to comment.