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]>
  • Loading branch information
pixiake committed Mar 11, 2022
1 parent e06bc28 commit ae45137
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions deploy/cluster-configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,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 @@ -113,8 +116,6 @@ spec:
# resources: {}
# operator:
# resources: {}
# node_exporter:
# resources: {}
# alertmanager:
# replicas: 1 # AlertManager Replicas.
# resources: {}
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 @@ -31,7 +31,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 @@ -61,9 +61,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 @@ -72,8 +72,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 ae45137

Please sign in to comment.