diff --git a/templates/analytics/analytics-deployment.yaml b/templates/analytics/analytics-deployment.yaml index b36d6eb..8d19b3f 100644 --- a/templates/analytics/analytics-deployment.yaml +++ b/templates/analytics/analytics-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.analytics.enabled -}} {{- $webapp := .Values.georchestra.webapps.analytics -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/templates/analytics/analytics-svc.yaml b/templates/analytics/analytics-svc.yaml index 15011a5..6abc8ab 100644 --- a/templates/analytics/analytics-svc.yaml +++ b/templates/analytics/analytics-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.analytics.enabled -}} +{{- $webapp := .Values.georchestra.webapps.analytics -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/cas/cas-deployment.yaml b/templates/cas/cas-deployment.yaml index b7bafab..849310e 100644 --- a/templates/cas/cas-deployment.yaml +++ b/templates/cas/cas-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.cas.enabled -}} {{- $webapp := .Values.georchestra.webapps.cas -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/templates/cas/cas-svc.yaml b/templates/cas/cas-svc.yaml index e209ef5..4cc9cc0 100644 --- a/templates/cas/cas-svc.yaml +++ b/templates/cas/cas-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.cas.enabled -}} +{{- $webapp := .Values.georchestra.webapps.cas -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/console/console-deployment.yaml b/templates/console/console-deployment.yaml index 7b37602..9314d77 100644 --- a/templates/console/console-deployment.yaml +++ b/templates/console/console-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.console.enabled -}} {{- $webapp := .Values.georchestra.webapps.console -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/templates/console/console-svc.yaml b/templates/console/console-svc.yaml index a557805..5637e97 100644 --- a/templates/console/console-svc.yaml +++ b/templates/console/console-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.console.enabled -}} +{{- $webapp := .Values.georchestra.webapps.console -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/datafeeder/datafeeder-deployment.yaml b/templates/datafeeder/datafeeder-deployment.yaml index 4341be0..69f6a23 100644 --- a/templates/datafeeder/datafeeder-deployment.yaml +++ b/templates/datafeeder/datafeeder-deployment.yaml @@ -1,5 +1,5 @@ -{{- if and .Values.georchestra.webapps.datafeeder.enabled .Values.georchestra.webapps.datafeeder_frontend.enabled -}} {{- $webapp := .Values.georchestra.webapps.datafeeder -}} +{{- if and $webapp.enabled .Values.georchestra.webapps.datafeeder_frontend.enabled -}} {{- $database := .Values.database -}} {{- $database_secret_datafeeder_name := printf "%s-database-datafeeder-secret" (include "georchestra.fullname" .) -}} apiVersion: apps/v1 @@ -29,7 +29,7 @@ spec: {{- end }} initContainers: {{- include "georchestra.bootstrap_georchestra_datadir" . | nindent 6 }} - {{- if .Values.georchestra.webapps.datafeeder.envsubst.enabled }} + {{- if $webapp.envsubst.enabled }} - name: envsubst image: georchestra/k8s-initcontainer-envsubst volumeMounts: diff --git a/templates/datafeeder/datafeeder-svc.yaml b/templates/datafeeder/datafeeder-svc.yaml index f9fc2ae..0dad37e 100644 --- a/templates/datafeeder/datafeeder-svc.yaml +++ b/templates/datafeeder/datafeeder-svc.yaml @@ -1,4 +1,5 @@ -{{- if and .Values.georchestra.webapps.datafeeder.enabled .Values.georchestra.webapps.datafeeder_frontend.enabled -}} +{{- $webapp := .Values.georchestra.webapps.datafeeder -}} +{{- if and $webapp.enabled .Values.georchestra.webapps.datafeeder_frontend.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/datafeeder/import-deployment.yaml b/templates/datafeeder/import-deployment.yaml index fc2e138..b4f679e 100644 --- a/templates/datafeeder/import-deployment.yaml +++ b/templates/datafeeder/import-deployment.yaml @@ -1,5 +1,5 @@ -{{- if and .Values.georchestra.webapps.datafeeder.enabled .Values.georchestra.webapps.datafeeder_frontend.enabled -}} {{- $webapp := .Values.georchestra.webapps.datafeeder_frontend -}} +{{- if and .Values.georchestra.webapps.datafeeder.enabled $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/templates/datafeeder/import-svc.yaml b/templates/datafeeder/import-svc.yaml index 31f9621..eb58f6a 100644 --- a/templates/datafeeder/import-svc.yaml +++ b/templates/datafeeder/import-svc.yaml @@ -1,4 +1,5 @@ -{{- if and .Values.georchestra.webapps.datafeeder.enabled .Values.georchestra.webapps.datafeeder_frontend.enabled -}} +{{- $webapp := .Values.georchestra.webapps.datafeeder_frontend -}} +{{- if and .Values.georchestra.webapps.datafeeder.enabled $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/extractorapp/extractorapp-deployment.yaml b/templates/extractorapp/extractorapp-deployment.yaml index 433469b..49be033 100644 --- a/templates/extractorapp/extractorapp-deployment.yaml +++ b/templates/extractorapp/extractorapp-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.extractorapp.enabled -}} {{- $webapp := .Values.georchestra.webapps.extractorapp -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/templates/extractorapp/extractorapp-svc.yaml b/templates/extractorapp/extractorapp-svc.yaml index a182717..d8a3fa5 100644 --- a/templates/extractorapp/extractorapp-svc.yaml +++ b/templates/extractorapp/extractorapp-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.extractorapp.enabled -}} +{{- $webapp := .Values.georchestra.webapps.extractorapp -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/gateway/gateway-deployment.yaml b/templates/gateway/gateway-deployment.yaml index d89cbad..2545516 100644 --- a/templates/gateway/gateway-deployment.yaml +++ b/templates/gateway/gateway-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.gateway.enabled -}} {{- $webapp := .Values.georchestra.webapps.gateway -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/templates/gateway/gateway-svc.yaml b/templates/gateway/gateway-svc.yaml index d6543a7..b707f6e 100644 --- a/templates/gateway/gateway-svc.yaml +++ b/templates/gateway/gateway-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.gateway.enabled -}} +{{- $webapp := .Values.georchestra.webapps.gateway -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/geonetwork/elasticsearch/es-data-pvc.yaml b/templates/geonetwork/elasticsearch/es-data-pvc.yaml index f90aaf2..59963d7 100644 --- a/templates/geonetwork/elasticsearch/es-data-pvc.yaml +++ b/templates/geonetwork/elasticsearch/es-data-pvc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.geonetwork.enabled -}} +{{- $webapp := .Values.georchestra.webapps.geonetwork.elasticsearch -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/templates/geonetwork/elasticsearch/es-deployment.yaml b/templates/geonetwork/elasticsearch/es-deployment.yaml index 8d1f3e9..dc0f690 100644 --- a/templates/geonetwork/elasticsearch/es-deployment.yaml +++ b/templates/geonetwork/elasticsearch/es-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.geonetwork.enabled -}} {{- $webapp := .Values.georchestra.webapps.geonetwork.elasticsearch -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -38,7 +38,7 @@ spec: name: gn4-es-data containers: - name: elasticsearch - image: {{ .Values.georchestra.webapps.geonetwork.elasticsearch.image }} + image: {{ $webapp.image }} env: - name: ES_JAVA_OPTS value: -Dlog4j2.formatMsgNoLookups=true -Dlog4j2.disable.jmx=true diff --git a/templates/geonetwork/elasticsearch/es-svc.yaml b/templates/geonetwork/elasticsearch/es-svc.yaml index 9e23070..967bf7f 100644 --- a/templates/geonetwork/elasticsearch/es-svc.yaml +++ b/templates/geonetwork/elasticsearch/es-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.geonetwork.enabled -}} +{{- $webapp := .Values.georchestra.webapps.geonetwork.elasticsearch -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/geonetwork/geonetwork-datadir-pvc.yaml b/templates/geonetwork/geonetwork-datadir-pvc.yaml index 1d13280..2970f6d 100644 --- a/templates/geonetwork/geonetwork-datadir-pvc.yaml +++ b/templates/geonetwork/geonetwork-datadir-pvc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.geonetwork.enabled -}} +{{- $webapp := .Values.georchestra.webapps.geonetwork -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/templates/geonetwork/geonetwork-deployment.yaml b/templates/geonetwork/geonetwork-deployment.yaml index 399748b..dc37a9a 100644 --- a/templates/geonetwork/geonetwork-deployment.yaml +++ b/templates/geonetwork/geonetwork-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.geonetwork.enabled -}} {{- $webapp := .Values.georchestra.webapps.geonetwork -}} +{{- if $webapp.enabled -}} {{- $database := .Values.database -}} apiVersion: apps/v1 kind: Deployment diff --git a/templates/geonetwork/geonetwork-svc.yaml b/templates/geonetwork/geonetwork-svc.yaml index 159777e..1130ab3 100644 --- a/templates/geonetwork/geonetwork-svc.yaml +++ b/templates/geonetwork/geonetwork-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.geonetwork.enabled -}} +{{- $webapp := .Values.georchestra.webapps.geonetwork -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/geonetwork/housekeeping/clean-harvester-logs.yaml b/templates/geonetwork/housekeeping/clean-harvester-logs.yaml index b03f281..669e386 100644 --- a/templates/geonetwork/housekeeping/clean-harvester-logs.yaml +++ b/templates/geonetwork/housekeeping/clean-harvester-logs.yaml @@ -1,5 +1,5 @@ -{{- if and .Values.georchestra.webapps.geonetwork.enabled .Values.georchestra.webapps.geonetwork.housekeeping.harvester_logs.enabled -}} {{- $webapp := .Values.georchestra.webapps.geonetwork -}} +{{- if and $webapp.enabled $webapp.housekeeping.harvester_logs.enabled -}} apiVersion: batch/v1 kind: CronJob metadata: diff --git a/templates/geonetwork/kibana/kibana-deployment.yaml b/templates/geonetwork/kibana/kibana-deployment.yaml index 5c9cf3e..0205628 100644 --- a/templates/geonetwork/kibana/kibana-deployment.yaml +++ b/templates/geonetwork/kibana/kibana-deployment.yaml @@ -1,3 +1,4 @@ +{{- $webapp := .Values.georchestra.webapps.geonetwork.kibana -}} {{- if .Values.georchestra.webapps.geonetwork.enabled -}} apiVersion: apps/v1 kind: Deployment @@ -7,7 +8,7 @@ metadata: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-gn4-kibana spec: - replicas: {{ .Values.georchestra.webapps.geonetwork.kibana.replicaCount }} + replicas: {{ $webapp.replicaCount }} selector: matchLabels: {{- include "georchestra.selectorLabels" . | nindent 6 }} @@ -26,7 +27,7 @@ spec: {{- end }} containers: - name: kibana - image: {{ .Values.georchestra.webapps.geonetwork.kibana.image }} + image: {{ $webapp.image }} env: - name: ELASTICSEARCH_HOSTS value: http://{{ include "georchestra.fullname" . }}-gn4-elasticsearch-svc:9200 diff --git a/templates/geonetwork/ogc-api-records/ogc-api-records-deployment.yaml b/templates/geonetwork/ogc-api-records/ogc-api-records-deployment.yaml index c62eda1..044272c 100644 --- a/templates/geonetwork/ogc-api-records/ogc-api-records-deployment.yaml +++ b/templates/geonetwork/ogc-api-records/ogc-api-records-deployment.yaml @@ -1,5 +1,5 @@ -{{- if and .Values.georchestra.webapps.geonetwork.enabled .Values.georchestra.webapps.geonetwork.ogc_api_records.enabled -}} {{- $webapp := .Values.georchestra.webapps.geonetwork.ogc_api_records -}} +{{- if and .Values.georchestra.webapps.geonetwork.enabled $webapp.enabled -}} {{- $database := .Values.database -}} apiVersion: apps/v1 kind: Deployment @@ -30,7 +30,7 @@ spec: fsGroup: 999 initContainers: {{- include "georchestra.bootstrap_georchestra_datadir" . | nindent 6 }} - {{- if .Values.georchestra.webapps.geonetwork.ogc_api_records.envsubst.enabled }} + {{- if $webapp.envsubst.enabled }} - name: envsubst image: georchestra/k8s-initcontainer-envsubst volumeMounts: diff --git a/templates/geoserver/geoserver-datadir-pvc.yaml b/templates/geoserver/geoserver-datadir-pvc.yaml index 5dbc84e..a7456f5 100644 --- a/templates/geoserver/geoserver-datadir-pvc.yaml +++ b/templates/geoserver/geoserver-datadir-pvc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.geoserver.enabled -}} +{{- $webapp := .Values.georchestra.webapps.geoserver -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/templates/geoserver/geoserver-deployment.yaml b/templates/geoserver/geoserver-deployment.yaml index f7472a9..dd53c30 100644 --- a/templates/geoserver/geoserver-deployment.yaml +++ b/templates/geoserver/geoserver-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.geoserver.enabled -}} {{- $webapp := .Values.georchestra.webapps.geoserver -}} +{{- if $webapp.enabled -}} {{- $database := .Values.database -}} {{- $database_secret_geodata_name := printf "%s-database-geodata-secret" (include "georchestra.fullname" .) -}} {{- $database_secret_datafeeder_name := printf "%s-database-datafeeder-secret" (include "georchestra.fullname" .) -}} diff --git a/templates/geoserver/geoserver-geodata-pvc.yaml b/templates/geoserver/geoserver-geodata-pvc.yaml index b309c6e..543b12b 100644 --- a/templates/geoserver/geoserver-geodata-pvc.yaml +++ b/templates/geoserver/geoserver-geodata-pvc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.geoserver.enabled -}} +{{- $webapp := .Values.georchestra.webapps.geoserver -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/templates/geoserver/geoserver-svc.yaml b/templates/geoserver/geoserver-svc.yaml index 0cb5477..0dae3b1 100644 --- a/templates/geoserver/geoserver-svc.yaml +++ b/templates/geoserver/geoserver-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.geoserver.enabled -}} +{{- $webapp := .Values.georchestra.webapps.geoserver -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/geoserver/geoserver-tiles-pvc.yaml b/templates/geoserver/geoserver-tiles-pvc.yaml index 82f35dc..2d615d8 100644 --- a/templates/geoserver/geoserver-tiles-pvc.yaml +++ b/templates/geoserver/geoserver-tiles-pvc.yaml @@ -1,4 +1,5 @@ -{{- if and .Values.georchestra.webapps.geoserver.enabled .Values.georchestra.storage.geoserver_tiles -}} +{{- $webapp := .Values.georchestra.webapps.geoserver -}} +{{- if and $webapp.enabled .Values.georchestra.storage.geoserver_tiles -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/templates/ldap/openldap-deployment.yaml b/templates/ldap/openldap-deployment.yaml index 9e8d8da..07fc00f 100644 --- a/templates/ldap/openldap-deployment.yaml +++ b/templates/ldap/openldap-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.openldap.enabled -}} {{- $webapp := .Values.georchestra.webapps.openldap -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/templates/ldap/openldap-pvc.yaml b/templates/ldap/openldap-pvc.yaml index c7471dd..26c3223 100644 --- a/templates/ldap/openldap-pvc.yaml +++ b/templates/ldap/openldap-pvc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.openldap.enabled -}} +{{- $webapp := .Values.georchestra.webapps.openldap -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/templates/ldap/openldap-svc.yaml b/templates/ldap/openldap-svc.yaml index c7525e7..1bc8d46 100644 --- a/templates/ldap/openldap-svc.yaml +++ b/templates/ldap/openldap-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.openldap.enabled -}} +{{- $webapp := .Values.georchestra.webapps.openldap -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/mapfishapp/mapfishapp-deployment.yaml b/templates/mapfishapp/mapfishapp-deployment.yaml index 7fad2b3..bc63f28 100644 --- a/templates/mapfishapp/mapfishapp-deployment.yaml +++ b/templates/mapfishapp/mapfishapp-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.mapfishapp.enabled -}} {{- $webapp := .Values.georchestra.webapps.mapfishapp -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: diff --git a/templates/mapfishapp/mapfishapp-svc.yaml b/templates/mapfishapp/mapfishapp-svc.yaml index c93d5cf..b64c9bb 100644 --- a/templates/mapfishapp/mapfishapp-svc.yaml +++ b/templates/mapfishapp/mapfishapp-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.mapfishapp.enabled -}} +{{- $webapp := .Values.georchestra.webapps.mapfishapp -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/mapstore/mapstore-deployment.yaml b/templates/mapstore/mapstore-deployment.yaml index 59f5ba5..153db29 100644 --- a/templates/mapstore/mapstore-deployment.yaml +++ b/templates/mapstore/mapstore-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.mapstore.enabled -}} {{- $webapp := .Values.georchestra.webapps.mapstore -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -33,13 +33,13 @@ spec: - name: georchestra-mapstore image: {{ $webapp.docker_image }} imagePullPolicy: Always - {{ if and .Values.georchestra.webapps.mapstore.command .Values.georchestra.webapps.mapstore.args -}} + {{ if and $webapp.command $webapp.args -}} command: - {{- range .Values.georchestra.webapps.mapstore.command }} + {{- range $webapp.command }} - {{ . }} {{- end }} args: - {{- range .Values.georchestra.webapps.mapstore.args }} + {{- range $webapp.args }} - {{ . }} {{- end }} {{- end }} diff --git a/templates/mapstore/mapstore-pvc.yaml b/templates/mapstore/mapstore-pvc.yaml index c43ac03..901f833 100644 --- a/templates/mapstore/mapstore-pvc.yaml +++ b/templates/mapstore/mapstore-pvc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.mapstore.enabled -}} +{{- $webapp := .Values.georchestra.webapps.mapstore -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: diff --git a/templates/mapstore/mapstore-svc.yaml b/templates/mapstore/mapstore-svc.yaml index 6dfd815..4b0cd9c 100644 --- a/templates/mapstore/mapstore-svc.yaml +++ b/templates/mapstore/mapstore-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.mapstore.enabled -}} +{{- $webapp := .Values.georchestra.webapps.mapstore -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/security-proxy/security-proxy-deployment.yaml b/templates/security-proxy/security-proxy-deployment.yaml index 1063338..d19f271 100644 --- a/templates/security-proxy/security-proxy-deployment.yaml +++ b/templates/security-proxy/security-proxy-deployment.yaml @@ -1,5 +1,5 @@ -{{- if .Values.georchestra.webapps.proxy.enabled -}} {{- $webapp := .Values.georchestra.webapps.proxy -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -34,7 +34,7 @@ spec: {{- end }} initContainers: {{ include "georchestra.bootstrap_georchestra_datadir" . | nindent 6 }} - {{- if .Values.georchestra.webapps.proxy.envsubst.enabled }} + {{- if $webapp.envsubst.enabled }} - name: envsubst image: georchestra/k8s-initcontainer-envsubst volumeMounts: diff --git a/templates/security-proxy/security-proxy-svc.yaml b/templates/security-proxy/security-proxy-svc.yaml index 63f4e38..29687ea 100644 --- a/templates/security-proxy/security-proxy-svc.yaml +++ b/templates/security-proxy/security-proxy-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.webapps.proxy.enabled -}} +{{- $webapp := .Values.georchestra.webapps.proxy -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: diff --git a/templates/smtp-smarthost/smtp-deployment.yaml b/templates/smtp-smarthost/smtp-deployment.yaml index 702f32b..ecc5939 100644 --- a/templates/smtp-smarthost/smtp-deployment.yaml +++ b/templates/smtp-smarthost/smtp-deployment.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.smtp_smarthost.enabled -}} +{{- $webapp := .Values.georchestra.smtp_smarthost -}} +{{- if $webapp.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -7,7 +8,7 @@ metadata: {{- include "georchestra.labels" . | nindent 4 }} app.kubernetes.io/component: {{ include "georchestra.fullname" . }}-smtp spec: - replicas: {{ .Values.georchestra.smtp_smarthost.replicaCount }} + replicas: {{ $webapp.replicaCount }} selector: matchLabels: {{- include "georchestra.selectorLabels" . | nindent 6 }} @@ -28,32 +29,32 @@ spec: - name: georchestra-smtp image: camptocamp/exim:latest env: - {{- if .Values.georchestra.smtp_smarthost.relay_host }} + {{- if $webapp.relay_host }} - name: RELAY_HOST - value: {{ .Values.georchestra.smtp_smarthost.relay_host }} + value: {{ $webapp.relay_host }} {{- end -}} - {{- if .Values.georchestra.smtp_smarthost.relay_port }} + {{- if $webapp.relay_port }} - name: RELAY_PORT - value: {{ .Values.georchestra.smtp_smarthost.relay_port | quote }} + value: {{ $webapp.relay_port | quote }} {{- end -}} - {{- if .Values.georchestra.smtp_smarthost.mailname }} + {{- if $webapp.mailname }} - name: MAILNAME - value: {{ .Values.georchestra.smtp_smarthost.mailname }} + value: {{ $webapp.mailname }} {{- end -}} - {{- if .Values.georchestra.smtp_smarthost.postmaster }} + {{- if $webapp.postmaster }} - name: POSTMASTER - value: {{ .Values.georchestra.smtp_smarthost.postmaster }} + value: {{ $webapp.postmaster }} {{- end -}} - {{- if .Values.georchestra.smtp_smarthost.relay_username }} + {{- if $webapp.relay_username }} - name: RELAY_USERNAME - value: {{ .Values.georchestra.smtp_smarthost.relay_username }} + value: {{ $webapp.relay_username }} {{- end -}} - {{- if .Values.georchestra.smtp_smarthost.relay_password }} + {{- if $webapp.relay_password }} - name: RELAY_PASSWORD - value: {{ .Values.georchestra.smtp_smarthost.relay_password }} + value: {{ $webapp.relay_password }} {{ end -}} - {{- if .Values.georchestra.smtp_smarthost.extra_environment }} - {{- .Values.georchestra.smtp_smarthost.extra_environment | toYaml | nindent 10 }} + {{- if $webapp.extra_environment }} + {{- $webapp.extra_environment | toYaml | nindent 10 }} {{- end }} imagePullPolicy: Always ports: diff --git a/templates/smtp-smarthost/smtp-svc.yaml b/templates/smtp-smarthost/smtp-svc.yaml index ab29409..50fb69d 100644 --- a/templates/smtp-smarthost/smtp-svc.yaml +++ b/templates/smtp-smarthost/smtp-svc.yaml @@ -1,4 +1,5 @@ -{{- if .Values.georchestra.smtp_smarthost.enabled -}} +{{- $webapp := .Values.georchestra.smtp_smarthost -}} +{{- if $webapp.enabled -}} apiVersion: v1 kind: Service metadata: