Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
Signed-off-by: bakhtin <[email protected]>
  • Loading branch information
bakhtin committed Aug 28, 2023
1 parent 9488ad7 commit 6b6a6bb
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 16 deletions.
6 changes: 5 additions & 1 deletion charts/substrate-faucet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ apiVersion: v2
name: substrate-faucet
description: A Helm chart to deploy substrate-faucet
type: application
version: 2.2.2
version: 3.0.1
maintainers:
- name: Parity
url: https://github.com/paritytech/helm-charts
dependencies:
- name: postgresql
version: "12.8.3"
repository: "https://charts.bitnami.com/bitnami"
3 changes: 2 additions & 1 deletion charts/substrate-faucet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ The helm chart installs the [Substrate Matrix faucet](https://github.com/parityt
To deploy a Westend faucet:
```console
helm repo add parity https://paritytech.github.io/helm-charts/
helm dependency update
helm install substrate-faucet parity/substrate-faucet \
--set faucet.secret.SMF_CONFIG_FAUCET_ACCOUNT_MNEMONIC="//Alice" \
--set faucet.secret.SMF_CONFIG_MATRIX_ACCESS_TOKEN="******" \
--set faucet.config.SMF_CONFIG_MATRIX_SERVER="https://matrix.org" \
--set faucet.config.SMF_CONFIG_MATRIX_BOT_USER_ID="@test_bot_faucet:matrix.org"
--set faucet.config.SMF_CONFIG_MATRIX_BOT_USER_ID="@test_bot_faucet:matrix.org" \
--set faucet.config.SMF_CONFIG_NETWORK="westend"
```

Expand Down
4 changes: 4 additions & 0 deletions charts/substrate-faucet/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ data:
{{- range $key, $val := .Values.faucet.config }}
{{ $key }}: {{ $val | quote }}
{{- end }}
SMF_CONFIG_DB_HOST: "{{ .Release.Name }}-postgresql"
SMF_CONFIG_DB_PORT: "5432"
SMF_CONFIG_DB_USERNAME: postgres
SMF_CONFIG_DB_DATABASE_NAME: "{{ .Values.postgresql.global.postgresql.auth.database }}"
{{- end }}
19 changes: 5 additions & 14 deletions charts/substrate-faucet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,15 @@ spec:
env:
- name: SMF_CONFIG_PORT
value: "5555"
{{- range $key, $val := .Values.faucet.secret }}
- name: {{ $key }}
valueFrom:
secretKeyRef:
key: {{ $key }}
name: {{ $.Values.faucet.existingSecret | default (printf "%s-secret" $.Release.Name) }}
{{- end }}
{{- range $key, $val := .Values.faucet.config }}
- name: {{ $key }}
valueFrom:
configMapKeyRef:
key: {{ $key }}
name: {{ $.Values.faucet.existingConfigMap | default (printf "%s-config" $.Release.Name) }}
{{- end }}
- name: SMF_CONFIG_DEPLOYED_REF
value: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- name: SMF_CONFIG_EXTERNAL_ACCESS
value: {{ .Values.faucet.externalAccess | quote }}
envFrom:
- configMapRef:
name: {{ $.Values.faucet.existingConfigMap | default (printf "%s-config" $.Release.Name) }}
- secretRef:
name: {{ $.Values.faucet.existingSecret | default (printf "%s-secret" $.Release.Name) }}
ports:
- name: http
containerPort: 5555
Expand Down
1 change: 1 addition & 0 deletions charts/substrate-faucet/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ data:
{{- range $key, $val := .Values.faucet.secret }}
{{ $key }}: {{ $val | b64enc }}
{{- end }}
SMF_CONFIG_DB_PASSWORD: {{ .Values.postgresql.global.postgresql.auth.postgresPassword | b64enc | quote -}}
{{- end }}
17 changes: 17 additions & 0 deletions charts/substrate-faucet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,20 @@ ingress:
## @param ingress.enabled Specifies whether as Ingress should be created
##
enabled: false

postgresql:
global:
postgresql:
auth:
database: faucet
postgresPassword: "Secret!"
primary:
persistence:
size: 4Gi
resources:
limits:
cpu: 500m
memory: 1024Mi
requests:
cpu: 250m
memory: 512Mi

0 comments on commit 6b6a6bb

Please sign in to comment.