fp/infrastructure/controllers/external-dns.yaml

79 lines
1.8 KiB
YAML
Raw Normal View History

2024-04-26 18:18:44 +00:00
---
apiVersion: v1
2024-04-26 17:55:07 +00:00
kind: ServiceAccount
metadata:
name: external-dns
2024-04-26 22:04:39 +00:00
namespace: futureporn
2024-04-26 17:55:07 +00:00
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services","endpoints","pods"]
verbs: ["get","watch","list"]
- apiGroups: ["extensions","networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: external-dns-viewer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: external-dns
subjects:
- kind: ServiceAccount
name: external-dns
2024-04-26 22:04:39 +00:00
namespace: futureporn
2024-04-26 17:55:07 +00:00
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: external-dns
2024-04-26 22:04:39 +00:00
namespace: futureporn
2024-04-26 17:55:07 +00:00
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: external-dns
template:
metadata:
labels:
app: external-dns
spec:
serviceAccountName: external-dns
containers:
- name: external-dns
resources:
limits:
memory: "1024Mi"
cpu: "100m"
image: registry.k8s.io/external-dns/external-dns:v0.14.1
args:
2024-06-24 23:07:32 +00:00
- --source=service
2024-06-24 20:36:28 +00:00
- --provider=exoscale
2024-06-24 21:41:18 +00:00
- --domain-filter=sbtp.xyz
- --policy=sync # if you want DNS entries to get deleted as well
- --txt-owner-id=futureporn
- --exoscale-apizone=de-fra-1
- --exoscale-apienv=api
2024-04-26 17:55:07 +00:00
env:
2024-06-24 21:41:18 +00:00
- name: EXTERNAL_DNS_EXOSCALE_APIKEY
2024-04-26 17:55:07 +00:00
valueFrom:
secretKeyRef:
2024-06-24 21:41:18 +00:00
name: exoscale
2024-04-26 17:55:07 +00:00
key: apiKey
2024-06-24 21:41:18 +00:00
- name: EXTERNAL_DNS_EXOSCALE_APISECRET
valueFrom:
secretKeyRef:
name: exoscale
key: apiSecret