Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cloudsql to faucet #286

Merged
merged 2 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.0
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
5 changes: 5 additions & 0 deletions charts/substrate-faucet/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ data:
{{- range $key, $val := .Values.faucet.config }}
{{ $key }}: {{ $val | quote }}
{{- end }}
POSTGRESQL_HOST: "{{ .Release.Name }}-postgresql"
POSTGRESQL_PORT: "5432"
POSTGRESQL_USERNAME: postgres
POSTGRESQL_DATABASE: postgres
POSTGRESQL_SSLMODE: disable
{{- 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 }}
POSTGRESQL_PASSWORD: {{ .Values.postgresql.global.postgresql.auth.postgresPassword | b64enc | quote -}}
{{- end }}
16 changes: 16 additions & 0 deletions charts/substrate-faucet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,19 @@ ingress:
## @param ingress.enabled Specifies whether as Ingress should be created
##
enabled: false

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