Skip to content

Commit

Permalink
Merge pull request #102 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 9d4817c + ddc7fd5 commit 8b15254
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 27 deletions.
74 changes: 48 additions & 26 deletions mojaloop/iac/roles/cc_k8s/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,28 @@ argocd_default:
k8s_admin_rbac_group: "techops-admin"
k8s_oidc_post_config_output_secret: "k8s-oidc-post-config-output"
post_config_sync_wave: "'-1'"
cockroachdb:
app_name: "cockroach-db"
sub_app_enabled: "true"
rdbms_provider: "percona"
externalservice_name: "zitadel-db-external"
zitadel_db_name: "zitadel"
zitadel_db_username: "zitadel"
zitadel_dbdeploy_name_prefix: "zitadel-db"
zitadel_db_secret: "zitadel-postgresql-credentials"
config_secret_name: "zitadel-config"
zitadel_percona_provider:
app_name: "zitadel-percona"
pgdb_helm_version: "2.4.3"
pvc_size: "10Gi"
postgres_replicas: "'1'"
proxy_replicas: "'1'"
postgres_storage_size: "20"
zitadel_rds_provider:
rdbms_subnet_list: "[]"
vpc_cidr: "0.0.0.0/0"
db_provider_cloud_region: "eu-west-1"
postgres_instance_size: "small"
postgres_storage_size: "'20'"
zitadel_cockroachdb_provider:
app_name: "cockroachdb"
helm_version: "13.0.2"
pvc_size: "5Gi"
netbird:
Expand Down Expand Up @@ -382,18 +401,6 @@ argocd_default:
app_name: "pre"
sub_app_enabled: "true"
sync_wave: "'1'"
redis_cluster_size: "'3'"
redis_storage_size: "'2Gi'"
postgres_replicas: "'1'"
postgres_proxy_replicas: "'1'"
postgres_storage_size: "100"
postgres_instance_size: "small"
pgdb_helm_version: "2.4.0"
praefect_postgres_replicas: "'1'"
praefect_postgres_proxy_replicas: "'1'"
praefect_postgres_storage_size: "100"
praefect_postgres_instance_size: "small"
praefect_pgdb_helm_version: "2.4.0"
git_lfs_max_objects: "'1000000'"
git_lfs_storage_size: "10Gi"
gitlab_artifacts_max_objects: "'1000000'"
Expand All @@ -413,23 +420,38 @@ argocd_default:
gitlab_registry_max_objects: "'1000000'"
gitlab_registry_storage_size: "10Gi"
gitlab_runner_cache_max_objects: "'1000000'"
gitlab_runner_cache_storage_size: "10Gi"
rdbms_provider: "percona"
rdbms_subnet_list: "[]"
vpc_cidr: "0.0.0.0/0"
db_provider_cloud_region: "eu-west-1"
gitlab_db_secret: "gitlab-postgresql-credentials"
praefect_db_secret: "praefect-postgresql-credentials"
gitlab_runner_cache_storage_size: "10Gi"
redis_cluster_size: "'3'"
redis_storage_size: "'2Gi'"
gitlab_db_name: "gitlab"
praefect_db_name: "praefect"
gitlab_db_username: "gitlab"
praefect_db_username: "praefect"
gitlab_dbdeploy_name_prefix: "gitlab-db"
praefect_dbdeploy_name_prefix: "praefect-db"
gitlab_db_backup_retention_period: "'1'"
gitlab_db_preferred_backup_window: "07:00-09:00"
praefect_db_backup_retention_period: "'1'"
praefect_db_preferred_backup_window: "07:00-09:00"
rdbms_provider: "percona"
gitlab_db_secret: "gitlab-postgresql-credentials"
praefect_db_secret: "praefect-postgresql-credentials"
webdb_percona_provider:
postgres_replicas: "'1'"
postgres_proxy_replicas: "'1'"
postgres_storage_size: "100"
postgres_instance_size: "small"
pgdb_helm_version: "2.4.0"
praefectdb_percona_provider:
postgres_replicas: "'1'"
postgres_proxy_replicas: "'1'"
postgres_storage_size: "100"
postgres_instance_size: "small"
pgdb_helm_version: "2.4.0"
webdb_rds_provider:
rdbms_subnet_list: "[]"
vpc_cidr: "0.0.0.0/0"
db_provider_cloud_region: "eu-west-1"
praefectdb_rds_provider:
rdbms_subnet_list: "[]"
vpc_cidr: "0.0.0.0/0"
db_provider_cloud_region: "eu-west-1"
post_config:
app_name: "gitlab-post-config"
sub_app_enabled: "true"
Expand Down
4 changes: 3 additions & 1 deletion mojaloop/iac/roles/cc_k8s/tasks/teardown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
kubectl patch application -n {{ fact_argo_merged_config.namespace }} root-deployer --type json --patch='[ { "op": "remove", "path": "/spec/syncPolicy/automated" } ]' || true
kubectl patch application -n {{ fact_argo_merged_config.namespace }} vault-post-config --type json --patch='[ { "op": "remove", "path": "/spec/syncPolicy/automated" } ]' || true
kubectl patch application -n {{ fact_argo_merged_config.namespace }} gitlab-pre --type json --patch='[ { "op": "remove", "path": "/spec/syncPolicy/automated" } ]' || true
kubectl patch application -n {{ fact_argo_merged_config.namespace }} zitadel-pre --type json --patch='[ { "op": "remove", "path": "/spec/syncPolicy/automated" } ]' || true
kubectl delete workspaces.tf.upbound.io vault-{{ cluster_cloud_provider }}-post-config
kubectl delete workspaces.tf.upbound.io vault-post-config
kubectl delete dbinstanceclaim -n {{ fact_argo_merged_config.apps['gitlab'].sub_apps['gitlab'].namespace }} --ignore-not-found=true --all
kubectl delete dbinstanceclaim -n {{ fact_argo_merged_config.apps['security'].sub_apps['zitadel'].namespace }} --ignore-not-found=true --all
args:
executable: /bin/bash
# - name: Wait for vault to be gone
# shell: |
# shell: |
# export KUBECONFIG={{ kubeconfig_location }}/kubeconfig
# kubectl patch workspace netbird-pre-config --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]' || true
# kubectl patch workspace zitadel-post-config --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]' || true
Expand Down

0 comments on commit 8b15254

Please sign in to comment.