Merge branch 'master-vnext' into feature/add-network-policy

This commit is contained in:
Aleksei Sviridkin authored and GitHub committed 2025-11-08 04:15:48 +03:00 Unverified
commit 1cf3d1130c
6 files changed
+182

No files matched your search

+2
View File
@@ -19,3 +19,5 @@ annotations:
url: https://kubernetes.io/docs/concepts/services-networking/network-policies/
- kind: added
description: "Add NOTES.txt with deployment status and NetworkPolicy configuration summary"
- kind: added
description: Add revisionHistoryLimit parameter to control rollback history retention (defaults to 3 instead of Kubernetes default 10)
+11
View File
@@ -86,3 +86,14 @@ Network Policy is ENABLED:
Network Policy is DISABLED (default).
To enable network isolation, set networkPolicy.enabled=true in your values.
{{- end }}
Deployment Configuration:
Revision History Limit: {{ .Values.revisionHistoryLimit }}
{{- $limit := int .Values.revisionHistoryLimit }}
{{- if eq $limit 0 }}
⚠ WARNING: Revision history is disabled - rollback will not be possible!
{{- else if eq $limit 1 }}
⚠ NOTE: Only 1 revision kept - limited rollback capability
{{- else }}
You can rollback to any of the last {{ .Values.revisionHistoryLimit }} revisions using:
kubectl rollout undo deployment/{{ include "jellyfin.fullname" . }} --namespace {{ .Release.Namespace }}
{{- end }}
@@ -14,6 +14,9 @@ spec:
{{- toYaml . | trim | nindent 4 }}
{{- end }}
replicas: {{ .Values.replicaCount }}
{{- with .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ . }}
{{- end }}
selector:
matchLabels:
{{- include "jellyfin.selectorLabels" . | nindent 6 }}
@@ -0,0 +1,41 @@
suite: test revision history limit
templates:
- deployment.yaml
tests:
- it: should set revisionHistoryLimit to 3 by default
asserts:
- equal:
path: spec.revisionHistoryLimit
value: 3
- it: should allow custom revisionHistoryLimit
set:
revisionHistoryLimit: 5
asserts:
- equal:
path: spec.revisionHistoryLimit
value: 5
- it: should allow revisionHistoryLimit of 0
set:
revisionHistoryLimit: 0
asserts:
- equal:
path: spec.revisionHistoryLimit
value: 0
- it: should allow revisionHistoryLimit of 1
set:
revisionHistoryLimit: 1
asserts:
- equal:
path: spec.revisionHistoryLimit
value: 1
- it: should allow large revisionHistoryLimit
set:
revisionHistoryLimit: 100
asserts:
- equal:
path: spec.revisionHistoryLimit
value: 100
+6
View File
@@ -4,6 +4,12 @@
# -- Number of Jellyfin replicas to start. Should be left at 1.
replicaCount: 1
# -- Number of old ReplicaSets to retain for rollback history.
# Set to 0 to disable revision history (not recommended).
# If not specified, Kubernetes defaults to 10.
# See: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#revision-history-limit
revisionHistoryLimit: 3
# -- Image pull secrets to authenticate with private repositories.
# See: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets: []