Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit ba3aa5b

Browse files
authored
fix cluster-utilization cronjob environment value type issue (#5325)
1 parent 223d9b7 commit ba3aa5b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/alert-manager/deploy/alert-manager-cronjob.yaml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
- name: PAI_BEARER_TOKEN
4141
value: {{ cluster_cfg["alert-manager"]["alert-handler"]["pai-bearer-token"] }}
4242
- name: PROMETHEUS_SCRAPE_INTERVAL
43-
value: {{ cluster_cfg["prometheus"]["scrape_interval"] }}
43+
value: "{{ cluster_cfg["prometheus"]["scrape_interval"] }}"
4444
imagePullSecrets:
4545
- name: {{ cluster_cfg["cluster"]["docker-registry"]["secret-name"] }}
4646
restartPolicy: OnFailure

src/alert-manager/src/cluster-utilization/send_alert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
REST_JOB_API_PREFIX = "/rest-server/api/v2/jobs"
1616

1717
TOKEN = os.environ.get('PAI_BEARER_TOKEN')
18-
PROMETHEUS_SCRAPE_INTERVAL = os.environ.get('PROMETHEUS_SCRAPE_INTERVAL')
18+
PROMETHEUS_SCRAPE_INTERVAL = int(os.environ.get('PROMETHEUS_SCRAPE_INTERVAL'))
1919

2020
def enable_request_debug_log(func):
2121
def wrapper(*args, **kwargs):

0 commit comments

Comments
 (0)