Skip to content

Commit

Permalink
feat: add initContainers (eclipse-tractusx#142)
Browse files Browse the repository at this point in the history
* feat: add initContainers

* chore: add initContainer description

* fix: only template initContainer if present

* chore: use tpl instead common to render initContianers

As from pmoscode suggested the tpl function can be used with toYaml to avoid the Bitnami common template function.

---------

Co-authored-by: Dominik Pinsel <dominik.pinsel@mercedes-benz.com>
  • Loading branch information
fty4 and DominikPinsel authored Nov 23, 2023
1 parent 8348728 commit 7317800
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/managed-identity-wallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command document
| ingress.enabled | bool | `false` | Enable ingress controller resource |
| ingress.hosts | list | `[]` | Ingress accepted hostnames |
| ingress.tls | list | `[]` | Ingress TLS configuration |
| initContainers | list | `[]` | add initContainers to the miw deployment |
| keycloak.auth.adminPassword | string | `""` | Keycloak admin password |
| keycloak.auth.adminUser | string | `"admin"` | Keycloak admin user |
| keycloak.enabled | bool | `true` | Enable to deploy Keycloak |
Expand Down
4 changes: 4 additions & 0 deletions charts/managed-identity-wallet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ spec:
serviceAccountName: {{ include "managed-identity-wallet.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.initContainers }}
initContainers:
{{- tpl (.Values.initContainers | toYaml) $ | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
3 changes: 3 additions & 0 deletions charts/managed-identity-wallet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ affinity: {}
# -- PodAnnotation configuration
podAnnotations: {}

# -- add initContainers to the miw deployment
initContainers: []

## @section Managed Identity Wallet Primary Parameters
##
miw:
Expand Down

0 comments on commit 7317800

Please sign in to comment.