Skip to content

Commit

Permalink
chore: simplify conditionals for optional resources
Browse files Browse the repository at this point in the history
Signed-off-by: Kranium Gikos Mendoza <kraniumgikos.mendoza@iohk.io>
  • Loading branch information
womfoo committed May 27, 2024
1 parent 8e8c8d1 commit 84f995c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion infrastructure/charts/node/templates/configmap-nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.vdr.externalResources.wallet.tls }}
{{- if and (.Values.vdr.externalResources.wallet.tls)
(not (empty .Values.vdr.externalResources.db_sync.host)) }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
8 changes: 4 additions & 4 deletions infrastructure/charts/node/templates/externalsecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ spec:
- extract:
key: {{ .Values.secrets.dockerRegistryToken }}
---
# Requires wallet to be created (atm it's done through terraform module)
{{- if and (eq .Values.server.ledger "cardano") (not (empty .Values.vdr.cardanoWallet)) }}
{{- if and (not (empty .Values.vdr.externalResources.wallet.host))
(not (empty .Values.vdr.externalResources.db_sync.host)) }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
Expand All @@ -38,7 +38,7 @@ spec:
key: {{ .Values.vdr.cardanoWallet }}
---
{{- end }}
{{- if and (eq .Values.server.ledger "cardano") (not (empty .Values.vdr.externalResources.wallet.host)) }}
{{- if not (empty .Values.vdr.externalResources.wallet.host) }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
Expand All @@ -56,7 +56,7 @@ spec:
key: "{{ .Values.secrets.cardanoWallet }}"
---
{{- end }}
{{- if and (eq .Values.server.ledger "cardano") (not (empty .Values.vdr.externalResources.db_sync.host)) }}
{{- if not (empty .Values.vdr.externalResources.db_sync.host) }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
Expand Down

0 comments on commit 84f995c

Please sign in to comment.