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

fix: cluster_id label override in mixins #12570

Closed

Conversation

QuentinBisson
Copy link
Contributor

@QuentinBisson QuentinBisson commented Apr 11, 2024

What this PR does / why we need it:

Follow up of #12567

This PR fixes the compilation of mixins when per_cluster_label is used. Without this, a lot of the existing cluster labels are not changed

This PR also adds the multi-cluster to canaries

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@QuentinBisson
Copy link
Contributor Author

@MichelHollands could you take a look?

@QuentinBisson QuentinBisson force-pushed the fix-cluster-id-label-in-mixins branch from 577f488 to 7c39caa Compare April 11, 2024 12:04
@QuentinBisson QuentinBisson force-pushed the fix-cluster-id-label-in-mixins branch from 7c39caa to 9b9ceb2 Compare April 11, 2024 12:14
for: 5m
labels:
severity: warning
- name: loki_alerts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra spaces are added when regenerating

@@ -63,7 +63,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(go_goroutines{cluster=\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"})",
"expr": "sum(go_goroutines{cluster=~\"$cluster\", namespace=\"$namespace\", pod=~\"$deployment.*\", pod=~\"$pod\"})",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing all cluster=\"$cluster\" with cluster=~\"$cluster\" to be the same on all clusters

@QuentinBisson QuentinBisson force-pushed the fix-cluster-id-label-in-mixins branch from 9b9ceb2 to 7764cd2 Compare April 11, 2024 12:19
'cluster="$cluster", ',
$._config.per_cluster_label + '=~"$cluster", '
),
'cluster_job_route',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relabel the recording rules

@QuentinBisson QuentinBisson force-pushed the fix-cluster-id-label-in-mixins branch from 0cf2ff2 to 0dd0dbd Compare April 11, 2024 12:22
@QuentinBisson QuentinBisson force-pushed the fix-cluster-id-label-in-mixins branch 2 times, most recently from 3796595 to 0d14a14 Compare April 11, 2024 13:26
@QuentinBisson QuentinBisson force-pushed the fix-cluster-id-label-in-mixins branch 3 times, most recently from 5812d70 to 7c98704 Compare April 11, 2024 13:55
@QuentinBisson QuentinBisson force-pushed the fix-cluster-id-label-in-mixins branch from e5769dc to 1d92e27 Compare April 11, 2024 14:05
@QuentinBisson
Copy link
Contributor Author

Closing as this got too complicated for no reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant