From 042482c59f2b6023cc704c9acb7ca6f02e37d98c Mon Sep 17 00:00:00 2001 From: Sergey Yakubov <sergey.yakubov@desy.de> Date: Thu, 26 Mar 2020 16:31:53 +0100 Subject: [PATCH] add storage to helm chart --- .../templates/authorizer-deployment.yaml | 18 ++++++++++++--- .../asapo/templates/authorizer-ingress.yaml | 2 +- .../asapo/templates/storage.yaml | 23 +++++++++++++++++++ deploy/asapo_helm_chart/asapo/values.yaml | 5 ++-- 4 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 deploy/asapo_helm_chart/asapo/templates/storage.yaml diff --git a/deploy/asapo_helm_chart/asapo/templates/authorizer-deployment.yaml b/deploy/asapo_helm_chart/asapo/templates/authorizer-deployment.yaml index 5d10a256e..2d6afedcb 100644 --- a/deploy/asapo_helm_chart/asapo/templates/authorizer-deployment.yaml +++ b/deploy/asapo_helm_chart/asapo/templates/authorizer-deployment.yaml @@ -25,13 +25,25 @@ spec: name: authorizer-config - secret: name: auth-secret + - name: shared-volume-offline + persistentVolumeClaim: + claimName: asapo-offline-pv + - name: shared-volume-online + persistentVolumeClaim: + claimName: asapo-online-pv containers: - name: authorizer - image: "yakser/asapo-authorizer-dev:develop.19.09-210-gd2bfa78" + image: "yakser/asapo-authorizer-dev:{{ .Values.common.asapoVersionTag }}" command: ["/asapo-authorizer"] args: ["-config", "/etc/authorizer/authorizer.json"] ports: - containerPort: 5007 volumeMounts: - - name: all-in-one - mountPath: "/etc/authorizer" + - mountPath: "/etc/authorizer" + name: all-in-one + - mountPath: {{ .Values.common.offlineDir }} + name: shared-volume-offline + - mountPath: {{ .Values.common.onlineDir }} + name: shared-volume-online + + diff --git a/deploy/asapo_helm_chart/asapo/templates/authorizer-ingress.yaml b/deploy/asapo_helm_chart/asapo/templates/authorizer-ingress.yaml index 05ab95cee..e4bccfc53 100644 --- a/deploy/asapo_helm_chart/asapo/templates/authorizer-ingress.yaml +++ b/deploy/asapo_helm_chart/asapo/templates/authorizer-ingress.yaml @@ -11,7 +11,7 @@ spec: - host: "*.desy.de" http: paths: - - path: /authorizer(/|$)(.*) + - path: /{{ .Release.Namespace }}/authorizer(/|$)(.*) backend: serviceName: authorizer servicePort: 5007 diff --git a/deploy/asapo_helm_chart/asapo/templates/storage.yaml b/deploy/asapo_helm_chart/asapo/templates/storage.yaml new file mode 100644 index 000000000..391c2b4e9 --- /dev/null +++ b/deploy/asapo_helm_chart/asapo/templates/storage.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: asapo-offline-pv +spec: + storageClassName: nfs-storage + accessModes: + - ReadWriteMany + resources: + requests: + storage: 5Gi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: asapo-online-pv +spec: + storageClassName: nfs-storage + accessModes: + - ReadWriteMany + resources: + requests: + storage: 5Gi \ No newline at end of file diff --git a/deploy/asapo_helm_chart/asapo/values.yaml b/deploy/asapo_helm_chart/asapo/values.yaml index 93881838d..acf26a0b2 100644 --- a/deploy/asapo_helm_chart/asapo/values.yaml +++ b/deploy/asapo_helm_chart/asapo/values.yaml @@ -2,6 +2,7 @@ authorizer: replicaCount: 1 common: - authSecret: "blabla" - offlineDir: "/test_offline1" + authSecret: "12ljzgneasfd" + offlineDir: "/test_offline" onlineDir: "/test_online" + asapoVersionTag: "develop.20.03-10-g06dc0be" \ No newline at end of file -- GitLab