Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[unbound] split the unbound service in two and don't use named ports #7597

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions system/unbound/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ spec:
{{ toYaml .Values.resources.unbound | indent 10 }}
securityContext:
privileged: true
ports:
{{- range $.Values.unbound.externalPorts | required "externalPorts missing" }}
- name: dns-tcp-{{.}}
containerPort: {{.}}
protocol: TCP
- name: dns-udp-{{.}}
containerPort: {{.}}
protocol: UDP
{{- end }}
volumeMounts:
- name: unbound-conf
mountPath: /etc/unbound
Expand Down
27 changes: 13 additions & 14 deletions system/unbound/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
{{- range tuple "udp" "tcp"}}
{{- $proto := . }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.unbound.name }}
name: {{ $.Values.unbound.name }}-{{ $proto }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "{{.Values.unbound.port_unbound_exporter}}"
prometheus.io/targets: {{ required ".Values.alerts.prometheus missing" .Values.alerts.prometheus | quote }}
prometheus.io/port: "{{$.Values.unbound.port_unbound_exporter}}"
prometheus.io/targets: {{ required "$.Values.alerts.prometheus missing" $.Values.alerts.prometheus | quote }}
parrot.sap.cc/announce: 'true'
service.alpha.kubernetes.io/reject-traffic-on-external-ip: "false"
spec:
type: LoadBalancer
externalTrafficPolicy: Local
selector:
app: {{ .Values.unbound.name }}
app: {{ $.Values.unbound.name }}
type: dns
ports:
{{- range $.Values.unbound.externalPorts | required ".Values.unbound.externalPorts missing" }}
- name: dns-tcp-{{.}}
protocol: TCP
ports:
{{- range $.Values.unbound.externalPorts | required "$.Values.unbound.externalPorts missing" }}
- name: dns-{{ $proto }}-{{.}}
protocol: {{ $proto | upper }}
port: {{.}}
targetPort: dns-tcp-{{.}}
- name: dns-udp-{{.}}
protocol: UDP
port: {{.}}
targetPort: dns-udp-{{.}}
{{- end }}
externalIPs:
{{- required "A valid .Values.unbound.externalIPs required!" .Values.unbound.externalIPs | toYaml | nindent 2 }}
{{- required "A valid $.Values.unbound.externalIPs required!" $.Values.unbound.externalIPs | toYaml | nindent 2 }}
{{- end }}
Loading