Skip to content

Commit

Permalink
add initContainer config back
Browse files Browse the repository at this point in the history
  • Loading branch information
dhawal1248 committed Oct 17, 2023
1 parent c469e4b commit 80d7df9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
15 changes: 15 additions & 0 deletions charts/signoz/templates/otel-collector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ spec:
args:
- "job"
- "{{ include "schemaMigrator.fullname" . }}-{{ .Release.Revision }}"
{{- if .Values.otelCollector.initContainers.init.enabled }}
- name: {{ include "otelCollector.fullname" . }}-init
image: {{ include "otelCollector.initContainers.init.image" . }}
imagePullPolicy: {{ .Values.otelCollector.initContainers.init.image.pullPolicy }}
env:
{{- include "snippet.clickhouse-credentials" . | nindent 12 }}
{{- with .Values.otelCollector.initContainers.init.command }}
command:
- sh
- -c
- until wget --user "${CLICKHOUSE_USER}:${CLICKHOUSE_PASSWORD}" --spider -q {{ include "clickhouse.httpUrl" $ }}{{ .endpoint }}; do echo -e "{{ .waitMessage }}"; sleep {{ .delay }}; done; echo -e "{{ .doneMessage }}";
{{- end }}
resources:
{{- toYaml .Values.otelCollector.initContainers.init.resources | nindent 12 }}
{{- end }}
containers:
- name: {{ template "otelCollector.fullname" . }}
image: {{ template "otelCollector.image" . }}
Expand Down
24 changes: 23 additions & 1 deletion charts/signoz/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,28 @@ otelCollector:
# If set, this has higher precedence than the root level or global value of imagePullSecrets.
imagePullSecrets: []

initContainers:
init:
enabled: false
image:
registry: docker.io
repository: busybox
tag: 1.35
pullPolicy: IfNotPresent
command:
delay: 5
endpoint: /ping
waitMessage: "waiting for clickhouseDB"
doneMessage: "clickhouse ready, starting otel collector now"
resources: {}
# requests:
# cpu: 100m
# memory: 100Mi
# limits:
# cpu: 100m
# memory: 100Mi


Check failure on line 1186 in charts/signoz/values.yaml

View workflow job for this annotation

GitHub Actions / lint-chart

1186:1 [trailing-spaces] trailing spaces
# OpenTelemetry Collector executable
command:
# -- OtelCollector command name
Expand Down Expand Up @@ -1772,7 +1794,7 @@ otelCollectorMetrics:

initContainers:
init:
enabled: true
enabled: false
image:
registry: docker.io
repository: busybox
Expand Down

0 comments on commit 80d7df9

Please sign in to comment.