Skip to content

Commit ca7049c

Browse files
authored
Merge pull request #16 from small-hack/disable-liveness-readiness-by-default
make liveness and readiness probes optional and further configurable
2 parents 5e06b04 + a606462 commit ca7049c

File tree

5 files changed

+37
-28
lines changed

5 files changed

+37
-28
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ This chart is still in a testing phase and may not be fully stable yet.
88
## Features
99

1010
- includes bitnami subcharts for [valkey](https://github.com/bitnami/charts/blob/main/bitnami/valkey/README.md#parameters) (redis) and [postgresql](https://github.com/bitnami/charts/blob/main/bitnami/postgresql/README.md#parameters) (database)
11+
- but you can also bring your own valkey, redis, or postgresql database
1112
- helm parameter docs autogenerated via helm-docs
1213
- use existing Secrets for valkey, postgresql, and smtp
1314
- RenovateBot keeps the subcharts and docker image up to date
15+
- configurable liveness and readiness probes
1416

1517
## TLDR
1618

charts/pixelfed/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.4.2
18+
version: 0.5.0
1919

2020
# This is the version number of the application being deployed.
2121
# renovate:image=ghcr.io/mattlqx/docker-pixelfed

charts/pixelfed/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pixelfed
22

3-
![Version: 0.4.2](https://img.shields.io/badge/Version-0.4.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square)
3+
![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square)
44

55
A Helm chart for deploying Pixelfed on Kubernetes
66

@@ -55,14 +55,13 @@ A Helm chart for deploying Pixelfed on Kubernetes
5555
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
5656
| imagePullSecrets | list | `[]` | This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
5757
| ingress.annotations | object | `{}` | |
58-
| ingress.className | string | `""` | |
59-
| ingress.enabled | bool | `false` | |
58+
| ingress.className | string | `""` | ingress class name, e.g. nginx |
59+
| ingress.enabled | bool | `false` | enable deploy an Ingress resource - network traffic from outside the cluster |
6060
| ingress.hosts[0].host | string | `"chart-example.local"` | |
6161
| ingress.hosts[0].paths[0].path | string | `"/"` | |
6262
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
6363
| ingress.tls | list | `[]` | |
64-
| livenessProbe.httpGet.path | string | `"/api/service/health-check"` | |
65-
| livenessProbe.httpGet.port | string | `"http"` | |
64+
| livenessProbe | object | `{}` | This is to setup the liveness probe more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
6665
| nameOverride | string | `""` | This is to override the chart name. |
6766
| nodeSelector | object | `{}` | |
6867
| pixelfed.account_deletion | bool | `true` | Enable account deletion (may be a requirement in some jurisdictions) |
@@ -157,10 +156,9 @@ A Helm chart for deploying Pixelfed on Kubernetes
157156
| postgresql.enabled | bool | `true` | enable the bundled [postgresql sub chart from Bitnami](https://github.com/bitnami/charts/blob/main/bitnami/postgresql/README.md#parameters). Must set to true if externalDatabase.enabled=false |
158157
| postgresql.fullnameOverride | string | `"postgresql"` | |
159158
| postgresql.global.storageClass | string | `""` | |
160-
| readinessProbe.httpGet.path | string | `"/api/service/health-check"` | |
161-
| readinessProbe.httpGet.port | string | `"http"` | |
159+
| readinessProbe | object | `{}` | This is to setup the readiness probe more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
162160
| replicaCount | int | `1` | This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ |
163-
| resources | object | `{}` | |
161+
| resources | object | `{}` | set resource limits and requests for cpu, memory, and ephemeral storage |
164162
| securityContext | object | `{}` | |
165163
| service.port | int | `80` | This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports |
166164
| service.targetPort | int | `80` | Port to attach to on the pods. Also sets what port nginx listens on inside the container. |

charts/pixelfed/templates/deployment.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,14 @@ spec:
335335
- name: DB_APPLY_NEW_MIGRATIONS_AUTOMATICALLY
336336
value: "{{ .Values.pixelfed.db_apply_new_migrations_automatically }}"
337337

338+
{{- with .Values.livenessProbe }}
338339
livenessProbe:
339-
{{- toYaml .Values.livenessProbe | nindent 12 }}
340+
{{- toYaml . | nindent 12 }}
341+
{{- end }}
342+
{{- with .Values.readinessProbe }}
340343
readinessProbe:
341-
{{- toYaml .Values.readinessProbe | nindent 12 }}
344+
{{- toYaml . | nindent 12 }}
345+
{{- end }}
342346
resources:
343347
{{- toYaml .Values.resources | nindent 12 }}
344348
{{- with .Values.volumeMounts }}

charts/pixelfed/values.yaml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,14 @@ service:
5959
# -- Port to attach to on the pods. Also sets what port nginx listens on inside the container.
6060
targetPort: 80
6161

62-
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
62+
# This block is for setting up the ingress for more information can be found here:
63+
# https://kubernetes.io/docs/concepts/services-networking/ingress/
6364
ingress:
65+
# -- enable deploy an Ingress resource - network traffic from outside the cluster
6466
enabled: false
67+
# -- ingress class name, e.g. nginx
6568
className: ""
69+
# annotations to apply to the Ingress resource
6670
annotations: {}
6771
hosts:
6872
- host: chart-example.local
@@ -74,30 +78,31 @@ ingress:
7478
# hosts:
7579
# - chart-example.local
7680

81+
# -- set resource limits and requests for cpu, memory, and ephemeral storage
7782
resources: {}
78-
# We usually recommend not to specify default resources and to leave this as a conscious
79-
# choice for the user. This also increases chances charts run on environments with little
80-
# resources, such as Minikube. If you do want to specify resources, uncomment the following
81-
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
8283
# limits:
8384
# cpu: 100m
8485
# memory: 128Mi
8586
# requests:
8687
# cpu: 100m
8788
# memory: 128Mi
8889

89-
# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
90-
livenessProbe:
91-
httpGet:
92-
path: /api/service/health-check
93-
port: http
94-
95-
readinessProbe:
96-
httpGet:
97-
path: /api/service/health-check
98-
port: http
99-
100-
# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/
90+
# -- This is to setup the liveness probe
91+
# more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
92+
livenessProbe: {}
93+
# httpGet:
94+
# path: /api/service/health-check
95+
# port: http
96+
97+
# -- This is to setup the readiness probe
98+
# more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
99+
readinessProbe: {}
100+
# httpGet:
101+
# path: /api/service/health-check
102+
# port: http
103+
104+
# This section is for setting up autoscaling
105+
# more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/
101106
autoscaling:
102107
enabled: false
103108
minReplicas: 1

0 commit comments

Comments
 (0)