Skip to content

Commit

Permalink
feat: Adds support for initContainers in deployments (#139)
Browse files Browse the repository at this point in the history
Co-authored-by: German Espinoza <[email protected]>
  • Loading branch information
gespinozat and German Espinoza authored Aug 19, 2024
1 parent 6b6dbcd commit 5ba4164
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ Once you have completed the above steps you can complete the file values.yaml to
| openldap.image | Yes | LDAP deployment image repository |
| openldap.version | Yes | LDAP deployment image tag |
| openldap.imagePullSecrets | No | Secret used to pull images from private repository |
| openldap.initContainers | No | Init containers for LDAP deployment |
| openldap.podLabels | No | Pod labels for LDAP deployment |
| openldap.securityContext | No | Security context for LDAP deployment |
| openldap.containerSecurityContext | No | Container security context for LDAP deployment |
Expand Down Expand Up @@ -284,6 +285,7 @@ Once you have completed the above steps you can complete the file values.yaml to
| api.securityContext | No | Fill securityContext field |
| api.containerSecurityContext | No | Fill securityContext field in the container spec |
| api.imagePullSecrets | No | Specific Secret used to pull images from private repository |
| api.initContainers | No | Init containers for API deployment |
| executor.enabled | Yes | true/false |
| executor.image | No | Executor image repository |
| executor.version | Yes | Terrakube Executor version |
Expand All @@ -298,6 +300,7 @@ Once you have completed the above steps you can complete the file values.yaml to
| executor.securityContext | No | Fill securityContext field |
| executor.containerSecurityContext | No | Fill securityContext field in the container spec |
| executor.imagePullSecrets | No | Specific Secret used to pull images from private repository |
| executor.initContainers | No | Init containers for executor deployment |
| registry.enabled | Yes | |
| registry.image | No | Registry image repository |
| registry.version | Yes | |
Expand All @@ -310,6 +313,7 @@ Once you have completed the above steps you can complete the file values.yaml to
| registry.securityContext | No | Fill securityContext field |
| registry.containerSecurityContext | No | Fill securityContext field in the container spec |
| registry.imagePullSecrets | No | Specific Secret used to pull images from private repository |
| registry.initContainers | No | Init containers for registry deployment |
| ui.enabled | Yes | true/false |
| ui.image | No | UI image repository |
| ui.version | Yes | |
Expand All @@ -319,6 +323,7 @@ Once you have completed the above steps you can complete the file values.yaml to
| ui.securityContext | No | Fill securityContext field |
| ui.containerSecurityContext | No | Fill securityContext field in the container spec |
| ui.imagePullSecrets | No | Specific Secret used to pull images from private repository |
| ui.initContainers | No | Init containers for UI deployment |
| ingress.ui.ingressClassName | Yes | Default is set to nginx |
| ingress.ui.useTls | Yes | true/false |
| ingress.ui.enabled | Yes | true/false |
Expand Down
2 changes: 1 addition & 1 deletion charts/terrakube/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.19.0
version: 3.20.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.api.initContainers }}
initContainers:
{{- toYaml . | nindent 6 }}
{{- end }}
containers:
- name: terrakube-api
image: {{ .Values.api.image }}:{{ default .Chart.AppVersion .Values.api.version }}
Expand Down
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.executor.initContainers }}
initContainers:
{{- toYaml . | nindent 6 }}
{{- end }}
containers:
- name: terrakube-executor
image: {{ .Values.executor.image }}:{{ default .Chart.AppVersion .Values.executor.version }}
Expand Down
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-openldap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.openldap.initContainers }}
initContainers:
{{- toYaml . | nindent 6 }}
{{- end }}
containers:
- name: terrakube-openldap
image: {{ .Values.openldap.image }}:{{ .Values.openldap.version }}
Expand Down
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.registry.initContainers }}
initContainers:
{{- toYaml . | nindent 6 }}
{{- end }}
containers:
- name: terrakube-registry
image: {{ .Values.registry.image }}:{{ default .Chart.AppVersion .Values.registry.version }}
Expand Down
4 changes: 4 additions & 0 deletions charts/terrakube/templates/deployment-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ui.initContainers }}
initContainers:
{{- toYaml . | nindent 6 }}
{{- end }}
containers:
- name: terrakube-ui
image: {{ .Values.ui.image }}:{{ default .Chart.AppVersion .Values.ui.version }}
Expand Down
6 changes: 6 additions & 0 deletions charts/terrakube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ openldap:
image: "bitnami/openldap"
version: "2.6.4-debian-11-r4"
imagePullSecrets: []
initContainers: []
podLabels: {}
securityContext: {}
containerSecurityContext: {}
Expand Down Expand Up @@ -192,6 +193,7 @@ api:
securityContext: {}
containerSecurityContext: {}
imagePullSecrets: []
initContainers: []
cache:
moduleCacheMaxTotal: "128"
moduleCacheMaxIdle: "128"
Expand Down Expand Up @@ -236,6 +238,8 @@ executor:
securityContext: {}
containerSecurityContext: {}
imagePullSecrets: []
initContainers: []

## Registry properties
registry:
enabled: true
Expand All @@ -252,6 +256,7 @@ registry:
securityContext: {}
containerSecurityContext: {}
imagePullSecrets: []
initContainers: []

## UI Properties
ui:
Expand All @@ -267,6 +272,7 @@ ui:
securityContext: {}
containerSecurityContext: {}
imagePullSecrets: []
initContainers: []

## Ingress properties
ingress:
Expand Down

0 comments on commit 5ba4164

Please sign in to comment.