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

Allow catalogs from a pre-existing volume

parent cbe4296d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -86,6 +86,8 @@ Produces volume mount definitions for the specified data volumes.
{{- range .Values.data.mounts }}
- name: {{ include "esgf.data.volumeName" .mountPath | quote }}
  readOnly: true
  {{- omit . "volume" | toYaml | nindent 2 }}
  {{- with (omit . "volume") }}
  {{- toYaml . | nindent 2 }}
  {{- end }}
{{- end }}
{{- end -}}
+1 −1
Original line number Diff line number Diff line
{{- if .Values.data.thredds.enabled -}}
{{- if (and .Values.data.thredds.enabled (not .Values.data.catalogVolume.volume))  -}}
apiVersion: v1
kind: ConfigMap
metadata:
+8 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ spec:
            periodSeconds: 10
          livenessProbe:
            <<: *probe
            initialDelaySeconds: 300
            initialDelaySeconds: {{ .Values.data.thredds.startTimeout }}
          {{- with .Values.data.securityContext }}
          securityContext: {{ toYaml . | nindent 12 }}
          {{- end }}
@@ -53,6 +53,9 @@ spec:
            - name: catalog-esgcet
              mountPath: /opt/tomcat/content/thredds/esgcet
              readOnly: true
              {{- with (omit .Values.data.catalogVolume "volume") }}
              {{- toYaml . | nindent 14 }}
              {{- end }}
            {{- include "esgf.data.volumeMounts" . | nindent 12 }}
      {{- with $thredds.nodeSelector }}
      nodeSelector: {{ toYaml . | nindent 8 }}
@@ -65,7 +68,11 @@ spec:
      {{- end }}
      volumes:
        - name: catalog-esgcet
          {{- if .Values.data.catalogVolume.volume }}
          {{- toYaml .Values.data.catalogVolume.volume | nindent 10 }}
          {{- else }}
          configMap:
            name: {{ include "esgf.component.fullname" (list . "thredds") }}
          {{- end }}
        {{- include "esgf.data.volumes" . | nindent 8 }}
{{- end -}}
+10 −0
Original line number Diff line number Diff line
@@ -71,6 +71,13 @@ data:
    #   path: esg_dataroot
    #   location: /datacentre/archiveroots/archive/badc/cmip5/data

  # Volume containing pre-existing THREDDS catalogs
  # If not given, a catalog will be generated containing datasetScan elements for the configured datasets
  catalogVolume:
    # Kubernetes volume specification
    volume: {}
    # Any additional keys are set as options on the mount, e.g. mountPropagation

  # The pod and container security contexts for data serving pods
  # In particular, these may be required if using hostPath volumes for data, depending
  # on the permissions of that data
@@ -89,6 +96,9 @@ data:
      repository: thredds
    # The number of replicas for the THREDDS pod
    replicaCount: 1
    # The startup time for the THREDDS container
    # For large pre-existing catalogs, this maybe need to be large (default 5 mins)
    startTimeout: 300
    # The resource allocations for the THREDDS container
    # See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
    resources: {}