mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-22 09:35:08 +02:00
✨(helm) allow disallowing search engine indexing per instance
Add an optional ConfigMap-backed robots.txt mounted into the frontend static export (frontend.robotsTxt.enabled/content), following the same pattern as backend.themeCustomization, and enable it with a full Disallow on the feature review-app environment.
This commit is contained in:
@@ -134,6 +134,12 @@ frontend:
|
||||
|
||||
replicas: 1
|
||||
|
||||
robotsTxt:
|
||||
enabled: true
|
||||
content: |
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
|
||||
image:
|
||||
repository: lasuite/impress-frontend
|
||||
pullPolicy: Always
|
||||
|
||||
@@ -216,6 +216,8 @@
|
||||
| `frontend.extraVolumes` | Additional volumes to mount on the frontend. | `[]` |
|
||||
| `frontend.pdb.enabled` | Enable pdb on frontend | `true` |
|
||||
| `frontend.serviceAccountName` | Optional service account name to use for frontend pods | `nil` |
|
||||
| `frontend.robotsTxt.enabled` | Enable serving a custom robots.txt file from the frontend, e.g. to disallow indexing of non-production instances | `false` |
|
||||
| `frontend.robotsTxt.content` | Content of the robots.txt file | `"User-agent: *\nAllow: /\n"` |
|
||||
|
||||
### posthog
|
||||
|
||||
|
||||
@@ -97,6 +97,12 @@ spec:
|
||||
subPath: {{ .subPath | default "" }}
|
||||
readOnly: {{ .readOnly }}
|
||||
{{- end }}
|
||||
{{- if .Values.frontend.robotsTxt.enabled }}
|
||||
- name: robots-txt
|
||||
mountPath: /app/robots.txt
|
||||
subPath: robots.txt
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- with .Values.frontend.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
@@ -148,6 +154,11 @@ spec:
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.frontend.robotsTxt.enabled }}
|
||||
- name: robots-txt
|
||||
configMap:
|
||||
name: docs-frontend-robots-txt
|
||||
{{- end }}
|
||||
---
|
||||
{{ if .Values.frontend.pdb.enabled }}
|
||||
apiVersion: policy/v1
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{{- if .Values.frontend.robotsTxt.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: docs-frontend-robots-txt
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
robots.txt: |
|
||||
{{- .Values.frontend.robotsTxt.content | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -573,6 +573,14 @@ frontend:
|
||||
## @param frontend.serviceAccountName Optional service account name to use for frontend pods
|
||||
serviceAccountName: null
|
||||
|
||||
## @param frontend.robotsTxt.enabled Enable serving a custom robots.txt file from the frontend, e.g. to disallow indexing of non-production instances
|
||||
## @param frontend.robotsTxt.content Content of the robots.txt file
|
||||
robotsTxt:
|
||||
enabled: false
|
||||
content: |
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
## @section posthog
|
||||
|
||||
posthog:
|
||||
|
||||
Reference in New Issue
Block a user