Skip to content

Commit

Permalink
improve polish
Browse files Browse the repository at this point in the history
  • Loading branch information
oleobal committed Jan 3, 2024
1 parent deadd8e commit acb1911
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions charts/substra-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## [25.0.0] - 2024-01-03

- BREAKING: Remove ServiceAccount creation from `worker.rbac.create`, putting it in a new `worker.serviceAccount.create` option
- BREAKING: Some options that would result in service account names defaulting to "default" now raise an error at rendering time. Set the name to "default" by hand to reproduce the old behavior.
- Add a new `worker.serviceAccount.name` option

## [24.0.1] - 2023-12-15
Expand Down
2 changes: 2 additions & 0 deletions charts/substra-backend/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

If you have set `worker.rbac.create=false`, you now need to also set `worker.serviceAccount.create=false` to preserve the same behavior.

If you have set any of `worker.serviceAccount.create`, `worker.events.serviceAccount.create`, or `api.events.serviceAccount.create` to `false` without explicitely telling Substra how the corresponding externally-created ServiceAccount is named (this is very unlikely), it defaulted to `default`, which you now need to set by hand through `{...}.serviceAccount.name`.

## 23.0.0

Database should be dumped and restored as the `postgresql` sub-chart version incremented. You can follow [Upgrading a PostgreSQL Cluster](https://www.postgresql.org/docs/16/upgrading.html) documentation for further detail
Expand Down
18 changes: 15 additions & 3 deletions charts/substra-backend/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ Return the user list
{{- if .Values.worker.serviceAccount.create -}}
{{ default (printf "%s-event" ( include "substra.fullname" .)) .Values.worker.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.worker.serviceAccount.name }}
{{- if .Values.worker.serviceAccount.name -}}
{{ .Values.worker.serviceAccount.name }}
{{- else -}}
{{ fail "if worker.serviceAccount.create is false, worker.serviceAccount.name must be given" }}
{{- end -}}
{{- end -}}
{{- end -}}
Expand All @@ -159,7 +163,11 @@ Return the user list
{{- if .Values.worker.events.serviceAccount.create -}}
{{ default (printf "%s-event" ( include "substra.fullname" .)) .Values.worker.events.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.worker.events.serviceAccount.name }}
{{- if .Values.worker.events.serviceAccount.name -}}
{{ .Values.worker.events.serviceAccount.name }}
{{- else -}}
{{ fail "if worker.events.serviceAccount.create is false, worker.events.serviceAccount.name must be given" }}
{{- end -}}
{{- end -}}
{{- end -}}
Expand All @@ -170,7 +178,11 @@ Return the user list
{{- if .Values.api.events.serviceAccount.create -}}
{{ default (printf "%s-event" ( include "substra.fullname" .)) .Values.api.events.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.api.events.serviceAccount.name }}
{{- if .Values.api.events.serviceAccount.name -}}
{{ .Values.api.events.serviceAccount.name }}
{{- else -}}
{{ fail "if api.events.serviceAccount.create is false, api.events.serviceAccount.name must be given" }}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down
5 changes: 2 additions & 3 deletions charts/substra-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,15 @@ worker:
## @param worker.affinity Affinity settings for pod assignment, ignored if `DataSampleStorageInServerMedia` is `true`
##
affinity: {}
## @param worker.rbac.create Create a role and service account for the worker
## @param worker.rbac.create Create a role for the worker
##
rbac:
create: true
serviceAccount:
## @param worker.serviceAccount.create Create a service account for the worker
##
create: true
## @param worker.serviceAccount.name The name of the ServiceAccount to use
## If not set and create is true, a name is generated using the substra.fullname template
## @param worker.serviceAccount.name The name of the ServiceAccount to use. If not set and create is true, a name is generated using the substra.fullname template
##
name: ""
## @param worker.persistence.storageClass Specify the _StorageClass_ used to provision the volume. Or the default _StorageClass_ will be used. Set it to `-` to disable dynamic provisioning
Expand Down

0 comments on commit acb1911

Please sign in to comment.