Skip to content

[Bug]: When userconfg is not specified, the service cannot start. #652

@MicroOps-cn

Description

@MicroOps-cn

What happened?

When I use the v2 branch to create a chart through Helm and check the status of the pod, I encounter this error: configmap "user config" not found.
Looking at the source code of helm charts, it was found that a judgment was made at the configmap template. If the value of userconfig is not provided, the configmap will not be created. However, this judgment logic was not performed in the deploy template.

{{ if .Values.userconfig }}
apiVersion: v1
kind: ConfigMap
metadata:
name: user-config
namespace: {{ include "jaeger.namespace" . }}
labels:
{{- include "jaeger.labels" . | nindent 4 }}
data:
user-config.yaml: |
{{- .Values.userconfig | nindent 4 }}
{{- end }}

volumeMounts:
- name: user-config
mountPath: /etc/jaeger

volumes:
- name: user-config
configMap:
name: user-config

Steps to reproduce

Commands used during deployment

git clone -b v2 https://github.com/jaegertracing/helm-charts.git
helm repo add incubator https://charts.helm.sh/incubator
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency build helm-charts/charts/jaeger
helm upgrade --install jaeger helm-charts/charts/jaeger -f  values.yaml -n tracing

values.yaml used during deployment

storage:
  type: elasticsearch
  elasticsearch:
    host: <myesserver>
    port: 443
    scheme: https
    user: elastic
    password: <myespassword>

allInOne:
  enabled: false

query:
  enabled: true
  resources:
    limits:
      cpu: 500m
      memory: 512Mi
    requests:
       cpu: 256m
       memory: 128Mi
collector:
  enabled: true
  resources:
    limits:
      cpu: 1
      memory: 512Mi
    requests:
      cpu: 500m
      memory: 512Mi
  replicaCount: 1
  autoscaling:
    enabled: false
    minReplicas: 2
    maxReplicas: 5

spark:
  enabled: true
  resources:
    limits:
      cpu: 500m
      memory: 512Mi
    requests:
      cpu: 256m
      memory: 128Mi
config:
  extensions:
    jaeger_storage:
      backends:
        primary_store:
          elasticsearch:
            index_prefix: jaeger-primary
            server_urls: ["<myesserver-url>"]
            username: elastic
            password: <myespassword>
          memory:
            max_traces: 100000
        archive_store:
          elasticsearch:
            index_prefix: jaeger-archive
            server_urls: ["<myesserver-url>"]
            username: elastic
            password: <myespassword>
          memory:
            max_traces: 100000

Expected behavior

The service is running normally

Relevant log output

kubectl describe pods  -n tracing jaeger-collector-fd7f97468-z9bq7
...
Events:
  Type     Reason       Age                 From               Message
  ----     ------       ----                ----               -------
  Normal   Scheduled    2m6s                default-scheduler  Successfully assigned tracing/jaeger-collector-fd7f97468-z9bq7 to ip-xxxx.us-east-2.compute.internal
  Warning  FailedMount  62s (x8 over 2m6s)  kubelet            MountVolume.SetUp failed for volume "user-config" : configmap "user-config" not found

Screenshot

No response

Additional context

No response

Jaeger backend version

2.0.0-rc2

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

No response

Deployment model

No response

Deployment configs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions