1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-20 04:23:16 +00:00

Add optional ads.txt support to Helm chart

This commit is contained in:
2025-07-04 13:59:59 +02:00
parent 342cc7c84c
commit c214cae8f1
5 changed files with 32 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v2
name: xslt-playground
description: Helm chart for xslt-playground frontend and backend
version: 0.1.1
version: 0.1.2
appVersion: "0.1.0"
+1
View File
@@ -22,6 +22,7 @@ Key parameters in `values.yaml`:
The frontend reads this variable at runtime so changing the deployment does
not require rebuilding the image. When empty it defaults to the internal
backend service URL.
- `adsTxt` optional content for an `ads.txt` file served by the frontend pod.
- `hpa` enable CPU-based autoscaling for both deployments.
When `firebase.enabled` is true you must create the secret before installing the chart:
@@ -0,0 +1,11 @@
{{- if .Values.adsTxt }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "xslt-playground.fullname" . }}-ads
labels:
{{- include "xslt-playground.labels" . | nindent 4 }}
data:
ads.txt: |
{{ .Values.adsTxt | indent 4 }}
{{- end }}
@@ -29,8 +29,24 @@ spec:
secretKeyRef:
name: {{ .Values.firebase.secretName }}
key: {{ .Values.firebase.configKey }}
{{- end }}
{{- if .Values.adsTxt }}
volumeMounts:
- name: ads
mountPath: /usr/share/nginx/html/ads.txt
subPath: ads.txt
readOnly: true
{{- end }}
ports:
- containerPort: {{ .Values.service.frontend.port }}
resources: {{- toYaml .Values.resources.frontend | nindent 12 }}
{{- if .Values.adsTxt }}
volumes:
- name: ads
configMap:
name: {{ include "xslt-playground.fullname" . }}-ads
items:
- key: ads.txt
path: ads.txt
{{- end }}
+3
View File
@@ -63,3 +63,6 @@ frontend:
# internal service URL when empty.
backendUrl: ""
# Content for the optional ads.txt file served by the frontend
adsTxt: ""