From 17e306825ecf0fe23aace3353619a35f82c90e3a Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Fri, 7 Aug 2020 16:25:14 -0400 Subject: [PATCH] [powerdns] Powerdns fix startup (#313) --- charts/powerdns/Chart.yaml | 2 +- charts/powerdns/templates/deployment.yaml | 2 ++ charts/powerdns/templates/secret.yaml | 3 ++- charts/powerdns/values.yaml | 9 +++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/charts/powerdns/Chart.yaml b/charts/powerdns/Chart.yaml index 9027e528..b9b29a47 100755 --- a/charts/powerdns/Chart.yaml +++ b/charts/powerdns/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "latest" description: PowerDNS is a DNS server, written in C++ and licensed under the GPL. It runs on most Unix derivatives. PowerDNS features a large number of different backends ranging from simple BIND style zonefiles to relational databases and load balancing/failover algorithms. A DNS recursor is provided as a separate program. name: powerdns -version: 1.0.0 +version: 1.0.1 home: https://www.powerdns.com/ sources: - http://www.github.com/PowerDNS/ diff --git a/charts/powerdns/templates/deployment.yaml b/charts/powerdns/templates/deployment.yaml index 97cb6761..8fcaf31c 100755 --- a/charts/powerdns/templates/deployment.yaml +++ b/charts/powerdns/templates/deployment.yaml @@ -10,6 +10,8 @@ spec: matchLabels: app.kubernetes.io/name: {{ include "powerdns.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} + strategy: + type: {{ .Values.strategyType }} template: metadata: labels: diff --git a/charts/powerdns/templates/secret.yaml b/charts/powerdns/templates/secret.yaml index 7b81dc90..643acabe 100755 --- a/charts/powerdns/templates/secret.yaml +++ b/charts/powerdns/templates/secret.yaml @@ -7,7 +7,8 @@ metadata: type: Opaque data: {{- if .Values.postgres.enabled }} - postgres_host: "{{ printf (include "powerdns.fullname" "-postgres" ) | b64enc }}" + {{- $postgrestmp := printf "%s-%s" .Release.Name "postgres"}} + postgres_host: "{{ $postgrestmp |b64enc }}" postgres_port: "{{ .Values.powerdns.postgres.port | toString | b64enc }}" postgres_username: "{{ .Values.powerdns.postgres.username | b64enc }}" postgres_password: "{{ .Values.powerdns.postgres.password | toString | b64enc }}" diff --git a/charts/powerdns/values.yaml b/charts/powerdns/values.yaml index be914304..9b118542 100755 --- a/charts/powerdns/values.yaml +++ b/charts/powerdns/values.yaml @@ -3,6 +3,7 @@ # Declare variables to be passed into your templates. replicaCount: 1 +strategyType: Recreate image: repository: psitrax/powerdns @@ -60,14 +61,10 @@ affinity: {} powerdns: domain: mydomain.local postgres: - host: powerdns-postgres - port: 5432 username: pdns password: pdnspass database: pdns mysql: - host: powerdns-mariadb - port: 3306 username: pdns password: pdnspass database: pdns @@ -89,6 +86,10 @@ mariadb: enabled: false postgres: enabled: false + global: + postgresqlUsername: pdns + postgresqlPassword: pdnspass + postgresqlDatabase: pdns # Probes configuration probes: