Skip to content

Commit

Permalink
generated config maps programatically instead of manually
Browse files Browse the repository at this point in the history
  • Loading branch information
qcaas-nhs-sjt committed Oct 1, 2024
1 parent cf0aae0 commit 51f1932
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 40 deletions.
33 changes: 8 additions & 25 deletions templates/deployment-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,13 @@ metadata:
data:
environment_dns_prefix: {{ .Values.dns.prefix }}
environment_dns_suffix: {{ .Values.naming.suffix }}
ohdsi_branch: "{{ .Values.components.ohdsi.repository.branch }}"
ohdsi_chart_version: "{{ .Values.components.ohdsi.chart_version }}"
secrets_distributor_chart_version: "{{ .Values.components.secrets_distributor.chart_version }}"
secrets_distributor_branch: "{{ .Values.components.secrets_distributor.repository.branch }}"
certmanager_branch: "{{ .Values.components.cert_manager.repository.branch }}"
certmanager_chart_version: "{{ .Values.components.cert_manager.chart_version }}"
trustmanager_chart_version: "{{ .Values.components.trust_manager.chart_version }}"
github_runner_branch: "{{ .Values.components.github_runner.repository.branch }}"
github_runner_chart_version: "{{ .Values.components.github_runner.chart_version }}"
aks_dns_chart_version: "{{ .Values.components.aks_dns.chart_version }}"
nginx_branch: "{{ .Values.components.ingress_nginx.repository.branch }}"
nginx_chart_version: "{{ .Values.components.ingress_nginx.chart_version }}"
keda_branch: "{{ .Values.components.keda.repository.branch }}"
keda_chart_version: "{{ .Values.components.keda.chart_version }}"
jupyter_branch: "{{ .Values.components.jupyter_hub.repository.branch }}"
jupyter_chart_version: "{{ .Values.components.jupyter_hub.chart_version }}"
analytics_workspace_management_chart_version: "{{ .Values.components.analytics_workspace_management.chart_version }}"
analytics_workspace_management_branch: "{{ .Values.components.analytics_workspace_management.repository.branch }}"
metrics_server_chart_version: "{{ .Values.components.metrics_server.chart_version }}"
guacamole_chart_version: "{{ .Values.components.guacamole.chart_version }}"
guacamole_branch: "{{ .Values.components.guacamole.repository.branch }}"
rabbitmq_chart_version: "{{ .Values.components.rabbitmq.chart_version }}"
rabbitmq_branch: "{{ .Values.components.rabbitmq.repository.branch }}"
observability_metrics_version: "{{ .Values.components.observability_metrics.chart_version }}"
observability_metrics_branch: "{{ .Values.components.observability_metrics.repository.branch }}"
{{ range $key, $value := .Values.components }}
{{ if hasKey $value "branch"}}
{{ $key }}_branch: {{ $value.branch }}
{{ end }}
{{ if hasKey $value "chart_version"}}
{{ $key }}_char_version: {{ $value.branch }}
{{ end }}
{{ end }}


20 changes: 5 additions & 15 deletions templates/deployment-namespaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@ kind: ConfigMap
metadata:
name: {{ printf "deployment-namespaces%s" .Values.naming.suffix }}
data:
ohdsi_namespace: {{ .Values.components.ohdsi.namespace }}
secrets_distributor_namespace: {{ .Values.components.secrets_distributor.namespace }}
certmanager_namespace: {{ .Values.components.cert_manager.namespace }}
trustmanager_namespace: {{ .Values.components.trust_manager.namespace }}
github_runner_namespace: {{ .Values.components.github_runner.namespace }}
aks_dns_namespace: {{ .Values.components.aks_dns.namespace }}
nginx_namespace: {{ .Values.components.ingress_nginx.namespace }}
keda_namespace: {{ .Values.components.keda.namespace }}
jupyter_namespace: {{ .Values.components.jupyter_hub.namespace }}
analytics_workspace_management_namespace: {{ .Values.components.analytics_workspace_management.namespace }}
metrics_server_namespace: {{ .Values.components.metrics_server.namespace }}
guacamole_namespace: {{ .Values.components.guacamole.namespace }}
superset_namespace: {{ .Values.components.superset.namespace }}
rabbitmq_namespace: {{ .Values.components.rabbitmq.namespace }}
observability_metrics_namespace: {{ .Values.components.observability_metrics.namespace }}
{{ range $key, $value := .Values.components }}
{{ if hasKey $value "namespace"}}
{{ $key }}_namespace: {{ $value.namespace }}
{{ end }}
{{ end }}

0 comments on commit 51f1932

Please sign in to comment.