crossplane-contrib / provider-upjet-aws

AWS Provider for Crossplane.
https://marketplace.upbound.io/providers/upbound/provider-family-aws/
Apache License 2.0
146 stars 123 forks source link

Unable to configure custom ArgoCD health check #389

Closed maciej-ciach closed 1 month ago

maciej-ciach commented 1 year ago

What happened?

I'm trying to configure custom health check for CRDs created using provider-aws https://argo-cd.readthedocs.io/en/stable/operator-manual/health/#way-1-define-a-custom-health-check-in-argocd-cm-configmap

When I configure it then ArgoCD application-controller is automatically crashed.

FYI I was able to configure custom health checks for Terraform provider CRDs.

Were you able to configure custom health checks for aws-provider resources ?

How can we reproduce it?

Configure a custom health check for any CRD in argocd-cm ConfigMap, save it, application controller will crash, you won't be able to refresh apps.

  resource.customizations.health.ecr.aws.upbound.io_Repository: |
    health_status = {}
    health_status.status = "Healthy"
    health_status.message = ""
    return health_status

What environment did it happen in?

bhavinkotak commented 1 year ago

@maciej-ciach - just to confirm if you have already updated resourcetrackingmethod to annotation in ArgoCD Configmap. If not can you try with below CM setup:

kind: ConfigMap
metadata:
  name: argocd-cm
  namespace: argocd
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
data:
  application.resourceTrackingMethod: annotation
  resource.customizations.health.eks.aws.upbound.io_Cluster: |
    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" 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 resource"
    return hs
github-actions[bot] commented 2 months ago

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] commented 1 month ago

This issue is being closed since there has been no activity for 14 days since marking it as stale. If you still need help, feel free to comment or reopen the issue!