prometheus-community / helm-charts

Prometheus community Helm charts
Apache License 2.0
5.06k stars 5.01k forks source link

[prometheus] Chart does not apply Helm standard label format #2873

Closed arukiidou closed 1 year ago

arukiidou commented 1 year ago

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

What's your helm version?

version.BuildInfo{Version:"v3.10", GitCommit:"", GitTreeState:"", GoVersion:"go1.19"}

What's your kubectl version?

Client Version: v1.25.2 Kustomize Version: v4.5.7 Server Version: v1.25.3

Which chart?

prometheus

What's the chart version?

19.2.2

What happened?

# Source: prometheus/templates/vpa.yaml
apiVersion: autoscaling.k8s.io/v1beta2
kind: VerticalPodAutoscaler
metadata:
  labels:
    component: "server"
    app: prometheus
    release: prometheus-1672409090
    chart: prometheus-19.2.2
    heritage: Helm
  name: prometheus-1672409090-server-vpa
  namespace: default
spec:
  targetRef:
    apiVersion: "apps/v1"
    kind: Deployment
    name: prometheus-1672409090-server
  updatePolicy:
    updateMode: "Auto"
  resourcePolicy:
    containerPolicies: 
    - containerName: prometheus-server

What you expected to happen?

# Source: prometheus-server/templates/verticalpodautoscaler.yaml
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: prometheus-server-1672409161
  namespace: default
  labels:
    helm.sh/chart: prometheus-server-19.2.2
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: server
    app.kubernetes.io/part-of: prometheus-server
    app.kubernetes.io/name: prometheus-server
    app.kubernetes.io/instance: prometheus-server-1672409161
    app.kubernetes.io/version: v2.41.0
spec:
  resourcePolicy:
    containerPolicies:
    - containerName: prometheus-server
      maxAllowed:
        cpu: 200m
        memory: 100Mi
      minAllowed:
        cpu: 200m
        memory: 100Mi
  targetRef:
    apiVersion: apps/v1
    kind: DaemonSet
    name:  prometheus-server-1672409161
  updatePolicy:
    updateMode: Auto

How to reproduce it?

helm install prometheus prometheus-community/prometheus --dry-run --debug

Enter the changed values of values.yaml?

verticalAutoscaler:

If true a VPA object will be created for the controller (either StatefulSet or Deployemnt, based on above configs)

enabled: true
updateMode: "Auto"
containerPolicies:
- containerName: 'prometheus-server'

Enter the command that you execute and failing/misfunctioning.

None

Anything else we need to know?

No response

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue is being automatically closed due to inactivity.