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 OVNKubernetes alert rules for OpenShift 4.14 #197

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

simu
Copy link
Member

@simu simu commented Apr 9, 2024

OpenShift 4.14 moved the OVNKubernetes control plane alerts (and we can't use the 4.13 alerts, because 4.14 makes significant changes to the OVNKubernetes architecture). Additionally 4.14 introduced gotemplate snippets in the OVNKubernetes alerts that we need to render.

Since the files also contain gotemplate snippets which aren't valid Jinja2, we implement very simple rendering logic which uses std.strReplace() in the component.

Checklist

  • The PR has a meaningful title. It will be used to auto-generate the
    changelog.
    The PR has a meaningful description that sums up the change. It will be
    linked in the changelog.
  • PR contains a single logical change (to build a better changelog).
  • Categorize the PR by adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog.

@simu simu added the bug Something isn't working label Apr 9, 2024
@simu simu requested a review from a team as a code owner April 9, 2024 08:51
@simu
Copy link
Member Author

simu commented Apr 9, 2024

Note: no golden-tests changes because we don't actually have a test case that renders the OVNKubernetes alerts

@haasad
Copy link
Member

haasad commented Apr 9, 2024

Note: no golden-tests changes because we don't actually have a test case that renders the OVNKubernetes alerts

Should we add one?

OpenShift 4.14 moved the OVNKubernetes control plane alerts (and we
can't use the 4.13 alerts, because 4.14 makes significant changes to the
OVNKubernetes architecture). Additionally 4.14 introduced gotemplate
snippets in the OVNKubernetes alerts that we need to render.

Since the files also contain gotemplate snippets which aren't valid
Jinja2, we implement very simple rendering logic which uses
`std.strReplace()` in the component.
@simu simu force-pushed the fix/ovnkubernetes-rules-4.14 branch from aed3691 to 3f430a7 Compare April 9, 2024 09:09
@simu
Copy link
Member Author

simu commented Apr 9, 2024

Note: no golden-tests changes because we don't actually have a test case that renders the OVNKubernetes alerts

Should we add one?

First, I want to delete the 4.11 and 4.12 tests and configuration options, since we don't really need them anymore and the time to generate golden tests is getting out of hand for this component.

@simu simu merged commit b1c960d into master Apr 9, 2024
26 checks passed
@simu simu deleted the fix/ovnkubernetes-rules-4.14 branch April 9, 2024 09:28
@simu simu mentioned this pull request Apr 12, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants