diff --git a/stable/redmine/Chart.yaml b/stable/redmine/Chart.yaml index 0319cfa392..044568854e 100644 --- a/stable/redmine/Chart.yaml +++ b/stable/redmine/Chart.yaml @@ -1,5 +1,5 @@ name: redmine -version: 4.0.3 +version: 4.1.0 appVersion: 3.4.6 description: A flexible project management web application. keywords: diff --git a/stable/redmine/README.md b/stable/redmine/README.md index b350456351..0b6576edc4 100644 --- a/stable/redmine/README.md +++ b/stable/redmine/README.md @@ -87,6 +87,11 @@ The following table lists the configurable parameters of the Redmine chart and t | `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) | | `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` | | `persistence.size` | PVC Storage Request | `8Gi` | +| `podDisruptionBudget.enabled` | Pod Disruption Budget toggle | `false` | +| `podDisruptionBudget.minAvailable`| Minimum available pods | `nil` | +| `podDisruptionBudget.maxUnavailable`| Maximum unavailable pods | `nil` | +| `replicas` | The number of pod replicas (See [Replicas](#replicas)) | `1` | +| `resources` | Resources allocation (Requests and Limits) | `{}` | The above parameters map to the env variables defined in [bitnami/redmine](http://github.com/bitnami/bitnami-docker-redmine). For more information please refer to the [bitnami/redmine](http://github.com/bitnami/bitnami-docker-redmine) image documentation. @@ -108,6 +113,13 @@ $ helm install --name my-release -f values.yaml stable/redmine > **Tip**: You can use the default [values.yaml](values.yaml) +## Replicas + +Redmine writes uploaded files to a persistent volume. By default that volume +cannot be shared between pods (RWO). In such a configuration the `replicas` option +must be set to `1`. If the persistent volume supports more than one writer +(RWX), ie NFS, `replicas` can be greater than `1`. + ## Persistence The [Bitnami Redmine](https://github.com/bitnami/bitnami-docker-redmine) image stores the Redmine data and configurations at the `/bitnami/redmine` path of the container. diff --git a/stable/redmine/templates/deployment.yaml b/stable/redmine/templates/deployment.yaml index bb91f4abbb..96fcafbe55 100644 --- a/stable/redmine/templates/deployment.yaml +++ b/stable/redmine/templates/deployment.yaml @@ -8,7 +8,7 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" spec: - replicas: 1 + replicas: {{ .Values.replicas }} template: metadata: labels: @@ -26,6 +26,8 @@ spec: - name: {{ template "redmine.fullname" . }} image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + resources: +{{ toYaml .Values.resources | indent 10 }} env: {{- if .Values.extraVars }} {{ toYaml .Values.extraVars | indent 8 }} diff --git a/stable/redmine/templates/pdb.yaml b/stable/redmine/templates/pdb.yaml new file mode 100644 index 0000000000..f545eb4939 --- /dev/null +++ b/stable/redmine/templates/pdb.yaml @@ -0,0 +1,23 @@ +{{- if .Values.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "redmine.fullname" . }} + labels: + app: {{ template "redmine.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + {{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + app: {{ template "redmine.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/stable/redmine/values.yaml b/stable/redmine/values.yaml index 24810ab5c9..8f31ed7b5f 100644 --- a/stable/redmine/values.yaml +++ b/stable/redmine/values.yaml @@ -178,3 +178,25 @@ persistence: # storageClass: "-" accessMode: ReadWriteOnce size: 8Gi + +## Define a disruption budget +## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ +podDisruptionBudget: + enabled: false + # minAvailable: 1 + # maxUnavailable: 1 + +## Define the number of pods the deployment will create +## Do not change unless your persistent volume allows more than one writer, ie NFS +## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ +replicas: 1 + +## Redmine pods resource requests and limits +## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container +resources: {} + # requests: + # cpu: "1" + # memory: "1G" + # limits: + # cpu: "2" + # memory: "1G"