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

ArgoCD health indicator colors #4258

Closed
neil-119 opened this issue Sep 12, 2024 · 4 comments
Closed

ArgoCD health indicator colors #4258

neil-119 opened this issue Sep 12, 2024 · 4 comments
Labels
question Further information is requested

Comments

@neil-119
Copy link

Not sure if this the right place to post this, but ArgoCD shows green on the custom resources for ASO even when the status field in the CR shows errors. Has anyone figured out how to get ArgoCD to show realistic indicator colors for ASO resources yet?

@neil-119
Copy link
Author

I'll see if I can create my own lua script for it.

https://argo-cd.readthedocs.io/en/stable/operator-manual/health/

@theunrepentantgeek
Copy link
Member

You should be able to use our Ready condition in your LUA script.

I'm surprised that ArgoCD doesn't check for that by default, but they probably have a good reason for this.

@matthchr matthchr added question Further information is requested waiting-on-user-response Waiting on more information from the original user before progressing. and removed needs-triage 🔍 labels Sep 16, 2024
@theunrepentantgeek theunrepentantgeek removed the waiting-on-user-response Waiting on more information from the original user before progressing. label Sep 23, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Recently Completed in Azure Service Operator Roadmap Sep 23, 2024
@neil-119
Copy link
Author

I'll see if I can create my own lua script for it.

https://argo-cd.readthedocs.io/en/stable/operator-manual/health/

Just an update -- the sample script that was provided in the link above (for crossplane) also works for ASOP v2.

@nraooptum
Copy link

nraooptum commented Nov 21, 2024

@theunrepentantgeek Just a small update -- the above script almost works. I had to make some tweaks:

"*.azure.com/*":
  health.lua: |
    hs = {}
    if obj.status ~= nil then
      if obj.status.conditions ~= nil then
        for i, condition in ipairs(obj.status.conditions) do
          if condition.type == "Ready" and condition.status == "False" and condition.reason ~= nil and condition.reason ~= "Reconciling" then
            hs.status = "Degraded"
            hs.message = condition.message
            return hs
          end
          if condition.type == "Ready" and condition.status == "True" then
            hs.status = "Healthy"
            hs.message = condition.message
            return hs
          end
        end
      end
    end

    hs.status = "Progressing"
    hs.message = "Waiting for ASO"
    return hs

It will still work without, but the resource shows up as Degraded instead of In Progress while the operator is reconciling / waiting on Azure without this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Development

No branches or pull requests

4 participants