Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus] extraConfigmapMounts not creating configmap file #5037

Open
igloo12 opened this issue Dec 3, 2024 · 1 comment
Open

[prometheus] extraConfigmapMounts not creating configmap file #5037

igloo12 opened this issue Dec 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@igloo12
Copy link

igloo12 commented Dec 3, 2024

Describe the bug a clear and concise description of what the bug is.

I am trying to add a configmap as a file to my prometheus deploy but the file is not showing up

$ kubectl describe -n logging configmap my-configmap
Name:         my-configmap
Namespace:    logging
Labels:       <none>
Annotations:  <none>

Data
====
custom-config.yaml:
----
scrape_configs:
  - job_name: 'custom'
    static_configs:
      - targets: ['localhost:9090']



BinaryData
====

Events:  <none>

It's showing up in the mounts, but there is no file

    Readiness:      http-get http://:9090/-/ready delay=30s timeout=4s period=5s #success=1 #failure=3
    Environment:    <none>
    Mounts:
      /data from storage-volume (rw)
      /etc/config from config-volume (rw)
      /etc/prometheus/custom from server-my-extra (ro,path="custom-config.yaml")
      /tmp/config from server-service-passwords (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-hwqgb (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  config-volume:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      prometheus-server
    Optional:  false
  server-service-passwords:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      prometheus-server
    Optional:  false
  server-my-extra:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      my-configmap
    Optional:  false
  storage-volume:

What's your helm version?

version.BuildInfo{Version:"v3.16.3", GitCommit:"cfd07493f46efc9debd9cc1b02a0961186df7fdf", GitTreeState:"clean", GoVersion:"go1.22.7"}

What's your kubectl version?

Client Version: v1.31.3 Kustomize Version: v5.4.2 Server Version: v1.27.2

Which chart?

prometheus-26.0.0

What's the chart version?

v3.0.0

What happened?

No file showing up in the pod

What you expected to happen?

File to show up in the pod

How to reproduce it?

No response

Enter the changed values of values.yaml?

server:
  extraConfigmapMounts:
    - name: service-passwords
      mountPath: /tmp/config
      configMap: prometheus-server
      readOnly: true
    - name: my-extra
      mountPath: /etc/prometheus/custom
      subPath: custom-config.yaml
      configMap: my-configmap
      readOnly: true

Enter the command that you execute and failing/misfunctioning.

helm upgrade -n logging prometheus prometheus-community/prometheus -f prometheus-values.yaml

Anything else we need to know?

No response

@igloo12 igloo12 added the bug Something isn't working label Dec 3, 2024
@zeritti zeritti changed the title extraConfigmapMounts not creating configmap file [prometheus] extraConfigmapMounts not creating configmap file Dec 4, 2024
@zeritti
Copy link
Member

zeritti commented Dec 4, 2024

Just attempted to reproduce the described behaviour. The files corresponding to the configmaps' keys were created in the expected directories, i.e. extraConfigmapMounts worked. How did you determine that "the file is not showing up"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants