Skip to content

Commit

Permalink
Add init containers for deployment and statefuls.
Browse files Browse the repository at this point in the history
  • Loading branch information
MemberIT committed Dec 18, 2023
1 parent 4b81ea8 commit 8e743c7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/victoria-metrics-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ Change the values according to the need of the environment in ``victoria-metrics
| ingress.hosts | list | `[]` | |
| ingress.pathType | string | `"Prefix"` | pathType is only for k8s >= 1.1= |
| ingress.tls | list | `[]` | |
| initContainers | list | `[]` | |
| license | object | `{"key":"","secret":{"key":"","name":""}}` | Enterprise license key configuration for VictoriaMetrics enterprise. Required only for VictoriaMetrics enterprise. Documentation - https://docs.victoriametrics.com/enterprise.html, for more information, visit https://victoriametrics.com/products/enterprise/ . To request a trial license, go to https://victoriametrics.com/products/enterprise/trial/ Supported starting from VictoriaMetrics v1.94.0 |
| license.key | string | `""` | License key |
| license.secret | object | `{"key":"","name":""}` | Use existing secret with license key |
Expand Down
4 changes: 4 additions & 0 deletions charts/victoria-metrics-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ spec:
serviceAccountName: {{ include "chart.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions charts/victoria-metrics-agent/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ spec:
serviceAccountName: {{ include "chart.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
5 changes: 5 additions & 0 deletions charts/victoria-metrics-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ extraContainers: []
# - name: config-reloader
# image: reloader-image

initContainers:
{}
# - name: example
# image: example-image

podSecurityContext:
{}
# fsGroup: 2000
Expand Down

0 comments on commit 8e743c7

Please sign in to comment.