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

enable support for static load balancer ips in service #14

Open
wants to merge 5 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
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart to deploy PowerDNS to Kubernetes
name: pdns
version: 0.1.0
version: 0.1.2
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ The command removes all the Kubernetes components associated with the chart and
| `image.tag` | Image tag. | `4.1.2`|
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `service.type` | Kubernetes service type | `ClusterIP` |
| `service.loadBalancerIP` | Kubernetes static IP for service | `` |
| `service.annotations` | Kubernetes annotations for service | `` |
| `ingress.enabled` | Enables Ingress | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.path` | Custom path | `/`
Expand Down
4 changes: 2 additions & 2 deletions requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies:
- name: mariadb
version: 2.1.1
repository: https://kubernetes-charts.storage.googleapis.com/
version: 7.4.2
repository: https://charts.bitnami.com/bitnami
condition: mariadb.enabled
2 changes: 1 addition & 1 deletion templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "pdns.fullname" . }}
Expand Down
2 changes: 1 addition & 1 deletion templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
serviceName: {{ $fullName }}-tcp
servicePort: api
{{- end }}
{{- end }}
13 changes: 8 additions & 5 deletions templates/service.yaml → templates/service-tcp.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "pdns.fullname" . }}
name: {{ template "pdns.fullname" . }}-tcp
labels:
app: {{ template "pdns.name" . }}
chart: {{ template "pdns.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.service.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- port: 8081
targetPort: 8081
protocol: TCP
name: api
- port: 53
targetPort: 53
protocol: UDP
name: dns-udp
- port: 53
targetPort: 53
protocol: TCP
Expand Down
26 changes: 26 additions & 0 deletions templates/service-udp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "pdns.fullname" . }}-udp
labels:
app: {{ template "pdns.name" . }}
chart: {{ template "pdns.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.service.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- port: 53
targetPort: 53
protocol: UDP
name: dns-udp
selector:
app: {{ template "pdns.name" . }}
release: {{ .Release.Name }}
2 changes: 2 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ image:

service:
type: ClusterIP
loadBalancerIP:
annotations:

ingress:
enabled: true
Expand Down