Skip to content

Commit

Permalink
feat(vector): Add support for user defined initContainers for Vector …
Browse files Browse the repository at this point in the history
…Pods (#79)

* feat(vector): Add support for user defined initContainers for Vector Pods

Signed-off-by: Spencer Gilbert <[email protected]>

* helm lint

Signed-off-by: Spencer Gilbert <[email protected]>

* update initcontainer ci

Signed-off-by: Spencer Gilbert <[email protected]>

* Rename initContainer in CI

Signed-off-by: Spencer Gilbert <[email protected]>
  • Loading branch information
spencergilbert authored Oct 4, 2021
1 parent 0390a17 commit 44a2e5e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ helm install --name <RELEASE_NAME> \
| ingress.enabled | bool | `false` | If true, create and use an Ingress resource |
| ingress.hosts | list | `[]` | Configure the hosts and paths for the Ingress |
| ingress.tls | list | `[]` | Configure TLS for the Ingress |
| initContainers | list | `[]` | Init Containers to be added to the Vector Pod |
| livenessProbe | object | `{}` | Override default liveness probe settings, if customConfig is used requires customConfig.api.enabled true |
| nameOverride | string | `""` | Override name of app |
| nodeSelector | object | `{}` | Allow Vector to be scheduled on selected nodes |
Expand Down
14 changes: 14 additions & 0 deletions charts/vector/ci/initContainers-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Including initContainers
## Values file for testing adding initContainers to Vector Pods.
initContainers:
- name: sleep
image: busybox
command: ['sh', '-c', "sleep 5"]
- name: touch
image: busybox
command:
- touch
- "/vector-data-dir/test"
volumeMounts:
- name: data
mountPath: "/vector-data-dir"
4 changes: 4 additions & 0 deletions charts/vector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ dnsConfig:
imagePullSecrets:
{{ toYaml . | indent 2 }}
{{- end }}
{{- with .Values.initContainers }}
initContainers:
{{ toYaml . | indent 2 }}
{{- end }}
containers:
- name: vector
{{- with .Values.securityContext }}
Expand Down
3 changes: 3 additions & 0 deletions charts/vector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ extraVolumes: []
# extraVolumeMounts -- Additional Volume to mount into Vector Containers
extraVolumeMounts: []

# initContainers -- Init Containers to be added to the Vector Pod
initContainers: []

## Configuration for Vector's data persistence
persistence:
# persistence.enabled -- If true, create and use PersistentVolumeClaims
Expand Down

0 comments on commit 44a2e5e

Please sign in to comment.