Added ads.txt

This commit is contained in:
Ariel Sosnovsky committed 2024-03-14 16:57:59 -04:00
1 parent cc11fe6cd3
commit c42130d64c
4 files changed
+102 -3

No files matched your search

@@ -0,0 +1,83 @@
{{ range $staticFile := .Values.staticFiles.secondaryDomain }}
{{ $prefix := printf "sec-domain-%s" $staticFile.path }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{$prefix}}-static-files"
data:
index.html: {{ $staticFile.content }}
---
apiVersion: v1
kind: Pod
metadata:
name: "{{$prefix}}-host"
labels:
app: "{{$prefix}}-host"
spec:
volumes:
- name: static-files
configMap:
name: "{{$prefix}}-static-files"
containers:
- name: api
image: caddy:2.7-alpine
command:
- caddy
- file-server
- --root
- /files
- --listen
- 80
volumeMount:
- mountPath: /files
name: static-files
resources:
limits:
memory: 1Gi
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
name: "{{$prefix}}-static-files"
labels:
app: "{{$prefix}}-static-files"
spec:
selector:
app: "{{$prefix}}-host"
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "{{$prefix}}-static-files-{{$staticFile.path}}"
annotations:
homelab-ingress/managing-app-namespace: "apps-ingresses"
traefik.ingress.kubernetes.io/router.middlewares: {{ $staticFile.middleware | default "apps-ingresses-https-redirect"}}@kubernetescrd
spec:
rules:
- host: "{{ $.Values.global.secondaryDomain }}"
http:
paths:
- backend:
service:
name: "{{$prefix}}-static-files"
port:
number: 80
path: "/{{$staticFile.path}}"
pathType: Prefix
{{ if $.Values.global.tls.enabled }}
tls:
- secretName: "tls-{{ $.Values.global.secondaryDomain }}"
hosts:
- "{{ $.Values.global.secondaryDomain }}"
{{ end }}
{{ end }}
+7 -1
View File
@@ -15,4 +15,10 @@ services:
service: "dummy-app"
namespace: "apps-ingresses"
middleware: "apps-ingresses-forwardauth-authentik"
group: "Demo"
group: "Demo"
staticFiles:
mainDomain: []
secondaryDomain:
- path: "ads.txt"
content: |
google.com, pub-6915532978483380, DIRECT, f08c47fec0942fa0
+8 -1
View File
@@ -40,4 +40,11 @@ reverseProxy:
group: "Cameras"
cloudflare:
enabled: true
enabled: true
staticFiles:
mainDomain: []
secondaryDomain:
- suffix: "/ads.txt"
content: |
google.com, pub-6915532978483380, DIRECT, f08c47fec0942fa0
+4 -1
View File
@@ -24,4 +24,7 @@ cloudflare:
- ""
- ".core"
- ".vh"
- ".wa"
- ".wa"
staticFiles:
mainDomain: []
secondaryDomain: []