Skip to content

Commit

Permalink
feat(kube-nas): install coredns with chart
Browse files Browse the repository at this point in the history
  • Loading branch information
tyriis committed Oct 15, 2023
1 parent 6d2914f commit 828b8e1
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 0 deletions.
90 changes: 90 additions & 0 deletions kubernetes/kube-nas/apps/kube-system/coredns/app/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta1.json
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: coredns
namespace: kube-system
spec:
interval: 30m
chart:
spec:
chart: coredns
version: 1.27.1
sourceRef:
kind: HelmRepository
name: coredns-charts
namespace: flux-system
maxHistory: 2
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
fullnameOverride: coredns
replicaCount: 1
k8sAppLabelOverride: kube-dns
service:
name: kube-dns
clusterIP: 10.43.0.10
serviceAccount:
create: true
deployment:
annotations:
reloader.stakater.com/auto: "true"
servers:
- zones:
- zone: .
scheme: dns://
use_tcp: true
port: 53
plugins:
- name: log
- name: errors
- name: health
configBlock: |-
lameduck 5s
- name: ready
- name: kubernetes
parameters: cluster.local in-addr.arpa ip6.arpa
configBlock: |-
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
- name: prometheus
parameters: 0.0.0.0:9153
- name: forward
parameters: . /etc/resolv.conf
- name: cache
parameters: 30
- name: loop
- name: reload
- name: loadbalance
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/instance: coredns
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kube-system
resources:
- ./helm-release.yaml
19 changes: 19 additions & 0 deletions kubernetes/kube-nas/apps/kube-system/coredns/flux-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1beta2.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: apps-coredns
namespace: flux-system
labels:
substitution.flux.home.arpa/enabled: "true"
spec:
path: ./kubernetes/kube-nas/apps/kube-system/coredns/app
prune: false # never should be deleted
sourceRef:
kind: GitRepository
name: home-ops
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
10 changes: 10 additions & 0 deletions kubernetes/kube-nas/flux/repositories/helm/coredns-charts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrepository-source-v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: coredns-charts
namespace: flux-system
spec:
interval: 2h
url: https://coredns.github.io/helm

0 comments on commit 828b8e1

Please sign in to comment.