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

Custom health assessments for CRDs #911

Closed
4 tasks done
jessesuen opened this issue Dec 8, 2018 · 4 comments
Closed
4 tasks done

Custom health assessments for CRDs #911

jessesuen opened this issue Dec 8, 2018 · 4 comments
Assignees
Milestone

Comments

@jessesuen
Copy link
Member

jessesuen commented Dec 8, 2018

I was trying to set up cert-mananger and realized that Argo CD would benefit from being able to have some way of assessing health for custom CRD types.

In my case, my cert URL was invalid:

status:
  acme:
    uri: https://acme-staging-v02.api.letsencrypt.org/acme/acct/7529828
  conditions:
  - lastTransitionTime: "2018-12-08T09:24:29Z"
    message: Your ACME server URL is set to a v1 endpoint (https://acme-staging.api.letsencrypt.org/directory).
      You should update the spec.acme.server field to "https://acme-staging-v02.api.letsencrypt.org/directory"
    reason: InvalidConfig
    status: "False"
    type: Ready

I think we need a flexible way to allow users to provide some assess health heuristics of CRDs based on group/Kind. Maybe some jq expression

  1. implement custom health support
  2. health check for argoproj.io/Rollout
  3. health check for certmanager.k8s.io/Issuer, certmanager.k8s.io/Certificate
  4. document custom health checks
@jessesuen
Copy link
Member Author

Alternatively, rather than a plugin mechanism, we could bake the health assessments directly into the health assessment library, starting with well known CRD types. Then rely on contributions to build up the library of health statuses. This would provide a more seamless experience, but is subject to breaking version changes,

@jessesuen
Copy link
Member Author

A use case has come up where a user has Ingresses where status.loadBalancer will not be expected to be populated. Therefore, the ingress will always be Progressing, making the entire application "Progressing".

I think we should make the built-in types customizable as well, for when the built-in assessments are not what the user wants. This means we should employ a "plug-in" style of customized health assessments, which could even be applied to the built-in types.

@jessesuen
Copy link
Member Author

The direction we are going with customized health assessments is to have this configurable with embeddable Lua scripts that the user can configure in the argocd-cm configmap. Health assessment scripts would be made per group/Kind.

The reason for choosing Lua script (over something more familiar like javascript/typescript) is it's superior embedability. (Also read helm v3's rationale for choosing Lua: https://sweetcode.io/a-first-look-at-the-helm-3-plan/)

Argo CD will provide a built-in library of scripts for popular CRD types (such as cert-manager), to provide a good out-of-box experience, and welcome contributions from the community. Any built-in assessments can always be overridden by a script which is configured in the configmap.

@jessesuen
Copy link
Member Author

Fixed

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

No branches or pull requests

3 participants