From b6db34b804927c29b9e21c857598f0652d6589aa Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 3 Oct 2020 18:45:28 +0200 Subject: [PATCH] Add nginx sidecar file browser --- charts/mottainai/Chart.yaml | 2 +- .../templates/mottainai-deployment.yaml | 18 ++++++++++++++++++ charts/mottainai/values.yaml | 11 +++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/charts/mottainai/Chart.yaml b/charts/mottainai/Chart.yaml index 86275d3..b2a9e86 100644 --- a/charts/mottainai/Chart.yaml +++ b/charts/mottainai/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.0.5 +version: 0.0.6 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. diff --git a/charts/mottainai/templates/mottainai-deployment.yaml b/charts/mottainai/templates/mottainai-deployment.yaml index 1b6bd73..c90b4e5 100644 --- a/charts/mottainai/templates/mottainai-deployment.yaml +++ b/charts/mottainai/templates/mottainai-deployment.yaml @@ -72,6 +72,19 @@ spec: name: mottainai-namespaces - mountPath: /srv/mottainai/web/storage name: mottainai-storages +{{- if .Values.fileIndex.enabled }} + - name: nginx + image: {{ .Values.image.fileIndex }} + imagePullPolicy: Always + ports: + - containerPort: 80 + volumeMounts: + - mountPath: "/opt/www/files/" + name: mottainai-namespaces + - name: nginx-config + mountPath: "/etc/nginx/conf.d" + readOnly: true +{{- end }} restartPolicy: Always volumes: {{- if not .Values.arangodb.enabled }} @@ -88,6 +101,11 @@ spec: - name: mottainai-storages persistentVolumeClaim: claimName: mottainai-storages +{{- if .Values.fileIndex.enabled }} + - name: nginx-config + configMap: + name: nginx-config +{{- end }} selector: matchLabels: io.kompose.service: mottainai diff --git a/charts/mottainai/values.yaml b/charts/mottainai/values.yaml index 20e0ad7..02cac57 100644 --- a/charts/mottainai/values.yaml +++ b/charts/mottainai/values.yaml @@ -14,12 +14,23 @@ image: repository: mottainaici/server pullPolicy: IfNotPresent tag: latest + fileIndex: "quay.io/mocaccino/nginx-file-browser:latest" fsGroup: 988 imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +fileIndex: + enabled: true + ingress: + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / + enabled: false + hosts: + - host: chart-example.local + paths: [] + tls: [] arangodb: enabled: false