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

vmalertmanagerconfig: repeated child routes field #629

Closed
Haleygo opened this issue Apr 17, 2023 · 1 comment · Fixed by #630
Closed

vmalertmanagerconfig: repeated child routes field #629

Haleygo opened this issue Apr 17, 2023 · 1 comment · Fixed by #630

Comments

@Haleygo
Copy link
Contributor

Haleygo commented Apr 17, 2023

There are two child routes field in vmalertmanagerconfig.spec now, and the doc using RawRoutes instead Routes. Is there any particular reason to use RawRoutes? why not use Routes []*Route directly?
image
image

@Haleygo
Copy link
Contributor Author

Haleygo commented Apr 17, 2023

// CRD schema doesn't support self-referential types for now (see
// kubernetes/kubernetes#62872). We have to use
// an alternative type to circumvent the limitation. The downside is that
// the Kube API can't validate the data beyond the fact that it is a valid
// JSON representation.

I see there is explanation in prometheus operator, so api readability extensionsv1.JSON is needed to circumvent the limitation.
Then vmalertmanagerconfig use route.Routes in code for better code readability.

The doc for Route.routes field might be a little misleading when refer to RawRoutes.

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

Successfully merging a pull request may close this issue.

1 participant