Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch: Format the config files properly #19

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/ceems_api_server/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ceems_api_server_version: "0.1.0"
ceems_api_server_version: 0.1.0
ceems_api_server_binary_local_dir: ""
ceems_api_server_binary_url: "https://github.com/{{ _ceems_api_server_repo }}/releases/download/\
v{{ ceems_api_server_version }}/ceems-{{ ceems_api_server_version }}.linux-{{ go_arch }}.tar.gz"
Expand Down
23 changes: 23 additions & 0 deletions roles/ceems_api_server/molecule/alternative/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,29 @@ provisioner:
ceems_api_server_updaters_config:
- id: tsdb-0
updater: tsdb
extra_config:
cutoff_duration: 5m
queries:
# Avgerage CPU utilisation
avg_cpu_usage:
global: |
{% raw %}
avg_over_time(
avg by (uuid) (
(
rate(ceems_compute_unit_cpu_user_seconds_total{uuid=~"{{.UUIDs}}"}[{{.RateInterval}}])
+
rate(ceems_compute_unit_cpu_system_seconds_total{uuid=~"{{.UUIDs}}"}[{{.RateInterval}}])
)
/
(
ceems_compute_unit_cpus{uuid=~"{{.UUIDs}}"}
/ on (instance) group_left ()
ceems_cpu_per_core_count
)
)[{{.Range}}:]
) * 100
{% endraw %}
ceems_api_server_cli_args:
- --log.level=debug
ceems_api_server_env_vars:
Expand Down
6 changes: 3 additions & 3 deletions roles/ceems_api_server/templates/config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{{ ansible_managed | comment }}
{% if ceems_api_server_config | length > 0 %}
ceems_api_server:
{{ ceems_api_server_config | to_nice_yaml | indent(2, true) }}
{{ ceems_api_server_config | to_nice_yaml(sort_keys=False) | indent(2, true) }}
{% endif %}

{% if ceems_api_server_clusters_config | length > 0 %}
clusters:
{{ ceems_api_server_clusters_config | to_nice_yaml | indent(2, true) }}
{{ ceems_api_server_clusters_config | to_nice_yaml(sort_keys=False) | indent(2, true) }}
{% endif %}

{% if ceems_api_server_updaters_config | length > 0 %}
updaters:
{{ ceems_api_server_updaters_config | to_nice_yaml | indent(2, true) }}
{{ ceems_api_server_updaters_config | to_nice_yaml(sort_keys=False,default_style='|') | indent(2, true) }}
{% endif %}
2 changes: 1 addition & 1 deletion roles/ceems_exporter/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ceems_exporter_version: "0.1.0"
ceems_exporter_version: 0.1.0
ceems_exporter_binary_local_dir: ""
ceems_exporter_binary_url: "https://github.com/{{ _ceems_exporter_repo }}/releases/download/v{{ ceems_exporter_version }}/\
ceems-{{ ceems_exporter_version }}.linux-{{ go_arch }}.tar.gz"
Expand Down
6 changes: 3 additions & 3 deletions roles/ceems_lb/templates/config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{{ ansible_managed | comment }}
{% if ceems_lb_config | length > 0 %}
ceems_lb:
{{ ceems_lb_config | to_nice_yaml | indent(2, true) }}
{{ ceems_lb_config | to_nice_yaml(sort_keys=False) | indent(2, true) }}
{% endif %}

{% if ceems_api_server_config | length > 0 %}
ceems_api_server:
{{ ceems_api_server_config | to_nice_yaml | indent(2, true) }}
{{ ceems_api_server_config | to_nice_yaml(sort_keys=False) | indent(2, true) }}
{% endif %}

{% if ceems_api_server_clusters_config | length > 0 %}
clusters:
{{ ceems_api_server_clusters_config }}
{{ ceems_api_server_clusters_config | to_nice_yaml(sort_keys=False) | indent(2, true) }}
{% endif %}
Loading