Skip to content

Commit

Permalink
fix(hedgedoc): PV not getting attached to new Pod during deployments (#…
Browse files Browse the repository at this point in the history
…1269)

* fix(hedgedoc): PV not getting attached to new Pod during deployments

Previously, rolling deployments would stall because the new Pod
attempted to attach to the PersistentVolume still in use by the old Pod.
With this change, the old Pod is terminated before the new Pod starts,
ensuring the PV is available immediately.

* fix(hedgedoc): Wrong app version in Chart.yaml annotations

* chore(hedgedoc): update README.md
  • Loading branch information
samuelb authored Jun 11, 2024
1 parent 721b649 commit bde22e6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
6 changes: 3 additions & 3 deletions charts/hedgedoc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: hedgedoc
description: Chart for HedgeDoc, a fork of CodiMD
type: application
version: 0.4.0
version: 0.5.0
appVersion: "1.9.9"
icon: https://raw.githubusercontent.com/hedgedoc/hedgedoc-logo/main/LOGOTYPE/PNG/HedgeDoc-Logo%201.png
sources:
Expand All @@ -20,7 +20,7 @@ dependencies:
annotations:
artifacthub.io/images: |
- name: hedgedoc
image: quay.io/hedgedoc/hedgedoc:1.9.8
image: quay.io/hedgedoc/hedgedoc:1.9.9
artifacthub.io/changes: |
- kind: added
description: Allow creating a ServiceMonitor resource
description: Fix deployment stalls by ensuring PV availability before starting new Pod.
3 changes: 2 additions & 1 deletion charts/hedgedoc/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions charts/hedgedoc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
{{- with .Values.strategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- include "hedgedoc.selectorLabels" . | nindent 6 }}
Expand Down
26 changes: 18 additions & 8 deletions charts/hedgedoc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,26 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# Please note that HedgeDoc is not cappable to run in a HA setup with multiple
# replicas - See https://docs.hedgedoc.org/faq/#can-i-run-multiple-instances-on-the-same-database
replicaCount: 1

# -- Configure autoscaling
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

# -- Configure the deployment strategy
strategy:
type: Recreate
# type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

image:
# -- Override the repository
repository: quay.io/hedgedoc/hedgedoc
Expand Down Expand Up @@ -217,14 +235,6 @@ resources: {}
# cpu: 100m
# memory: 128Mi

# -- Configure autoscaling
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []
Expand Down

0 comments on commit bde22e6

Please sign in to comment.