all repos — infra @ 256c7ae8a20a41d0a3eed7519969d2980a796fca

infrastructure manifests and setup notes

apps: coredns: use custom-config to load corefile
Anirudh Oppiliappan x@icyphox.sh
Sat, 06 Jul 2024 23:52:34 +0300
commit

256c7ae8a20a41d0a3eed7519969d2980a796fca

parent

6e48325a81b810b901bfa5e5dcbd464fa535c859

1 files changed, 2 insertions(+), 127 deletions(-)

jump to
M apps/coredns/coredns.yamlapps/coredns/coredns.yaml

@@ -1,129 +1,6 @@

-apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - k8s-app: kube-dns - kubernetes.io/name: CoreDNS - name: coredns - namespace: kube-system -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: kube-dns - template: - metadata: - labels: - k8s-app: kube-dns - spec: - containers: - - args: - - -conf - - /etc/coredns/Corefile - image: coredns/coredns:latest - imagePullPolicy: Always - livenessProbe: - failureThreshold: 3 - httpGet: - path: /health - port: 8080 - scheme: HTTP - initialDelaySeconds: 60 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - name: coredns - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - - containerPort: 9153 - name: metrics - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /ready - port: 8181 - scheme: HTTP - periodSeconds: 2 - successThreshold: 1 - timeoutSeconds: 1 - resources: - limits: - memory: 170Mi - requests: - cpu: 100m - memory: 70Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - add: - - NET_BIND_SERVICE - drop: - - all - readOnlyRootFilesystem: true - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /etc/coredns - name: config-volume - readOnly: true - - mountPath: /etc/coredns/custom - name: custom-config-volume - readOnly: true - dnsPolicy: Default - nodeSelector: - kubernetes.io/os: linux - priorityClassName: system-cluster-critical - restartPolicy: Always - serviceAccount: coredns - serviceAccountName: coredns - volumes: - - configMap: - defaultMode: 420 - items: - - key: Corefile - path: Corefile - - key: NodeHosts - path: NodeHosts - name: coredns - name: config-volume - - configMap: - defaultMode: 420 - name: coredns-custom - optional: true - name: custom-config-volume ---- apiVersion: v1 data: - Corefile: | - .:53 { - errors - health - ready - kubernetes cluster.local in-addr.arpa ip6.arpa { - pods insecure - fallthrough in-addr.arpa ip6.arpa - } - hosts /etc/coredns/NodeHosts { - ttl 60 - reload 15s - fallthrough - } - prometheus :9153 - forward . /etc/resolv.conf - cache 30 - loop - reload - loadbalance - import /etc/coredns/custom/*.override - - } - + koti.lan.server: | koti.lan:53 { kubernetes koti.lan

@@ -132,9 +9,7 @@ rewrite name rss.koti.lan yarr.default.svc.koti.lan

} import /etc/coredns/custom/*.server - NodeHosts: | - 100.85.88.64 sini kind: ConfigMap metadata: - name: coredns + name: coredns-custom namespace: kube-system