Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to configure init containers in helm chart #712

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
* fix `delimiter` typo in `StringSplitterRule` configuration

### Features

* configuration of `initContainers` in logprep helm chart is now possible

### Improvements

* fix `requester` documentation
Expand Down
2 changes: 1 addition & 1 deletion charts/logprep/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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: "14.0.1"
version: "14.1.1"
ekneg54 marked this conversation as resolved.
Show resolved Hide resolved

# 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/logprep/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
{{- if .Values.secrets.imagePullSecret }}
- name: {{ .Values.secrets.imagePullSecret.name }}
{{- end }}
{{- if .Values.initContainers }}
initContainers:
{{- toYaml .Values.initContainers | nindent 8 }}
{{- end }}
containers:
- name: logprep
{{- if .Values.containerSecurityContext.enabled }}
Expand Down
12 changes: 12 additions & 0 deletions tests/unit/charts/test_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ def test_add_security_context(self):
security_context = self.deployment["spec.template.spec.containers.0.securityContext"]
assert security_context["allowPriviledgeEscalation"] == "false"

def test_init_containers(self):
self.manifests = self.render_chart(
"logprep",
{
"initContainers": {"name": "test-init"},
},
)

assert self.deployment["spec.template.spec.initContainers"]
init_container = self.deployment["spec.template.spec.initContainers"]
assert init_container["name"] == "test-init"

def test_resources(self):
assert self.deployment["spec.template.spec.containers.0.resources"]
resources = self.deployment["spec.template.spec.containers.0.resources"]
Expand Down
Loading