Skip to content

Commit

Permalink
Support custom node-export's port
Browse files Browse the repository at this point in the history
Signed-off-by: pixiake <[email protected]>

(cherry picked from commit ae45137)
Signed-off-by: pixiake <[email protected]>
  • Loading branch information
pixiake committed Mar 21, 2022
1 parent 73e20ba commit 00737b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
13 changes: 7 additions & 6 deletions deploy/cluster-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ spec:
monitoring:
# type: external # Whether to specify the external prometheus stack, and need to modify the endpoint at the next line.
endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090 # Prometheus endpoint to get metrics data.
GPUMonitoring: # Enable or disable the GPU-related metrics. If you enable this switch but have no GPU resources, Kubesphere will set it to zero.
GPUMonitoring: # Enable or disable the GPU-related metrics. If you enable this switch but have no GPU resources, Kubesphere will set it to zero.
enabled: false
gpu: # Install GPUKinds. The default GPU kind is nvidia.com/gpu. Other GPU kinds can be added here according to your needs.
kinds:
gpu: # Install GPUKinds. The default GPU kind is nvidia.com/gpu. Other GPU kinds can be added here according to your needs.
kinds:
- resourceName: "nvidia.com/gpu"
resourceType: "GPU"
default: true
Expand Down Expand Up @@ -104,6 +104,9 @@ spec:
enabled: false # Enable or disable metrics-server.
monitoring:
storageClass: "" # If there is an independent StorageClass you need for Prometheus, you can specify it here. The default StorageClass is used by default.
node_exporter:
port: 9100
# resources: {}
# kube_rbac_proxy:
# resources: {}
# kube_state_metrics:
Expand All @@ -116,8 +119,6 @@ spec:
# resources: {}
# adapter:
# resources: {}
# node_exporter:
# resources: {}
# alertmanager:
# replicas: 1 # AlertManager Replicas.
# resources: {}
Expand All @@ -127,7 +128,7 @@ spec:
# resources: {}
# proxy:
# resources: {}
gpu: # GPU monitoring-related plug-in installation.
gpu: # GPU monitoring-related plug-in installation.
nvidia_dcgm_exporter: # Ensure that gpu resources on your hosts can be used normally, otherwise this plug-in will not work properly.
enabled: false # Check whether the labels on the GPU hosts contain "nvidia.com/gpu.present=true" to ensure that the DCGM pod is scheduled to these nodes.
# resources: {}
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubesphere-installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ spec:
serviceAccountName: ks-installer
containers:
- name: installer
image: kubesphere/ks-installer:v3.2.1
image: kubesphere/ks-installer:v3.2.1-ae451377
imagePullPolicy: "Always"
resources:
limits:
Expand Down
10 changes: 5 additions & 5 deletions roles/ks-monitor/templates/node-exporter-daemonset.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
operator: DoesNotExist
containers:
- args:
- --web.listen-address=127.0.0.1:9100
- --web.listen-address=127.0.0.1:{{ monitoring.node_exporter.port | default("9100") }}
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --path.rootfs=/host/root
Expand Down Expand Up @@ -55,9 +55,9 @@ spec:
readOnly: true
- args:
- --logtostderr
- --secure-listen-address=[$(IP)]:9100
- --secure-listen-address=[$(IP)]:{{ monitoring.node_exporter.port | default("9100") }}
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
- --upstream=http://127.0.0.1:9100/
- --upstream=http://127.0.0.1:{{ monitoring.node_exporter.port | default("9100") }}/
env:
- name: IP
valueFrom:
Expand All @@ -66,8 +66,8 @@ spec:
image: {{ kube_rbac_proxy_repo }}:{{ kube_rbac_proxy_tag }}
name: kube-rbac-proxy
ports:
- containerPort: 9100
hostPort: 9100
- containerPort: {{ monitoring.node_exporter.port | default("9100") }}
hostPort: {{ monitoring.node_exporter.port | default("9100") }}
name: https
securityContext:
runAsGroup: 65532
Expand Down

0 comments on commit 00737b8

Please sign in to comment.