Skip to content

Commit

Permalink
Merge pull request #18 from colearendt/more-postgrest
Browse files Browse the repository at this point in the history
more postgrest updates
  • Loading branch information
colearendt authored Sep 4, 2021
2 parents 077fcf7 + cade8f5 commit 7e9fcd8
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/postgrest/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: postgrest
description: A Helm chart for deploying Postgrest to Kubernetes
type: application
version: 0.1.1
version: 0.2.0
appVersion: v8.0.0
icon: https://avatars.githubusercontent.com/u/15115011?s=200&v=4
maintainers:
Expand Down
7 changes: 7 additions & 0 deletions charts/postgrest/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.2.0

- BREAKING: move `podAnnotations` and `podSecurityContext` to `pod.annotations` and `pod.securityContext`
- Add `strategy`, `initContainer`, `command`, and `args` values
- Make replicas automatically restart when secret changes
- Add liveness and readiness probes

# 0.1.1

- Make readiness probe configurable
Expand Down
6 changes: 5 additions & 1 deletion charts/postgrest/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# postgrest

![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v8.0.0](https://img.shields.io/badge/AppVersion-v8.0.0-informational?style=flat-square)
![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v8.0.0](https://img.shields.io/badge/AppVersion-v8.0.0-informational?style=flat-square)

A Helm chart for deploying Postgrest to Kubernetes

Expand Down Expand Up @@ -33,8 +33,12 @@ A Helm chart for deploying Postgrest to Kubernetes
| nodeSelector | 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.startupProbe | object | `{}` | |
| pod.volumeMounts | list | `[]` | |
| pod.volumes | list | `[]` | |
| podAnnotations | object | `{}` | |
Expand Down
28 changes: 24 additions & 4 deletions charts/postgrest/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
{{- with .Values.strategy }}
{{- toYaml . | nindent 2 }}
{{- end }}
selector:
matchLabels:
{{- include "postgrest.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- with .Values.pod.annotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "postgrest.selectorLabels" . | nindent 8 }}
spec:
Expand All @@ -26,14 +30,26 @@ spec:
{{- end }}
serviceAccountName: {{ include "postgrest.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- toYaml .Values.pod.securityContext | nindent 8 }}
{{- if .Values.initContainers }}
initContainers:
{{ toYaml .Values.initContainers | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- $defaultVersion := .Values.versionOverride | default $.Chart.AppVersion }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default $defaultVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.command }}
command:
{{- toYaml .Values.command | nindent 12 }}
{{- end }}
{{- if .Values.args }}
args:
{{- toYaml .Values.args | nindent 12 }}
{{- end }}
env:
{{- if .Values.postgrest.dbUri }}
- name: PGRST_DB_URI
Expand Down Expand Up @@ -120,6 +136,10 @@ spec:
protocol: TCP
readinessProbe:
{{- toYaml .Values.pod.readinessProbe | nindent 12 }}
livenessProbe:
{{- toYaml .Values.pod.livenessProbe | nindent 12 }}
startupProbe:
{{- toYaml .Values.pod.startupProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
Expand Down
19 changes: 16 additions & 3 deletions charts/postgrest/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ image:
tag: ""

imagePullSecrets: []

nameOverride: ""
fullnameOverride: ""

Expand All @@ -25,10 +26,16 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

podAnnotations: {}
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: "25%"
maxSurge: "25%"

initContainers: {}

podSecurityContext: {}
# fsGroup: 2000
command: []
args: []

postgrest:
dbUri: ""
Expand Down Expand Up @@ -62,14 +69,20 @@ securityContext: {}
# runAsUser: 1000

pod:
annotations: {}
containerPort: 9000
env: []
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 5
livenessProbe: {}
startupProbe: {}
volumes: []
volumeMounts: []
securityContext: {}

service:
type: ClusterIP
Expand Down

0 comments on commit 7e9fcd8

Please sign in to comment.