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

Re-write alerts so they work with cluster monitoring #262

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

Kidswiss
Copy link
Contributor

@Kidswiss Kidswiss commented Nov 15, 2024

Summary

The current user-workload alerts will not properly work with the cluster workload monitoring, because:

  • A specific "syn": "true" label is missing
  • They don't filter for the namespace. So each alert would trigger for each instance that is running.

The second part needed a bit more involved refactoring, as we have to pass the specific namespace for each instance and can't just match in a generic manner.

Checklist

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog
  • Update tests.
  • Link this PR to related issues.

@Kidswiss Kidswiss added the patch label Nov 15, 2024
@Kidswiss Kidswiss requested review from a team, TheBigLee, wejdross and zugao and removed request for a team November 15, 2024 13:43
The current user-workload alerts will not properly work with the cluster
workload monitoring, because:

* A specific `"syn": "true"` label is missing
* They don't filter for the namespace. So each alert would trigger
  for each instance that is running.

The second part needed a bit more involved refactoring, as we have to
pass the specific namespace for each instance and can't just match
in a generic manner.
Copy link
Collaborator

@zugao zugao left a comment

Choose a reason for hiding this comment

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

Looks ok but yeah check what you get with crossplane diff.

@@ -5,7 +5,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
)

// ServiceRule is a func definition to get a specific rule based on a container name s
// ServiceRule is a func definition to get a specific rule based on a container name s and namespace name n
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// ServiceRule is a func definition to get a specific rule based on a container name s and namespace name n
// ServiceRule is a func definition to get a specific rule based on a container name s and namespace name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no :D

@Kidswiss Kidswiss merged commit ac41eae into master Nov 15, 2024
8 checks passed
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.

2 participants