Commit 9a2beac4 authored by William Tucker's avatar William Tucker
Browse files

Adding a robots.txt to the file server

parent 43be6868
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
User-agent: *
Disallow: /
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -85,6 +85,9 @@ spec:
            - name: nginx-conf
              mountPath: /etc/nginx/conf.d
              readOnly: true
            - name: static-content
              mountPath: /var/www/html
              readOnly: true
            # The shared log volume is only required if the access log sidecar is enabled
            {{- if $accessLogSidecar.enabled }}
            - name: nginx-logs
@@ -138,6 +141,9 @@ spec:
        - name: nginx-conf
          configMap:
            name: {{ include "esgf.component.fullname" (list . "fileServer") }}
        - name: static-content
          configMap:
            name: {{ include "esgf.component.fullname" (list . "staticContent") }}
        # In order to use a read-only root filesystem, we mount emptyDirs in places
        # where files are expected to change
        - name: nginx-cache
+12 −0
Original line number Diff line number Diff line
{{- $fileServer := .Values.data.fileServer -}}
{{- if (and .Values.data.enabled $fileServer.enabled) -}}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "esgf.component.fullname" (list . "staticContent") }}
  labels: {{ include "esgf.component.labels" (list . "staticContent" $fileServer.labels) | nindent 4 }}
data:
{{- if $fileServer.robotsTxtEnabled -}}
  robots.txt: {{ tpl (.Files.Get "files/fileServer/robots.txt") . | quote }}
{{- end -}}
{{- end -}}
+2 −0
Original line number Diff line number Diff line
@@ -357,6 +357,8 @@ data:
  fileServer:
    # Indicates if the file server should be deployed or not
    enabled: true
    # Whether or not to serve a robots.txt file at /robots.txt
    robotsTxtEnabled: false
    # Image overrides for the file server image
    image:
      repository: nginx