From 1d3890667bbdf4524205833f4150b2b727cb23aa Mon Sep 17 00:00:00 2001 From: heidmann Date: Wed, 14 Jun 2023 12:53:52 +0200 Subject: [PATCH 1/4] make the required values mandatory in postgrest Signed-off-by: heidmann Signed-off-by: stranljip --- charts/regcred/templates/secret.yaml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/charts/regcred/templates/secret.yaml b/charts/regcred/templates/secret.yaml index 63b74f2..f0fddb8 100644 --- a/charts/regcred/templates/secret.yaml +++ b/charts/regcred/templates/secret.yaml @@ -1,14 +1,13 @@ -{{- if .Values.registryCredentials -}} -kind: Secret -type: kubernetes.io/dockerconfigjson apiVersion: v1 +kind: Secret metadata: - name: {{ include "regcred.fullname" . }} - labels: - {{- include "regcred.labels" . | nindent 4}} - {{- with .Values.extraLabels }} - {{- toYaml . | nindent 4 }} - {{- end }} -data: - .dockerconfigjson: {{- include "regcred.registryCredentials" .Values.registryCredentials | nindent 4 }} -{{- end -}} + name: {{ include "postgrest.fullname" . }}-secret + namespace: {{ $.Release.Namespace }} +stringData: + db-uri.txt: |- + {{- required "Missing postgrest.dbUri" .Values.postgrest.dbUri | nindent 4 }} + jwt-secret.txt: |- + {{- required "postgrest.jwtSecret" .Values.postgrest.jwtSecret | nindent 4 }} + {{- if .Values.secret }} + {{- toYaml .Values.secret | nindent 2 }} + {{- end }} From 4e2b6565671188e95ce2f9382a821e1c04d9f819 Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Sat, 29 Jul 2023 06:06:31 -0400 Subject: [PATCH 2/4] make the required values mandatory in postgrest --- charts/postgrest/templates/secret.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/postgrest/templates/secret.yaml b/charts/postgrest/templates/secret.yaml index 0cc2ef1..f0fddb8 100644 --- a/charts/postgrest/templates/secret.yaml +++ b/charts/postgrest/templates/secret.yaml @@ -5,9 +5,9 @@ metadata: namespace: {{ $.Release.Namespace }} stringData: db-uri.txt: |- - {{- .Values.postgrest.dbUri | nindent 4 }} + {{- required "Missing postgrest.dbUri" .Values.postgrest.dbUri | nindent 4 }} jwt-secret.txt: |- - {{- .Values.postgrest.jwtSecret | nindent 4 }} + {{- required "postgrest.jwtSecret" .Values.postgrest.jwtSecret | nindent 4 }} {{- if .Values.secret }} {{- toYaml .Values.secret | nindent 2 }} {{- end }} From 033e5cbf83323d541cdde9ed15fbfcfff8290e6f Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Sat, 29 Jul 2023 06:06:48 -0400 Subject: [PATCH 3/4] Revert "make the required values mandatory in postgrest" This reverts commit 1d3890667bbdf4524205833f4150b2b727cb23aa. --- charts/regcred/templates/secret.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/charts/regcred/templates/secret.yaml b/charts/regcred/templates/secret.yaml index f0fddb8..63b74f2 100644 --- a/charts/regcred/templates/secret.yaml +++ b/charts/regcred/templates/secret.yaml @@ -1,13 +1,14 @@ -apiVersion: v1 +{{- if .Values.registryCredentials -}} kind: Secret +type: kubernetes.io/dockerconfigjson +apiVersion: v1 metadata: - name: {{ include "postgrest.fullname" . }}-secret - namespace: {{ $.Release.Namespace }} -stringData: - db-uri.txt: |- - {{- required "Missing postgrest.dbUri" .Values.postgrest.dbUri | nindent 4 }} - jwt-secret.txt: |- - {{- required "postgrest.jwtSecret" .Values.postgrest.jwtSecret | nindent 4 }} - {{- if .Values.secret }} - {{- toYaml .Values.secret | nindent 2 }} - {{- end }} + name: {{ include "regcred.fullname" . }} + labels: + {{- include "regcred.labels" . | nindent 4}} + {{- with .Values.extraLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +data: + .dockerconfigjson: {{- include "regcred.registryCredentials" .Values.registryCredentials | nindent 4 }} +{{- end -}} From 7fb27a9c390750ffd8271be6ff7186cd49945a5d Mon Sep 17 00:00:00 2001 From: Cole Arendt Date: Sat, 29 Jul 2023 06:10:03 -0400 Subject: [PATCH 4/4] update docs --- charts/postgrest/Chart.yaml | 2 +- charts/postgrest/NEWS.md | 4 ++++ charts/postgrest/README.md | 10 +++++----- charts/postgrest/templates/secret.yaml | 4 ++-- charts/postgrest/values.yaml | 2 ++ 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/charts/postgrest/Chart.yaml b/charts/postgrest/Chart.yaml index 997cbb8..b91efe4 100644 --- a/charts/postgrest/Chart.yaml +++ b/charts/postgrest/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: postgrest description: A Helm chart for deploying Postgrest to Kubernetes type: application -version: 0.3.4 +version: 0.3.5 appVersion: v11.1.0 icon: https://avatars.githubusercontent.com/u/15115011?s=200&v=4 maintainers: diff --git a/charts/postgrest/NEWS.md b/charts/postgrest/NEWS.md index d632e90..2d250c8 100644 --- a/charts/postgrest/NEWS.md +++ b/charts/postgrest/NEWS.md @@ -1,3 +1,7 @@ +# 0.3.5 + +- Make values `postgrest.dbUri` and `postgrest.jwtSecret` required + # 0.3.4 - Add configuration for the `pod.adminPort` and `service.adminPort` diff --git a/charts/postgrest/README.md b/charts/postgrest/README.md index 73db34e..67a4adf 100644 --- a/charts/postgrest/README.md +++ b/charts/postgrest/README.md @@ -1,14 +1,14 @@ # postgrest -![Version: 0.3.4](https://img.shields.io/badge/Version-0.3.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v11.1.0](https://img.shields.io/badge/AppVersion-v11.1.0-informational?style=flat-square) +![Version: 0.3.5](https://img.shields.io/badge/Version-0.3.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v11.1.0](https://img.shields.io/badge/AppVersion-v11.1.0-informational?style=flat-square) ## Installing the Chart -To install the chart with the release name `my-release` at version 0.3.4: +To install the chart with the release name `my-release` at version 0.3.5: ```bash helm repo add colearendt https://colearendt.github.io/helm -helm install my-release colearendt/postgrest --version=0.3.4 +helm install my-release colearendt/postgrest --version=0.3.5 ``` #### _A Helm chart for deploying Postgrest to Kubernetes_ @@ -57,9 +57,9 @@ helm install my-release colearendt/postgrest --version=0.3.4 | postgrest.dbPool | string | `""` | | | postgrest.dbPoolTimeout | string | `""` | | | postgrest.dbSchema | string | `""` | | -| postgrest.dbUri | string | `""` | | +| postgrest.dbUri | string | `""` | The dbUri for connecting to the database. Required | | postgrest.jwtAud | string | `""` | | -| postgrest.jwtSecret | string | `""` | | +| postgrest.jwtSecret | string | `""` | The JWT Secret used for constructing JWTs. Required | | postgrest.maxRows | string | `""` | | | postgrest.openApiServerProxyUri | string | `""` | | | postgrest.preRequest | string | `""` | | diff --git a/charts/postgrest/templates/secret.yaml b/charts/postgrest/templates/secret.yaml index f0fddb8..af89eaf 100644 --- a/charts/postgrest/templates/secret.yaml +++ b/charts/postgrest/templates/secret.yaml @@ -5,9 +5,9 @@ metadata: namespace: {{ $.Release.Namespace }} stringData: db-uri.txt: |- - {{- required "Missing postgrest.dbUri" .Values.postgrest.dbUri | nindent 4 }} + {{- required "Missing required value postgrest.dbUri" .Values.postgrest.dbUri | nindent 4 }} jwt-secret.txt: |- - {{- required "postgrest.jwtSecret" .Values.postgrest.jwtSecret | nindent 4 }} + {{- required "Missing required value postgrest.jwtSecret" .Values.postgrest.jwtSecret | nindent 4 }} {{- if .Values.secret }} {{- toYaml .Values.secret | nindent 2 }} {{- end }} diff --git a/charts/postgrest/values.yaml b/charts/postgrest/values.yaml index abe318c..4260394 100644 --- a/charts/postgrest/values.yaml +++ b/charts/postgrest/values.yaml @@ -41,6 +41,7 @@ command: [] args: [] postgrest: + # -- The dbUri for connecting to the database. Required dbUri: "" dbSchema: "" dbAnonRole: "" @@ -52,6 +53,7 @@ postgrest: serverHost: "" serverPort: "9000" openApiServerProxyUri: "" + # -- The JWT Secret used for constructing JWTs. Required jwtSecret: "" secretIsBase64: "" jwtAud: ""