jaegertracing / helm-charts

Helm Charts for Jaeger backend
Apache License 2.0
269 stars 347 forks source link

[Feature]: Add initContainers for query-deploy.yaml #512

Closed vscoder-ht closed 10 months ago

vscoder-ht commented 1 year ago

Requirement

We use clickhouse as storage backend for traces. But thos possibility is available only for jaeger-operator CR kind: Jaeger https://github.com/jaegertracing/jaeger-clickhouse/blob/main/guide-kubernetes.md We need to deploy jaeger-query standalone without other components, but it is impossible in jaeger-operator.

Problem

jaeger helm chart allows to deploy jaeger-query standalone.

I trying to configure jaeger-clickhouse plugin for jaeger-query. I can add

query:
  cmdlineParams:
    - '--grpc-storage-plugin.binary=/plugin/jaeger-clickhouse'
    - >-
      --grpc-storage-plugin.configuration-file=/plugin-config/config.yaml
    - '--grpc-storage-plugin.log-level=debug'
  extraSecretMounts:
    - name: plugin-config
      mountPath: /plugin-config
      readOnly: true
      secretName: jaeger-clickhouse-secret

I need to add initContainer to jaeger-query deployment like this:

      initContainers:
        - name: install-plugin
          image: ghcr.io/jaegertracing/jaeger-clickhouse:0.13.0
          resources: {}
          volumeMounts:
            - name: plugin-config
              readOnly: true
              mountPath: /plugin-config
            - name: jaeger-clickhouse-jaeger-ui-configuration-volume
              readOnly: true
              mountPath: /etc/config
            - name: plugin-volume
              mountPath: /plugin
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: IfNotPresent

But I can't to add initContainer to jaeger-query because there isn't such block in query-deploy.yaml

Proposal

Plssibility to add init containers to jaeger-query.

Open questions

Could you please add block to query-deploy.yaml like in collector-deploy.yaml?

    spec:
      ...
      {{- if .Values.query.initContainers }}
      initContainers:
        {{- toYaml .Values.query.initContainers | nindent 8 }}
      {{- end}}