Skip to content

Commit

Permalink
feat(initContainers): introduce init containers to pods
Browse files Browse the repository at this point in the history
  • Loading branch information
mipieta committed Aug 1, 2024
1 parent 104e22a commit c41123b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions java/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
description: Java Helm Chart
name: java
version: 10.0.1
version: 10.1.0
dependencies:
- name: libchart
version: 4.0.1
version: 4.1.0
repository: file://../libchart
5 changes: 5 additions & 0 deletions java/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ image:
# - secret1
# - secret2

initContainers:
- name: network-proxy
image: network-proxy:1.0
restartPolicy: Always

nameOverride: ""
fullnameOverride: ""

Expand Down
2 changes: 1 addition & 1 deletion libchart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: library
# 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: 4.0.1
version: 4.1.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
6 changes: 6 additions & 0 deletions libchart/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ imagePullSecrets:
serviceAccountName: {{ include "libchart.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 2 }}

{{- if .Values.initContainers }}
initContainers:
{{ toYaml .Values.initContainers | nindent 2 }}
{{- end }}

containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
5 changes: 5 additions & 0 deletions libchart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ image:
# - secret1
# - secret2

initContainers:
- name: network-proxy
image: network-proxy:1.0
restartPolicy: Always

nameOverride: ""
fullnameOverride: ""

Expand Down

0 comments on commit c41123b

Please sign in to comment.