Merge branch 'mluds-master'
authorWard Vandewege <ward@curii.com>
Mon, 30 Nov 2020 15:40:36 +0000 (10:40 -0500)
committerWard Vandewege <ward@curii.com>
Mon, 30 Nov 2020 15:40:45 +0000 (10:40 -0500)
No issue #

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

charts/arvados/templates/api-server-configmap.yaml
charts/arvados/templates/crunch-dispatch-slurm-deployment.yaml
charts/arvados/templates/keep-store-deployment.yaml
charts/arvados/templates/postgres-deployment.yaml
charts/arvados/templates/slurm-compute-deployment.yaml
charts/arvados/templates/slurm-controller-deployment.yaml
charts/arvados/values.yaml

index 3de99744c26de2d399570c8cf2afc2405e1f61ee..80e3f7e866860bcda1f77418b8b57f90449da290 100644 (file)
@@ -43,7 +43,9 @@ data:
     # direct access to Keep storage daemons to set this header value to 0.
     geo $external_client {
       default     1;
-      10.0.0.0/8  0;
+      {{- range .Values.internalIPs }}
+      {{ . }} 0;
+      {{- end }}
     }
 
     server {
index a4f0582a9e1109511fc33812e9652e6029c237c7..f4322b5adf0c4ba115c1571037f6a66eb32e000a 100644 (file)
@@ -24,7 +24,7 @@ spec:
     spec:
       dnsConfig:
         searches:
-          - "arvados-slurm-compute.default.svc.cluster.local"
+          - "arvados-slurm-compute.{{ .Release.Namespace }}.svc.cluster.local"
       containers:
         - name: {{ .Chart.Name }}
           image: "cure/arvados-slurm-runtime"
index 128bba966799f31b8e71990fd5b8264f0961c0bb..f7fa8d1d9a3255c98f51bf3bc52c445635c0ff4e 100644 (file)
@@ -38,8 +38,23 @@ spec:
             - name: etc-configmap
               mountPath: /etc/arvados/config.yml
               subPath: config.yml
+            {{- if .Values.keep.persistence.enabled }}
+            - name: keep-store-storage
+              mountPath: /keepdata
+            {{- end }}
       volumes:
         - name: etc-configmap
           configMap:
             name: etc-configmap
-
+  {{- if .Values.keep.persistence.enabled }}
+  volumeClaimTemplates:
+    - metadata:
+        name: keep-store-storage
+      spec:
+        storageClassName: {{ .Values.keep.persistence.storageClass }}
+        accessModes:
+          - ReadWriteOnce
+        resources:
+          requests:
+            storage: {{ .Values.keep.persistence.size }}
+  {{- end }}
index 786edc367092453e228266a9625e11b5af805d82..d820e8eeff69e94ab909e21d91a9099c9d8e4139 100644 (file)
@@ -3,7 +3,7 @@
 # SPDX-License-Identifier: Apache-2.0
 
 apiVersion: apps/v1
-kind: Deployment
+kind: StatefulSet
 metadata:
   name: "arvados-postgres"
   labels:
@@ -12,6 +12,9 @@ metadata:
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
 spec:
+  replicas: 1
+  podManagementPolicy: Parallel
+  serviceName: arvados-postgres
   selector:
     matchLabels:
       app: arvados-postgres
@@ -22,18 +25,40 @@ spec:
         app: arvados-postgres
         release: {{ .Release.Name }}
     spec:
+      terminationGracePeriodSeconds: 1
       containers:
         - name: {{ .Chart.Name }}
           image: "postgres:9.5"
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           env:
-          - name: POSTGRES_HOST_AUTH_METHOD
-            value: "trust"
+            - name: POSTGRES_HOST_AUTH_METHOD
+              value: "trust"
           volumeMounts:
             - name: postgres-configmap
               mountPath: /docker-entrypoint-initdb.d/create_dbs.sh
               subPath: create_dbs.sh
+            {{- if .Values.postgres.persistence.enabled }}
+            - name: postgres-storage
+              mountPath: /var/lib/postgresql/data
+            {{- end }}
       volumes:
         - name: postgres-configmap
           configMap:
             name: postgres-configmap
+        {{- if .Values.postgres.persistence.enabled }}
+        - name: postgres-storage
+          persistentVolumeClaim:
+            claimName: {{ .Release.Name }}-postgres-pvc
+        {{- end }}
+  {{- if .Values.postgres.persistence.enabled }}
+  volumeClaimTemplates:
+    - metadata:
+        name: postgres-storage
+      spec:
+        storageClassName: {{ .Values.postgres.persistence.storageClass }}
+        accessModes:
+          - ReadWriteOnce
+        resources:
+          requests:
+            storage: {{ .Values.postgres.persistence.size }}
+  {{- end }}
index 2919b62e8e7c9966257b3e97f2a27582f6b2b346..0819b34a9ea12f021317d9ef405518b2a5a07d9f 100644 (file)
@@ -27,7 +27,7 @@ spec:
     spec:
       dnsConfig:
         searches:
-          - "arvados-slurm-compute.default.svc.cluster.local"
+          - "arvados-slurm-compute.{{ .Release.Namespace }}.svc.cluster.local"
       terminationGracePeriodSeconds: 1
       containers:
         - name: {{ .Chart.Name }}
index 4aa57cbd385d5df6d7fd8bdf6d42ef4268811a90..733749acda7f6f80420bf6aab04e3cbf8bd29385 100644 (file)
@@ -26,7 +26,7 @@ spec:
     spec:
       dnsConfig:
         searches:
-          - "arvados-slurm-compute.default.svc.cluster.local"
+          - "arvados-slurm-compute.{{ .Release.Namespace }}.svc.cluster.local"
       terminationGracePeriodSeconds: 1
       containers:
         - name: {{ .Chart.Name }}
index 3caaec47fe7b8031eb497c7a709649505514230c..cf196364557b4a7d76ccb99fb4cea17a03d739ea 100644 (file)
@@ -13,6 +13,14 @@ image:
 # Must be set to a valid IP address, e.g. by using --set when invoking helm
 externalIP: ~
 
+# A list of CIDRs that have direct access to the Keep store service. All other
+# IP addresses will use the Keep proxy.
+# If hosts outside your cluster are in the default range (10.0.0.0/8), change
+# this to the exact CIDR of your cluster.
+# If using MetaLB with apiServerExternalTrafficPolicy set to Cluster, set this
+# to an empty list, since the source IP will be obscured.
+internalIPs: [10.0.0.0/8]
+
 loadBalancer:
   # Annotations to add to all LoadBalancer Services.
   # This is required for MetalLB, since the same externalIP is reused for all
@@ -69,6 +77,18 @@ arvados:
       arvadosCLI: 2.1.1
       arvadosLoginSync: 2.1.1
 
+postgres:
+  persistence:
+    enabled: true
+    storageClass: ~
+    size: 8Gi
+
+keep:
+  persistence:
+    enabled: true
+    storageClass: ~
+    size: 64Gi
+
 # A custom bundle of CA certificates to use.
 # Useful for corporate networks with TLS proxies.
 # Set it by using the --set-file Helm argument.