diff --git a/Chart.yaml b/Chart.yaml index a3ac066..9d38a86 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -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 diff --git a/README.md b/README.md index 08f5cce..1a749f7 100644 --- a/README.md +++ b/README.md @@ -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 | `/` diff --git a/requirements.yaml b/requirements.yaml index 50ce735..7903a26 100644 --- a/requirements.yaml +++ b/requirements.yaml @@ -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 diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 911a731..64eb86f 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "pdns.fullname" . }} diff --git a/templates/ingress.yaml b/templates/ingress.yaml index 6928573..d3e3b73 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -32,7 +32,7 @@ spec: paths: - path: {{ $ingressPath }} backend: - serviceName: {{ $fullName }} + serviceName: {{ $fullName }}-tcp servicePort: api {{- end }} {{- end }} diff --git a/templates/service.yaml b/templates/service-tcp.yaml similarity index 66% rename from templates/service.yaml rename to templates/service-tcp.yaml index 4210327..15d78bf 100644 --- a/templates/service.yaml +++ b/templates/service-tcp.yaml @@ -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 diff --git a/templates/service-udp.yaml b/templates/service-udp.yaml new file mode 100644 index 0000000..b32a4d1 --- /dev/null +++ b/templates/service-udp.yaml @@ -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 }} diff --git a/values.yaml b/values.yaml index adb35c5..8e3fd03 100644 --- a/values.yaml +++ b/values.yaml @@ -20,6 +20,8 @@ image: service: type: ClusterIP + loadBalancerIP: + annotations: ingress: enabled: true