From 7a772279d37676d37999f6e9a95bb53a555125e6 Mon Sep 17 00:00:00 2001 From: Adam Chester Date: Mon, 23 Mar 2020 15:15:34 +1000 Subject: [PATCH 1/5] enable command to be overridden --- pgbouncer/templates/deployment.yaml | 7 +++---- pgbouncer/values.yaml | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pgbouncer/templates/deployment.yaml b/pgbouncer/templates/deployment.yaml index 831586ea..2b1c9e1d 100644 --- a/pgbouncer/templates/deployment.yaml +++ b/pgbouncer/templates/deployment.yaml @@ -49,11 +49,10 @@ spec: - name: pgbouncer image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{ if .Values.command }} command: - - pgbouncer - - -u - - pgbouncer - - /etc/pgbouncer/pgbouncer.ini + {{ toYaml .Values.command | nindent 12 }} + {{ end }} env: {{- include "pgbouncer.environment" . | nindent 12 }} ports: diff --git a/pgbouncer/values.yaml b/pgbouncer/values.yaml index 3cc7be53..48911ec9 100644 --- a/pgbouncer/values.yaml +++ b/pgbouncer/values.yaml @@ -11,6 +11,8 @@ image: antiAffinity: soft additionalAffinities: {} +command: [ 'pgbouncer', '-u', 'pgbouncer' '/etc/pgbouncer/pgbouncer.ini' ] + budget: minAvailable: 0 From f24015ff35c3da9ee248963de417dbfa8f73691a Mon Sep 17 00:00:00 2001 From: Adam Chester Date: Mon, 23 Mar 2020 16:41:35 +1000 Subject: [PATCH 2/5] Name it `.Values.image.command` instead, because the command is tightly coupled with the image. --- pgbouncer/templates/deployment.yaml | 4 ++-- pgbouncer/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pgbouncer/templates/deployment.yaml b/pgbouncer/templates/deployment.yaml index 2b1c9e1d..7f56f675 100644 --- a/pgbouncer/templates/deployment.yaml +++ b/pgbouncer/templates/deployment.yaml @@ -49,9 +49,9 @@ spec: - name: pgbouncer image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - {{ if .Values.command }} + {{ if .Values.image.command }} command: - {{ toYaml .Values.command | nindent 12 }} + {{ toYaml .Values.image.command | nindent 12 }} {{ end }} env: {{- include "pgbouncer.environment" . | nindent 12 }} diff --git a/pgbouncer/values.yaml b/pgbouncer/values.yaml index 48911ec9..94cc0fbc 100644 --- a/pgbouncer/values.yaml +++ b/pgbouncer/values.yaml @@ -6,12 +6,12 @@ replicaCount: 1 image: repository: quay.io/centerforopenscience/pgbouncer tag: '1.8.1' + command: [ 'pgbouncer', '-u', 'pgbouncer' '/etc/pgbouncer/pgbouncer.ini' ] pullPolicy: Always antiAffinity: soft additionalAffinities: {} -command: [ 'pgbouncer', '-u', 'pgbouncer' '/etc/pgbouncer/pgbouncer.ini' ] budget: minAvailable: 0 From 4bb94ce0fa69d49ffd3bf404a7d813737fbec04d Mon Sep 17 00:00:00 2001 From: Adam Chester Date: Mon, 23 Mar 2020 16:43:06 +1000 Subject: [PATCH 3/5] Remove extra newline --- pgbouncer/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pgbouncer/values.yaml b/pgbouncer/values.yaml index 94cc0fbc..20704c06 100644 --- a/pgbouncer/values.yaml +++ b/pgbouncer/values.yaml @@ -12,7 +12,6 @@ image: antiAffinity: soft additionalAffinities: {} - budget: minAvailable: 0 From 2b794496bc67ba242eb5ea250d3cb0d01cc6805b Mon Sep 17 00:00:00 2001 From: Adam Chester Date: Mon, 23 Mar 2020 16:59:11 +1000 Subject: [PATCH 4/5] Bump pgbouncer version to v0.1.2 --- pgbouncer/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgbouncer/Chart.yaml b/pgbouncer/Chart.yaml index fbb38ee9..118f62ca 100644 --- a/pgbouncer/Chart.yaml +++ b/pgbouncer/Chart.yaml @@ -1,5 +1,5 @@ name: pgbouncer -version: 0.1.1 +version: 0.1.2 appVersion: 1.8.1 description: PgBouncer - lightweight connection pooler for PostgreSQL keywords: From e2ac21d7ad7fbe2c278f1c2c89852d3410d784ab Mon Sep 17 00:00:00 2001 From: Adam Chester Date: Mon, 23 Mar 2020 17:02:06 +1000 Subject: [PATCH 5/5] Fix missing comma --- pgbouncer/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgbouncer/values.yaml b/pgbouncer/values.yaml index 20704c06..5e1b7656 100644 --- a/pgbouncer/values.yaml +++ b/pgbouncer/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: repository: quay.io/centerforopenscience/pgbouncer tag: '1.8.1' - command: [ 'pgbouncer', '-u', 'pgbouncer' '/etc/pgbouncer/pgbouncer.ini' ] + command: [ 'pgbouncer', '-u', 'pgbouncer', '/etc/pgbouncer/pgbouncer.ini' ] pullPolicy: Always antiAffinity: soft