Skip to content

Commit

Permalink
Merge pull request #420 from mojaloop/feature/db-refactoring
Browse files Browse the repository at this point in the history
Feature/db refactoring
  • Loading branch information
sijo5722-2021 authored Nov 22, 2024
2 parents cfb6c2f + 58c2c38 commit 789d7c3
Show file tree
Hide file tree
Showing 49 changed files with 1,516 additions and 1,640 deletions.
9 changes: 0 additions & 9 deletions gitops/applications/base/zitadel-pre/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespaces.yaml
- virtual-services.yaml
- zitadel-cert-job.yaml
- zitadel-random-secrets.yaml
- local-external-secrets-store.yaml

helmCharts:
- name: cockroachdb
releaseName: zitadel-db
version: ${ARGOCD_ENV_cockroachdb_helm_version}
repo: https://charts.cockroachdb.com/
valuesFile: cockroach-db-values.yaml
namespace: ${ARGOCD_ENV_zitadel_namespace}

patches:
- target:
Expand Down
5 changes: 5 additions & 0 deletions gitops/applications/base/zitadel/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- virtual-services.yaml
- testvsjob.yaml
18 changes: 18 additions & 0 deletions gitops/applications/base/zitadel/testvsjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: batch/v1
kind: Job
metadata:
name: curl-test-zitadel-vs
spec:
template:
spec:
containers:
- name: curl-test
image: curlimages/curl:latest
command: ["sh"]
args:
[
"-c",
"exit_status=$(curl -v -o /dev/null -w '%{http_code}' https://zitadel.${ARGOCD_ENV_zitadel_dns_subdomain}); if [ $exit_status -ne 200 ] && [ $exit_status -ne 302 ]; then exit 1; fi;",
]
restartPolicy: OnFailure
backoffLimit: 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- zitadel-cert-job.yaml

helmCharts:
- name: cockroachdb
releaseName: zitadel-db
version: ${ARGOCD_ENV_cockroachdb_helm_version}
repo: https://charts.cockroachdb.com/
valuesFile: cockroach-db-values.yaml
namespace: ${ARGOCD_ENV_zitadel_namespace}

patches:
- target:
kind: CronJob
patch: |
- op: replace
path: /apiVersion
value: batch/v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
- name: zitadel
releaseName: zitadel
version: ${ARGOCD_ENV_zitadel_helm_version}
repo: https://charts.zitadel.com
valuesFile: zitadel-values.yaml
namespace: ${ARGOCD_ENV_zitadel_namespace}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
replicaCount: ${ARGOCD_ENV_zitadel_replicas}
zitadel:
masterkeySecretName: masterkey
debug:
enabled: false
configmapConfig:
Log:
Level: ${ARGOCD_ENV_zitadel_log_level}
ExternalPort: 443
ExternalSecure: true
ExternalDomain: zitadel.${ARGOCD_ENV_zitadel_dns_subdomain}
TLS:
Enabled: false
FirstInstance:
Org:
Machine:
Machine:
Username: zitadel-admin-sa
Name: Admin
MachineKey:
ExpirationDate: "2028-01-01T00:00:00Z"
# Type: 1 means JSON. This is currently the only supported machine key type.
Type: 1
Database:
Cockroach:
Host: zitadel-db-cockroachdb-public
User:
SSL:
Mode: verify-full
Admin:
SSL:
Mode: verify-full

secretConfig:
Database:
Cockroach:
User:
Password: xyz
Admin:
Password: abc

dbSslCaCrtSecret: zitadel-db-cockroachdb-ca-secret
dbSslAdminCrtSecret: zitadel-db-cockroachdb-client-secret
dbSslUserCrtSecret: zitadel-db-cockroachdb-zitadel-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: ${ARGOCD_ENV_externalservice_name}
namespace: "${ARGOCD_ENV_namespace}"
spec:
externalName: ${ARGOCD_ENV_dbdeploy_name_prefix}-pgbouncer.${ARGOCD_ENV_namespace}.svc.cluster.local
sessionAffinity: None
type: ExternalName
Loading

0 comments on commit 789d7c3

Please sign in to comment.