diff --git a/charts/postgrest/Chart.yaml b/charts/postgrest/Chart.yaml index 6d88e85..997cbb8 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.3 +version: 0.3.4 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 a708db5..d632e90 100644 --- a/charts/postgrest/NEWS.md +++ b/charts/postgrest/NEWS.md @@ -1,3 +1,10 @@ +# 0.3.4 + +- Add configuration for the `pod.adminPort` and `service.adminPort` + - `pod.adminPort` controls the PostgREST config and deployment + - `serivce.adminPort` controls the exposure of the health check to the service definition +- Update the `readinessProbe` to use the admin health-check + # 0.3.3 - Bump PostgREST version to v11.1.0 diff --git a/charts/postgrest/README.md b/charts/postgrest/README.md index 30e27e8..73db34e 100644 --- a/charts/postgrest/README.md +++ b/charts/postgrest/README.md @@ -1,14 +1,14 @@ # postgrest -![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-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.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) ## Installing the Chart -To install the chart with the release name `my-release` at version 0.3.3: +To install the chart with the release name `my-release` at version 0.3.4: ```bash helm repo add colearendt https://colearendt.github.io/helm -helm install my-release colearendt/postgrest --version=0.3.3 +helm install my-release colearendt/postgrest --version=0.3.4 ``` #### _A Helm chart for deploying Postgrest to Kubernetes_ @@ -40,14 +40,12 @@ helm install my-release colearendt/postgrest --version=0.3.3 | initContainers | object | `{}` | | | nameOverride | string | `""` | | | nodeSelector | object | `{}` | | +| pod.adminPort | int | `9001` | The admin server port for PostgREST. Automatically sets the adminServerPort configuration value. | | pod.annotations | object | `{}` | | | pod.containerPort | int | `9000` | | | pod.env | list | `[]` | | | pod.livenessProbe | object | `{}` | | -| pod.readinessProbe.httpGet.path | string | `"/"` | | -| pod.readinessProbe.httpGet.port | string | `"http"` | | -| pod.readinessProbe.initialDelaySeconds | int | `5` | | -| pod.readinessProbe.periodSeconds | int | `5` | | +| pod.readinessProbe | object | `{"httpGet":{"path":"/ready","port":"http-admin"},"initialDelaySeconds":5,"periodSeconds":5}` | The readiness probe for PostgREST. Can also use requests to /live per https://postgrest.org/en/stable/references/admin.html#health-check | | pod.securityContext | object | `{}` | | | pod.startupProbe | object | `{}` | | | pod.volumeMounts | list | `[]` | | @@ -75,6 +73,7 @@ helm install my-release colearendt/postgrest --version=0.3.3 | resources | object | `{}` | | | secret | object | `{}` | | | securityContext | object | `{}` | | +| service.adminPort | int | `9001` | | | service.port | int | `80` | | | service.type | string | `"ClusterIP"` | | | serviceAccount.annotations | object | `{}` | | diff --git a/charts/postgrest/templates/deployment.yaml b/charts/postgrest/templates/deployment.yaml index ebbe957..cec7531 100644 --- a/charts/postgrest/templates/deployment.yaml +++ b/charts/postgrest/templates/deployment.yaml @@ -128,6 +128,10 @@ spec: - name: PGRST_RAW_MEDIA_TYPES value: {{ .Values.postgrest.rawMediaTypes }} {{- end }} + {{- if .Values.pod.adminPort }} + - name: PGRST_ADMIN_SERVER_PORT + value: {{ .Values.pod.adminPort | quote }} + {{- end }} {{- if .Values.pod.env }} {{- toYaml .Values.pod.env | nindent 12 }} {{- end }} @@ -135,6 +139,11 @@ spec: - name: http containerPort: {{ .Values.pod.containerPort }} protocol: TCP + {{- if .Values.pod.adminPort }} + - name: http-admin + containerPort: {{ .Values.pod.adminPort }} + protocol: TCP + {{- end }} {{- with .Values.pod.readinessProbe }} readinessProbe: {{- toYaml . | nindent 12 }} diff --git a/charts/postgrest/templates/service.yaml b/charts/postgrest/templates/service.yaml index 2fe03d9..8de30ff 100644 --- a/charts/postgrest/templates/service.yaml +++ b/charts/postgrest/templates/service.yaml @@ -11,5 +11,11 @@ spec: targetPort: http protocol: TCP name: http + {{- if .Values.service.adminPort }} + - port: {{ .Values.service.adminPort }} + targetPort: http-admin + protocol: TCP + name: http-admin + {{- end }} selector: {{- include "postgrest.selectorLabels" . | nindent 4 }} diff --git a/charts/postgrest/values.yaml b/charts/postgrest/values.yaml index 42e2d44..abe318c 100644 --- a/charts/postgrest/values.yaml +++ b/charts/postgrest/values.yaml @@ -60,6 +60,7 @@ postgrest: preRequest: "" rootSpec: "" rawMediaTypes: "" + # NOTE: adminServerPort is set via pod.adminPort and service.adminPort secret: {} @@ -74,11 +75,14 @@ securityContext: {} pod: annotations: {} containerPort: 9000 + # -- The admin server port for PostgREST. Automatically sets the adminServerPort configuration value. + adminPort: 9001 env: [] + # -- The readiness probe for PostgREST. Can also use requests to /live per https://postgrest.org/en/stable/references/admin.html#health-check readinessProbe: httpGet: - path: / - port: http + path: /ready + port: http-admin initialDelaySeconds: 5 periodSeconds: 5 livenessProbe: {} @@ -90,6 +94,7 @@ pod: service: type: ClusterIP port: 80 + adminPort: 9001 ingress: enabled: false