diff --git a/portal/base/kustomization.yaml b/portal/base/kustomization.yaml index e7cb7f8..87b0a4e 100644 --- a/portal/base/kustomization.yaml +++ b/portal/base/kustomization.yaml @@ -3,5 +3,6 @@ resources: - portal-ingress.yml - portal-namespace.yml - portal-service.yml +- portal-pvc.yml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization diff --git a/portal/base/portal-deployment.yml b/portal/base/portal-deployment.yml index 2eaa6fb..de24933 100644 --- a/portal/base/portal-deployment.yml +++ b/portal/base/portal-deployment.yml @@ -8,6 +8,10 @@ metadata: labels: app: portal-node spec: + volumes: + - name: config-volume + persistentVolumeClaim: + claimName: init-config replicas: 3 selector: matchLabels: @@ -17,16 +21,6 @@ spec: creationTimestamp: labels: app: portal-node - volumeClaimTemplates: - - metadata: - name: init-config - spec: - storageClassName: csi-sc-cinderplugin - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi spec: containers: - name: portal diff --git a/portal/base/portal-pvc.yml b/portal/base/portal-pvc.yml new file mode 100644 index 0000000..194f0d1 --- /dev/null +++ b/portal/base/portal-pvc.yml @@ -0,0 +1,12 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: init-config +spec: + storageClassName: csi-sc-cinderplugin + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi diff --git a/portal/overlays/test/kustomization.yaml b/portal/overlays/test/kustomization.yaml index e24d657..9113138 100644 --- a/portal/overlays/test/kustomization.yaml +++ b/portal/overlays/test/kustomization.yaml @@ -4,3 +4,4 @@ resources: - ../../base patches: - path: portal-ingress.yml +- path: portal-deployment.yml diff --git a/portal/overlays/test/portal-deployment.yml b/portal/overlays/test/portal-deployment.yml new file mode 100644 index 0000000..6b8e33f --- /dev/null +++ b/portal/overlays/test/portal-deployment.yml @@ -0,0 +1,16 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: portal-node + namespace: portal + creationTimestamp: + labels: + app: portal-node +spec: + template: + spec: + initContainers: + - env: + - name: DRIVE_DOMAIN + value: "https://drive.test.sunet.se"