-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Shared custom health check for multiple CRDs #4212
Comments
Looks like we support this for diffing customization so it makes sense to do for health checks. |
Is there any update regarding this issue? |
This would be really useful as I'm trying to add health checks for Gatekeeper Constraints , each of which is a unique CRD kind. |
Any updates on this request? It would be very beneficial for Google ConfigConnector resources as well. In the mean time I did find a hacky workaround though, using a reference anchor to define the lua script once and reference it multiple times at the bottom for other CRDs 😄 With these you can list all CRDs available (name + kind) and with a Google Sheet parse it out a bit like the bottom lines:
|
any updates here ? - in crossplane eco-system we also very interested in wildcards/shared custom health check crossplane/crossplane#2444 |
We are also interested in this feature |
Would like this feature as well! |
For this
@jessesuen @crenshaw-dev |
I started implementing this for the main config map , with only the Kind being wildcard-able. But actually it looks like for both Crossplane and GoogleConfigConnector the API Group also needs to be wildcard-able (for supporting pubsub.cnrm.cloud.google.com/PubSubTopic, iam.cnrm.cloud.google.com/IAMPolicyMember, ec2.aws.crossplane.io/Instance, iam.aws.crossplane.io/InstanceProfile, etc) |
#10885
can be configured.
be useful or unneeded? (regex matching potential performance implications) |
@reggie-k thank you for this !
So covering a more generic use case with wild cards at different levels would be nice. |
Ok, so basically you (and me, as I also use Crossplane :)) want all of the following examples to be configurable for the health check:
In other words: |
@reggie-k that seems right 👍 |
* Kind wildcard support in health customizations Signed-off-by: reggie <reginakagan@gmail.com> * Updated health customizations docs to using the correct field with a / Signed-off-by: reggie <reginakagan@gmail.com> * Updated health customizations docs to using the correct field with a / Signed-off-by: reggie <reginakagan@gmail.com> * Document resource kind wildcard for custom health check Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Removed code duplication and returned an empty string instead of an error Signed-off-by: reggie <reginakagan@gmail.com> Signed-off-by: reggie <reginakagan@gmail.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
… (argoproj#10885) * Kind wildcard support in health customizations Signed-off-by: reggie <reginakagan@gmail.com> * Updated health customizations docs to using the correct field with a / Signed-off-by: reggie <reginakagan@gmail.com> * Updated health customizations docs to using the correct field with a / Signed-off-by: reggie <reginakagan@gmail.com> * Document resource kind wildcard for custom health check Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Removed code duplication and returned an empty string instead of an error Signed-off-by: reggie <reginakagan@gmail.com> Signed-off-by: reggie <reginakagan@gmail.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: reggie <reginakagan@gmail.com> Signed-off-by: reggie <reginakagan@gmail.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: reggie <reginakagan@gmail.com> Signed-off-by: reggie <reginakagan@gmail.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
… (argoproj#10885) * Kind wildcard support in health customizations Signed-off-by: reggie <reginakagan@gmail.com> * Updated health customizations docs to using the correct field with a / Signed-off-by: reggie <reginakagan@gmail.com> * Updated health customizations docs to using the correct field with a / Signed-off-by: reggie <reginakagan@gmail.com> * Document resource kind wildcard for custom health check Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Implemented wildcard * support in API Group and Resource Kind and updated docs Signed-off-by: reggie <reginakagan@gmail.com> * Removed code duplication and returned an empty string instead of an error Signed-off-by: reggie <reginakagan@gmail.com> Signed-off-by: reggie <reginakagan@gmail.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: reggie <reginakagan@gmail.com> Signed-off-by: reggie <reginakagan@gmail.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: emirot <emirot.nolan@gmail.com>
Signed-off-by: reggie <reginakagan@gmail.com> Signed-off-by: reggie <reginakagan@gmail.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: schakrad <chakradari.sindhu@gmail.com>
Any update here? |
I believe this was implemented by #10885. If I'm wrong, lmk, and I will reopen! |
Summary
Instead of re-writing the same custom health check for different CRDs, share them altogether at once, under the same key in the
ConfigMap
.Motivation
I have multiple CRDs under the same group and version, and all of them uses the same custom health check, that checks whether the
status.synced == true
and wrapping it withnil
checks.Each time I create another CRD, I need to copy/paste the custom health checks in ArgoCD's repository and deploy the
ConfigMap
, which causing a lot of overhead.Proposal
I thought about 2 options:
For example: If the group name is
foo.bar.com
, and the resources are:foo
andbar
, then instead offoo.bar.com/foo:
andfoo.bar.com/bar:
keys underresource.customizations
in theConfigMap
, the key will be:foo.bar.com/*:
(uses wildcard to capture all CRDs under this group).ConfigMap
s.For instance, each CRDs sits in its own repository, which is different than ArgoCD's repository. When creating a CRD, it will create a
ConfigMap
for ArgoCD that configures all of the custom health checks. This way, ArgoCD will be able to fetch extra custom health checks from differentConfigMap
s, but the CRD's owner will handle the checks in its corresponding repository.The text was updated successfully, but these errors were encountered: