Skip to content

Commit

Permalink
fix: pass database certs when seeding (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
StarpTech authored Apr 5, 2024
1 parent a399c66 commit 4bd0587
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/cosmo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: '0.1.3'
version: '0.1.4'

home: https://github.com/wundergraph/cosmo

Expand Down
4 changes: 2 additions & 2 deletions helm/cosmo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

For a detailed deployment guide of the chart, including the full documentation, see the [DEV.md](DEV.md) file.

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

This is the official Helm Chart for WunderGraph Cosmo - The Full Lifecycle GraphQL API Management Solution.

Expand Down Expand Up @@ -39,7 +39,7 @@ This is the official Helm Chart for WunderGraph Cosmo - The Full Lifecycle Graph
| clickhouse.auth.username | string | `"default"` | |
| clickhouse.commonAnnotations."kapp.k14s.io/change-group" | string | `"cosmo.apps.clickhouse.wundergraph.com/deployment"` | |
| clickhouse.image.tag | string | `"23.8.3"` | |
| clickhouse.initdbScripts."db-init.sql" | string | `"CREATE DATABASE cosmo;\n"` | |
| clickhouse.initdbScripts."db-init.sh" | string | `"#!/bin/bash\nset -e\nclickhouse-client --user $CLICKHOUSE_ADMIN_USER --password $CLICKHOUSE_ADMIN_PASSWORD -n <<-EOSQL\n CREATE DATABASE IF NOT EXISTS cosmo;\nEOSQL\n"` | |
| clickhouse.persistence.annotations."kapp.k14s.io/owned-for-deletion" | string | `""` | |
| clickhouse.persistence.size | string | `"2Gi"` | |
| clickhouse.replicaCount | int | `1` | |
Expand Down
21 changes: 21 additions & 0 deletions helm/cosmo/charts/controlplane/templates/organization-seed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,27 @@ spec:
name: {{ include "controlplane.secretName" . }}

key: databaseUrl
{{- if .Values.configuration.databaseTlsCert }}
- name: DB_TLS_CERT
valueFrom:
secretKeyRef:
name: {{ include "controlplane.secretName" . }}
key: databaseTlsCert
{{- end }}
{{- if .Values.configuration.databaseTlsCa }}
- name: DB_TLS_CA
valueFrom:
secretKeyRef:
name: {{ include "controlplane.secretName" . }}
key: databaseTlsCa
{{- end }}
{{- if .Values.configuration.databaseTlsKey }}
- name: DB_TLS_KEY
valueFrom:
secretKeyRef:
name: {{ include "controlplane.secretName" . }}
key: databaseTlsKey
{{- end }}
- name: USER_EMAIL
value: "{{ .Values.global.seed.userEmail }}"
- name: USER_PASSWORD
Expand Down

0 comments on commit 4bd0587

Please sign in to comment.