From 4178bcdccda7c677401d935277e6709d2a2d249b Mon Sep 17 00:00:00 2001 From: 7sunarni <710720732@qq.com> Date: Tue, 24 Dec 2024 14:42:10 +0800 Subject: [PATCH] chore(chart): add scheduler and controller-manager prometheus crape annotations --- .../helm/chart/volcano/templates/controllers.yaml | 4 ++++ installer/helm/chart/volcano/templates/scheduler.yaml | 4 ++++ installer/helm/chart/volcano/values.yaml | 10 ++++++++++ 3 files changed, 18 insertions(+) diff --git a/installer/helm/chart/volcano/templates/controllers.yaml b/installer/helm/chart/volcano/templates/controllers.yaml index 9c4e8c7c80..093e6f4868 100644 --- a/installer/helm/chart/volcano/templates/controllers.yaml +++ b/installer/helm/chart/volcano/templates/controllers.yaml @@ -125,6 +125,10 @@ spec: {{- if or (.Values.custom.controller_podLabels) (.Values.custom.common_labels) }} {{- mustMerge (.Values.custom.controller_podLabels | default (dict)) (.Values.custom.common_labels | default (dict)) | toYaml | nindent 8 }} {{- end }} + annotations: + {{- if or (.Values.custom.controller_podAnnotations) (.Values.custom.common_annotations) }} + {{- mustMerge (.Values.custom.controller_podAnnotations | default (dict)) (.Values.custom.common_annotations | default (dict)) | toYaml | nindent 8 }} + {{- end }} spec: {{- if $controller_tolerations }} tolerations: {{- toYaml $controller_tolerations | nindent 8 }} diff --git a/installer/helm/chart/volcano/templates/scheduler.yaml b/installer/helm/chart/volcano/templates/scheduler.yaml index 68810c96b9..6ea77b5f21 100644 --- a/installer/helm/chart/volcano/templates/scheduler.yaml +++ b/installer/helm/chart/volcano/templates/scheduler.yaml @@ -147,6 +147,10 @@ spec: {{- if or (.Values.custom.scheduler_podLabels) (.Values.custom.common_labels) }} {{- mustMerge (.Values.custom.scheduler_podLabels | default (dict)) (.Values.custom.common_labels | default (dict)) | toYaml | nindent 8 }} {{- end }} + annotations: + {{- if or (.Values.custom.scheduler_podAnnotations) (.Values.custom.common_annotations) }} + {{- mustMerge (.Values.custom.scheduler_podAnnotations | default (dict)) (.Values.custom.common_annotations | default (dict)) | toYaml | nindent 8 }} + {{- end }} spec: {{- if $scheduler_tolerations }} tolerations: {{- toYaml $scheduler_tolerations | nindent 8 }} diff --git a/installer/helm/chart/volcano/values.yaml b/installer/helm/chart/volcano/values.yaml index 3593802460..6ddb731157 100644 --- a/installer/helm/chart/volcano/values.yaml +++ b/installer/helm/chart/volcano/values.yaml @@ -126,9 +126,19 @@ custom: admission_labels: ~ scheduler_labels: ~ controller_labels: ~ + admission_podAnnotations: ~ + scheduler_podAnnotations: + prometheus.io/scrape: 'true' + prometheus.io/path: '/metrics' + prometheus.io/port: '8080' + controller_podAnnotations: + prometheus.io/scrape: 'true' + prometheus.io/path: '/metrics' + prometheus.io/port: '8081' # Specify labels for all Volcano helm chart objects except for CRDs common_labels: ~ + common_annotations: ~ # Specify resources for Volcano main component deployments and pods