diff --git a/stable/redmine/Chart.yaml b/stable/redmine/Chart.yaml index 8497efa142..25699063c4 100644 --- a/stable/redmine/Chart.yaml +++ b/stable/redmine/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: redmine -version: 13.7.0 +version: 13.8.0 appVersion: 4.0.5 description: A flexible project management web application. keywords: diff --git a/stable/redmine/README.md b/stable/redmine/README.md index da47c0ee62..97f441200b 100644 --- a/stable/redmine/README.md +++ b/stable/redmine/README.md @@ -100,8 +100,10 @@ The following table lists the configurable parameters of the Redmine chart and t | `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | | `service.loadBalancerIP` | LoadBalancer service IP address | `""` | | `service.loadBalancerSourceRanges` | An array of load balancer sources | `0.0.0.0/0` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the redmine.fullname template | | `ingress.enabled` | Enable or disable the ingress | `false` | -| `ingress.hosts[0].name` | Hostname to your Redmine installation | `redmine.local ` | +| `ingress.hosts[0].name` | Hostname to your Redmine installation | `redmine.local` | | `ingress.hosts[0].path` | Path within the url structure | `/` | | `ingress.hosts[0].tls` | Utilize TLS backend in ingress | `false` | | `ingress.hosts[0].certManager` | Add annotations for cert-manager | `false` | diff --git a/stable/redmine/templates/_helpers.tpl b/stable/redmine/templates/_helpers.tpl index 7252ebcc33..8277ce4a42 100644 --- a/stable/redmine/templates/_helpers.tpl +++ b/stable/redmine/templates/_helpers.tpl @@ -144,6 +144,17 @@ Return the appropriate apiVersion for deployment. {{- end -}} {{- end -}} +{{/* +Create the name of the service account to use +*/}} +{{- define "redmine.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} +{{ default (include "redmine.fullname" .) .Values.serviceAccount.name }} +{{- else -}} +{{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + {{/* Return the name of the Secret used to store the passwords */}} diff --git a/stable/redmine/templates/deployment.yaml b/stable/redmine/templates/deployment.yaml index fe397fde39..1d1532af8d 100644 --- a/stable/redmine/templates/deployment.yaml +++ b/stable/redmine/templates/deployment.yaml @@ -164,6 +164,7 @@ spec: {{- else }} emptyDir: {} {{- end }} + serviceAccountName: {{ template "redmine.serviceAccountName" . }} {{- with .Values.securityContext }} securityContext: {{ toYaml . | indent 8 }} diff --git a/stable/redmine/templates/serviceaccount.yaml b/stable/redmine/templates/serviceaccount.yaml new file mode 100644 index 0000000000..f2e5be2657 --- /dev/null +++ b/stable/redmine/templates/serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "redmine.serviceAccountName" . }} + labels: + app: {{ template "redmine.fullname" . }} + chart: {{ template "redmine.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/stable/redmine/values.yaml b/stable/redmine/values.yaml index 0f9870e235..28659b37f1 100644 --- a/stable/redmine/values.yaml +++ b/stable/redmine/values.yaml @@ -302,6 +302,16 @@ resources: {} # cpu: "2" # memory: "1G" +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: true + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the redmine.fullname template + # name: + ## Pod Security Context ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ ##