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

Architecture: Generic, template-able resource reconciler (Espejote) #368

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

DebakelOrakel
Copy link
Contributor

No description provided.

@DebakelOrakel DebakelOrakel force-pushed the decision/prometheusrule-controller branch from 67a03d7 to d3d18f8 Compare December 1, 2024 13:46
@bastjan bastjan changed the title Add decision to manage operator managed PrometheusRules Architecture: Generic, template-able resource reconciler (Espejote) Feb 10, 2025
@bastjan bastjan force-pushed the decision/prometheusrule-controller branch 4 times, most recently from d09203f to a08eec0 Compare February 10, 2025 12:59
@bastjan bastjan force-pushed the decision/prometheusrule-controller branch from a08eec0 to 42f7f2c Compare February 10, 2025 13:21
@tobru
Copy link
Member

tobru commented Feb 11, 2025

It would be great to see the option "Crossplane Composition (Functions)" discussed in the decision document. This technology could probably also solve the problem at hand. I don't want to say it's the best solution, but at least I'd like to see a discussion around it and a conscious decision why not to use it. Some references to learn more: https://docs.crossplane.io/v1.18/concepts/compositions/ "Compositions are a template for creating multiple managed resources as a single object."

@DebakelOrakel
Copy link
Contributor Author

I don't see how Crossplane Compositions would be the proper tool for this task.
Also Option 1 discusses using existing tools.

@tobru
Copy link
Member

tobru commented Feb 12, 2025

Also Option 1 discusses using existing tools.

Option 1 discusses policy tools, Crossplane isn't one of them.

I don't see how Crossplane Compositions would be the proper tool for this task.

This is fine, but I want to understand the "why". Crossplane Compositions is exactly that, a template engine which reconciles resources.

This document which is being written serves as a decision document to look back in the future and understand why something was done in a certain way, what alternatives were out there and why they haven't been chosen.

@bastjan
Copy link
Contributor

bastjan commented Feb 12, 2025

I'll add an option for the 737-MAX 👍

Edit:

For only 490 objects:

❯ ka get apirequestcounts.apiserver.openshift.io objects.v1alpha2.kubernetes.crossplane.io 
NAME                                        REMOVEDINRELEASE   REQUESTSINCURRENTHOUR   REQUESTSINLAST24H
objects.v1alpha2.kubernetes.crossplane.io                      108573                  2729970

We tried very very hard to minimize the footgun potential in the architecture of espejote.

@DebakelOrakel
Copy link
Contributor Author

DebakelOrakel commented Feb 12, 2025

Option 1 discusses policy tools, Crossplane isn't one of them.

That is true, the conclusion still remains.

  • Crossplane is primarly designed to manage external infrastructure resources.
  • Using a full-blown control-plane solution just to do something that a very simple operator can do much more efficiently.
  • Instead of using technology we already use (Jsonnet) we would need to learn a very complex framework for a simple task.

Above points are the reason why we never considered using Crossplane, bc it never was a reasonable choice to consider given the problem statement.

@bastjan bastjan force-pushed the decision/prometheusrule-controller branch 5 times, most recently from 37639ea to 9e7fc54 Compare February 20, 2025 13:39
@bastjan bastjan requested a review from a team February 20, 2025 13:42
Copy link
Member

@simu simu left a comment

Choose a reason for hiding this comment

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

Decision LGTM. Architecture LGTM overall, some comments inline.

@bastjan bastjan force-pushed the decision/prometheusrule-controller branch from 9e7fc54 to 219320c Compare February 20, 2025 14:42
@bastjan bastjan force-pushed the decision/prometheusrule-controller branch from 219320c to 4b3f720 Compare February 20, 2025 14:56
Copy link
Member

@haasad haasad left a comment

Choose a reason for hiding this comment

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

Kyverno generate policies have a synchronize property that allows you to choose not to sync a resource after it was created. Could something similar be done with espejote?

@bastjan bastjan force-pushed the decision/prometheusrule-controller branch from bfd078c to eceffa9 Compare February 21, 2025 07:23
@bastjan bastjan force-pushed the decision/prometheusrule-controller branch 2 times, most recently from 505f1a6 to 9b1efbb Compare February 21, 2025 08:45
Co-authored-by: Adrian Haas <[email protected]>
Co-authored-by: Simon Gerber <[email protected]>
@bastjan bastjan force-pushed the decision/prometheusrule-controller branch from 9b1efbb to 7293d51 Compare February 21, 2025 08:46
@bastjan bastjan merged commit 72799a5 into master Feb 21, 2025
1 check passed
@bastjan bastjan deleted the decision/prometheusrule-controller branch February 21, 2025 08:47
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.

5 participants