File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ $(STACKS)::
9595.PHONY : envsubst imports install namespace_config node_labels \
9696 persistent remote_volumes secrets sops untaint_master
9797
98- IMPORTS = cert-manager flannel
98+ IMPORTS = cert-manager flannel nodelocaldns
9999INSTALL_YAML = $(basename $(wildcard install/* .yaml) ) \
100100 $(addprefix imports/, $(IMPORTS ) )
101101VOLUMES_YAML = $(basename $(wildcard volumes/* .yaml) )
@@ -205,6 +205,15 @@ imports/cert-manager.yaml: imports/cert-manager-$(VERSION_CERT_MANAGER).yaml
205205imports/cert-manager-$(VERSION_CERT_MANAGER ) .yaml :
206206 curl -sLo $@ https://github.com/jetstack/cert-manager/releases/download/v$(VERSION_CERT_MANAGER ) /cert-manager.yaml
207207
208+ # #########
209+ # node-local-dns
210+ # #########
211+ imports/nodelocaldns.yaml : imports/nodelocaldns-$(VERSION_NODE_LOCAL_DNS ) .yaml
212+ ln -s $(notdir $< ) $@
213+ imports/nodelocaldns-$(VERSION_NODE_LOCAL_DNS ) .yaml :
214+ curl -sLo $@ https://raw.githubusercontent.com/kubernetes/kubernetes/refs/tags/v$(VERSION_NODE_LOCAL_DNS ) /cluster/addons/dns/nodelocaldns/nodelocaldns.yaml
215+ sed -i -e " s/__PILLAR__LOCAL__DNS__/$( NODE_LOCAL_DNS_IP) /g; s/__PILLAR__DNS__DOMAIN__/cluster.local/g; s/__PILLAR__DNS__SERVER__/$( COREDNS_IP) /g" $@
216+
208217# #########
209218# Add-ons
210219# #########
Original file line number Diff line number Diff line change @@ -32,9 +32,11 @@ export TZ ?= UTC
3232export K8S_INGRESS_NGINX_IP ?= 10.101.1.2
3333export AUTHELIA_IP ?= 10.101.1.5
3434export MONITOR_EXT_IP ?= 192.168.1.20
35- # export PROMETHEUS_IP ?= 10.101.1.21
36- # export PROM_ALERT_IP ?= 10.101.1.22
35+ # export PROMETHEUS_IP ?= 10.101.1.21
36+ # export PROM_ALERT_IP ?= 10.101.1.22
3737export RSYSLOGD_IP ?= 10.101.1.40
38+ export COREDNS_IP ?= 10.96.0.10
39+ export NODE_LOCAL_DNS_IP ?= 169.254.0.10
3840
3941# Exposed nodePorts - install/ingress-nginx.yaml
4042export NODEPORT_HTTP ?= 30080
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export VERSION_FLANNEL ?= 0.26.1
1010export VERSION_HELM ?= 3.16.2
1111export VERSION_INGRESS_NGINX ?= 1.13.1
1212export VERSION_METRICS ?= 2.15.0
13+ export VERSION_NODE_LOCAL_DNS ?= 1.32.6
1314
1415# Held back versions - more effort to upgrade
1516export VERSION_CALICO ?= 3.16.5
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ dependencies:
1313 version : 0.1.8
1414 repository : https://instantlinux.github.io/docker-tools
1515- name : prometheus
16- version : 0.1.0
16+ version : 0.1.1
1717 repository : file://subcharts/prometheus
1818 condition : prometheus.enabled
1919- name : alertmanager
Original file line number Diff line number Diff line change 66- https://github.com/instantlinux/docker-tools
77- https://hub.docker.com/r/prom/prometheus
88type : application
9- version : 0.1.0
10- appVersion : " v3.3.1 "
9+ version : 0.1.1
10+ appVersion : " v3.5.0 "
1111dependencies :
1212- name : chartlib
1313 version : 0.1.8
Original file line number Diff line number Diff line change @@ -10,18 +10,9 @@ deployment:
1010 nodeSelector :
1111 service.prometheus : allow
1212volumeMounts :
13- - mountPath : /etc/prometheus/prometheus.yml
13+ - mountPath : /etc/prometheus
1414 name : config
1515 readOnly : true
16- subPath : prometheus.yml
17- - mountPath : /etc/prometheus/alert-rules.yml
18- name : config
19- readOnly : true
20- subPath : alert-rules.yml
21- - mountPath : /etc/prometheus/targets.json
22- name : config
23- readOnly : true
24- subPath : targets.json
2516- mountPath : /prometheus
2617 name : data
2718volumes :
@@ -96,6 +87,15 @@ configmap:
9687 regex: ^myth.*
9788 target_label: alertSuppress
9889 replacement: true
90+ - job_name: dns-cache
91+ file_sd_configs:
92+ - files: [ k8s-workers.json ]
93+ relabel_configs:
94+ - source_labels: [__address__]
95+ target_label: instance
96+ - source_labels: [ __address__ ]
97+ target_label: __address__
98+ replacement: '${1}:9253'
9999 targets.json : |
100100 # Override the targets with your nodes list, comma-separated
101101 [
@@ -108,6 +108,18 @@ configmap:
108108 ]
109109 }
110110 ]
111+ k8s-workers.json : |
112+ # Override the targets with your k8s worker list, comma-separated
113+ [
114+ {
115+ "labels": {
116+ "job": "dns-cache"
117+ },
118+ "targets": [
119+ "localhost"
120+ ]
121+ }
122+ ]
111123 alert-rules.yml : |
112124 groups:
113125 - name: systems
You can’t perform that action at this time.
0 commit comments