Skip to content

Commit

Permalink
Adding more stuff to startup configuration printing
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFarley committed Sep 16, 2023
1 parent f91d200 commit c70b868
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,22 @@ def printHeaderAndConfiguration():
print("-------------------------------------------------------------------------------------------------------------")
print(" Volume Autoscaler - Configuration ")
print("-------------------------------------------------------------------------------------------------------------")
print(" Prometheus URL: {}".format(PROMETHEUS_URL))
print(" Prometheus Version: {}{}".format(PROMETHEUS_VERSION," (upgrade to >= 2.30.0 to prevent some false positives)" if version.parse(PROMETHEUS_VERSION) < version.parse("2.30.0") else ""))
print(" Prometheus Labels: {{{}}}".format(PROMETHEUS_LABEL_MATCH))
print(" Interval to query usage: every {} seconds".format(INTERVAL_TIME))
print(" Scale up after: {} intervals ({} seconds total)".format(SCALE_AFTER_INTERVALS, SCALE_AFTER_INTERVALS * INTERVAL_TIME))
print(" Scale above percentage: disk is over {}% full".format(SCALE_ABOVE_PERCENT))
print(" Scale up minimum increment: {} bytes, or {}".format(SCALE_UP_MIN_INCREMENT, convert_bytes_to_storage(SCALE_UP_MIN_INCREMENT)))
print(" Scale up maximum increment: {} bytes, or {}".format(SCALE_UP_MAX_INCREMENT, convert_bytes_to_storage(SCALE_UP_MAX_INCREMENT)))
print(" Scale up maximum size: {} bytes, or {}".format(SCALE_UP_MAX_SIZE, convert_bytes_to_storage(SCALE_UP_MAX_SIZE)))
print(" Scale up percentage: {}% of current disk size".format(SCALE_UP_PERCENT))
print(" Scale up cooldown: only resize every {} seconds".format(SCALE_COOLDOWN_TIME))
print(" Verbose Mode: is {}".format("ENABLED" if VERBOSE else "Disabled"))
print(" Dry Run: is {}".format("ENABLED, no scaling will occur!" if DRY_RUN else "Disabled"))
print(" HTTP Timeouts for k8s/prom: is {} seconds".format(HTTP_TIMEOUT))
print(" Prometheus URL: {}".format(PROMETHEUS_URL))
print(" Prometheus Version: {}{}".format(PROMETHEUS_VERSION," (upgrade to >= 2.30.0 to prevent some false positives)" if version.parse(PROMETHEUS_VERSION) < version.parse("2.30.0") else ""))
print(" Prometheus Labels: {{{}}}".format(PROMETHEUS_LABEL_MATCH))
print(" Interval to query usage: every {} seconds".format(INTERVAL_TIME))
print(" Scale up after: {} intervals ({} seconds total)".format(SCALE_AFTER_INTERVALS, SCALE_AFTER_INTERVALS * INTERVAL_TIME))
print(" Scale above percentage: disk is over {}% full".format(SCALE_ABOVE_PERCENT))
print(" Scale up minimum increment: {} bytes, or {}".format(SCALE_UP_MIN_INCREMENT, convert_bytes_to_storage(SCALE_UP_MIN_INCREMENT)))
print(" Scale up maximum increment: {} bytes, or {}".format(SCALE_UP_MAX_INCREMENT, convert_bytes_to_storage(SCALE_UP_MAX_INCREMENT)))
print(" Scale up maximum size: {} bytes, or {}".format(SCALE_UP_MAX_SIZE, convert_bytes_to_storage(SCALE_UP_MAX_SIZE)))
print(" Scale up percentage: {}% of current disk size".format(SCALE_UP_PERCENT))
print(" Scale up cooldown: only resize every {} seconds".format(SCALE_COOLDOWN_TIME))
print(" Verbose Mode: is {}".format("ENABLED" if VERBOSE else "Disabled"))
print(" Dry Run: is {}".format("ENABLED, no scaling will occur!" if DRY_RUN else "Disabled"))
print(" HTTP Timeouts for k8s/prom: is {} seconds".format(HTTP_TIMEOUT))
print(" VictoriaMetrics mode: is {}".format("Enabled" if VICTORIAMETRICS_COMPAT else "Disabled"))
print("X-Scope-OrgID Header for Cortex: {}".format(SCOPE_ORGID_AUTH_HEADER))
print("-------------------------------------------------------------------------------------------------------------")


Expand Down

0 comments on commit c70b868

Please sign in to comment.