Skip to content

Commit

Permalink
Merge pull request #3740 from lekaf974/feat/kubestatemetrics-remove-h…
Browse files Browse the repository at this point in the history
…aedcoded-nodeselector

Remove hardcoded nodeSelector for kubestatematrics
  • Loading branch information
volcano-sh-bot authored Sep 25, 2024
2 parents 0843c0d + 011ffa3 commit d670451
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ The following are the list configurable parameters of Volcano Chart and their de
|`custom.admission_ns`|nodeSelector for Admission pods|`~`|
|`custom.controller_ns`|nodeSelector for Controller pods|`~`|
|`custom.scheduler_ns`|nodeSelector for Scheduler pods|`~`|
|`custom.kube_state_metrics_ns`|nodeSelector for Kube State Metrics pods|`~`|
|`custom.admission_podLabels`|Pod labels for Admission pods|`~`|
|`custom.controller_podLabels`|Pod labels for Controller pods|`~`|
|`custom.scheduler_podLabels`|Pod labels for Scheduler pods|`~`|
Expand Down
6 changes: 3 additions & 3 deletions installer/helm/chart/volcano/templates/kubestatemetrics.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.custom.metrics_enable }}
{{ $kube_state_metrics_ns := or .Values.custom.kube_state_metrics_ns .Values.custom.default_ns }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down Expand Up @@ -184,9 +185,8 @@ spec:
initialDelaySeconds: 5
timeoutSeconds: 5
dnsPolicy: ClusterFirst
{{ if .Values.custom.metrics_enable }}
nodeSelector:
node.kubernetes.io/instance-type: controlpanel
{{ if $kube_state_metrics_ns }}
nodeSelector: {{- toYaml $kube_state_metrics_ns | nindent 8 }}
{{ end }}
serviceAccountName: kube-state-metrics
---
Expand Down
2 changes: 1 addition & 1 deletion installer/helm/chart/volcano/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ custom:
admission_ns: ~
scheduler_ns: ~
controller_ns: ~

kube_state_metrics_ns: ~

# Specify labels for Volcano main component deployments and pods
# For example:
Expand Down

0 comments on commit d670451

Please sign in to comment.