Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions helm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Strategy + Azure storage

### Why these errors happen (short)
- `FailedAttachVolume` / `FailedVolumeAttach`: usually occurs when the PVC is backed by ReadWriteOnce (RWO) storage and Kubernetes attempts to start a new Pod before the old Pod has fully released/detached the volume.Because the same volume can’t be attached to two Pods/nodes at once, the attach step fails and the rollout can get stuck.
- `database is locked` (SQLite): after switching the PVC `storageClass` to `azurefile-csi`, the app started hitting SQLite lock errors.

We observed these issues during rollouts on Azure when multiple Pods briefly overlapped.

### Current approach (what we use)
We use `strategy.type: Recreate` so upgrades run only one Pod at a time:
- switched back to the default storage class
- `Recreate` avoids parallel Pod overlap, which prevents volume attach conflicts and reduces the chance of SQLite locking problems
2 changes: 2 additions & 0 deletions helm/snapshots/alpha-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ metadata:
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: cacheppuccino-helm
Expand Down
5 changes: 3 additions & 2 deletions helm/snapshots/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ metadata:
app.kubernetes.io/version: "0.1.0"
app.kubernetes.io/managed-by: Helm
spec:
storageClassName: "azurefile-csi"
accessModes:
- ReadWriteMany
- ReadWriteOnce
resources:
requests:
storage: "512Mi"
Expand Down Expand Up @@ -90,6 +89,8 @@ metadata:
app.kubernetes.io/managed-by: Helm
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: cacheppuccino-helm
Expand Down
2 changes: 2 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ metadata:
{{- include "cacheppuccino.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
type: Recreate
selector:
matchLabels:
{{- include "cacheppuccino.selectorLabels" . | nindent 6 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
storageClassName: {{ .Values.sqlite.pvc.storageClassName | quote }}
{{- end }}
accessModes:
{{- toYaml .Values.sqlite.pvc.accessModes | nindent 4 }}
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.sqlite.pvc.size | quote }}
Expand Down
3 changes: 0 additions & 3 deletions helm/values/go-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ ingress:
sqlite:
pvc:
size: 512Mi
storageClassName: azurefile-csi
accessModes:
- ReadWriteMany

serviceAccount:
create: true
Expand Down
Loading