Commit fb7a7327 authored by Matt Pryor's avatar Matt Pryor
Browse files

Config overrides + Solr shards working

parent 2eadcd0f
Loading
Loading
Loading
Loading
+28 −5
Original line number Diff line number Diff line
@@ -25,10 +25,32 @@ spec:
        checksum/secrets: {{ include (print $.Template.BasePath "/configuration/secrets.yaml") . | sha256sum }}
        checksum/trust-bundle: {{ include (print $.Template.BasePath "/configuration/trust-bundle.yaml") . | sha256sum }}
        checksum/environment-common: {{ include (print $.Template.BasePath "/configuration/environment-common.yaml") . | sha256sum }}
        checksum/esg-config-overrides: {{ include (print $.Template.BasePath "/configuration/esg-config-overrides.yaml") . | sha256sum }}
        checksum/auth-overrides: {{ include (print $.Template.BasePath "/configuration/auth-overrides.yaml") . | sha256sum }}
        checksum/config-overrides: {{ include (print $.Template.BasePath "/configuration/config-overrides.yaml") . | sha256sum }}
    spec:
      initContainers:
        # Unpack the required config overrides from the base64-encoded tarballs in the configmap
        # This process is required because configmaps cannot contain nested directory structures
        - name: unpack-config-overrides
          image: busybox
          command:
            - "sh"
            - "-c"
            - |
              set -eo pipefail
              if [ -f /esg/tarballs/auth-overrides.tar.gz.b64 ]; then
                  base64 -d /esg/tarballs/auth-overrides.tar.gz.b64 | tar -xz -C /esg/auth
              fi
              if [ -f /esg/tarballs/esg-config-overrides.tar.gz.b64 ]; then
                  base64 -d /esg/tarballs/esg-config-overrides.tar.gz.b64 | tar -xz -C /esg/config
              fi
          volumeMounts:
            - mountPath: /esg/auth
              name: auth-overrides
            - mountPath: /esg/config
              name: esg-config-overrides
            - mountPath: /esg/tarballs
              name: override-tarballs
              readOnly: true
        # Wait for postgres to become available before starting
        - name: ensure-postgres
          image: "{{ .Values.auth.postgres.image.repository }}:{{ .Values.auth.postgres.image.tag }}"
@@ -136,8 +158,9 @@ spec:
          configMap:
            name: "{{ template "fullname" . }}-trust-bundle"
        - name: esg-config-overrides
          configMap:
            name: "{{ template "fullname" . }}-esg-config-overrides"
          emptyDir: {}
        - name: auth-overrides
          emptyDir: {}
        - name: override-tarballs
          configMap:
            name: "{{ template "fullname" . }}-auth-overrides"
            name: "{{ template "fullname" . }}-config-overrides"
+22 −2
Original line number Diff line number Diff line
@@ -25,9 +25,27 @@ spec:
        checksum/secrets: {{ include (print $.Template.BasePath "/configuration/secrets.yaml") . | sha256sum }}
        checksum/trust-bundle: {{ include (print $.Template.BasePath "/configuration/trust-bundle.yaml") . | sha256sum }}
        checksum/environment-common: {{ include (print $.Template.BasePath "/configuration/environment-common.yaml") . | sha256sum }}
        checksum/esg-config-overrides: {{ include (print $.Template.BasePath "/configuration/esg-config-overrides.yaml") . | sha256sum }}
        checksum/config-overrides: {{ include (print $.Template.BasePath "/configuration/config-overrides.yaml") . | sha256sum }}
    spec:
      initContainers:
        # Unpack the required config overrides from the base64-encoded tarballs in the configmap
        # This process is required because configmaps cannot contain nested directory structures
        - name: unpack-config-overrides
          image: busybox
          command:
            - "sh"
            - "-c"
            - |
              set -eo pipefail
              if [ -f /esg/tarballs/esg-config-overrides.tar.gz.b64 ]; then
                  base64 -d /esg/tarballs/esg-config-overrides.tar.gz.b64 | tar -xz -C /esg/config
              fi
          volumeMounts:
            - mountPath: /esg/config
              name: esg-config-overrides
            - mountPath: /esg/tarballs
              name: override-tarballs
              readOnly: true
        # Wait for databases to become available before starting
        - name: ensure-postgres-security
          image: "{{ .Values.cog.postgres.image.repository }}:{{ .Values.cog.postgres.image.tag }}"
@@ -180,5 +198,7 @@ spec:
          secret:
            secretName: "{{ template "fullname" . }}-secrets"
        - name: esg-config-overrides
          emptyDir: {}
        - name: override-tarballs
          configMap:
            name: "{{ template "fullname" . }}-esg-config-overrides"
            name: "{{ template "fullname" . }}-config-overrides"
+2 −2
Original line number Diff line number Diff line
apiVersion: v1
kind: ConfigMap
metadata:
  name: "{{ template "fullname" . }}-auth-overrides"
  name: "{{ template "fullname" . }}-config-overrides"
  labels:
{{ include "default-labels" . | indent 4 }}
    component: configuration
data:
{{ toYaml .Values.authOverrides | indent 2 }}
{{ toYaml .Values.configuration | indent 2 }}
+0 −9
Original line number Diff line number Diff line
apiVersion: v1
kind: ConfigMap
metadata:
  name: "{{ template "fullname" . }}-esg-config-overrides"
  labels:
{{ include "default-labels" . | indent 4 }}
    component: configuration
data:
{{ toYaml .Values.esgConfigOverrides | indent 2 }}
+0 −9
Original line number Diff line number Diff line
apiVersion: v1
kind: ConfigMap
metadata:
  name: "{{ template "fullname" . }}-esgcet-overrides"
  labels:
{{ include "default-labels" . | indent 4 }}
    component: configuration
data:
{{ toYaml .Values.esgcetOverrides | indent 2 }}
Loading