Skip to content

Commit

Permalink
allow defining ipFamilyPolicy for services
Browse files Browse the repository at this point in the history
  • Loading branch information
roobre committed Aug 5, 2024
1 parent c590056 commit f5bcf52
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Enhancements

- Allow specifying `ipFamilyPolicy` on all services.

## v0.5.0 - 2024-07-08

### Note
Expand Down
12 changes: 12 additions & 0 deletions charts/stateless-dns/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ metadata:
{{- include "stateless-dns.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.dnsUdp.type }}
{{- with .Values.service.dnsUdp.ipFamilyPolicy }}
ipFamilyPolicy: {{ . | quote }}
{{- end }}
ports:
- port: {{ .Values.service.dnsUdp.port }}
targetPort: dns-udp
Expand All @@ -37,6 +40,9 @@ metadata:
{{- include "stateless-dns.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.dnsTcp.type }}
{{- with .Values.service.dnsTcp.ipFamilyPolicy }}
ipFamilyPolicy: {{ . | quote }}
{{- end }}
ports:
- port: {{ .Values.service.dnsTcp.port }}
targetPort: dns-tcp
Expand All @@ -61,6 +67,9 @@ metadata:
{{- include "stateless-dns.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.api.type }}
{{- with .Values.service.api.ipFamilyPolicy }}
ipFamilyPolicy: {{ . | quote }}
{{- end }}
ports:
- port: {{ .Values.service.api.port }}
targetPort: http
Expand All @@ -85,6 +94,9 @@ metadata:
{{- include "stateless-dns.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.externalDNSMetrics.type }}
{{- with .Values.service.externalDNSMetrics.ipFamilyPolicy }}
ipFamilyPolicy: {{ . | quote }}
{{- end }}
ports:
- port: {{ .Values.service.externalDNSMetrics.port }}
targetPort: metrics-http
Expand Down
5 changes: 5 additions & 0 deletions charts/stateless-dns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,28 @@ service:
api:
enabled: true # Specifies whether a service that points to the http port of pdns http API should be created. It is separated from the other services so the user can select service type freely from the others needed.
type: ClusterIP # Service type.
# ipFamilyPolicy can be defined as below. If ommited, it will not be rendered in yaml.
# ipFamilyPolicy: SingleStack
port: 80 # Service port.
annotations: {} # Annotations to add to the service.

dnsUdp:
enabled: true # Specifies whether a service that points to the UDP port of pdns should be created. It is separated from TCP DNS port because of limitations of Kubernetes. You cannot create a service with type LoadBalancer that exposes UDP and TCP ports at the same time. Two services should workaround this limitation.
# ipFamilyPolicy: SingleStack
type: ClusterIP # Service type.
port: 53 # Service port.
annotations: {} # Annotations to add to the service.

dnsTcp:
enabled: true # Specifies whether a service that points to the TCP port of pdns should be created. It is separated from UDP DNS port because of limitations of Kubernetes. You cannot create a service with type LoadBalancer that exposes UDP and TCP ports at the same time. Two services should workaround this limitation.
# ipFamilyPolicy: SingleStack
type: ClusterIP # Service type.
port: 53 # Service port.
annotations: {} # Annotations to add to the service.

externalDNSMetrics:
enabled: true # Specifies whether a service that points to the http port of external-dns prometheus metrics.
# ipFamilyPolicy: SingleStack
type: ClusterIP # Service type.
port: 80 # Service port.
annotations: {} # Annotations to add to the service.
Expand Down

0 comments on commit f5bcf52

Please sign in to comment.