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

Show links in UI for non-core ingress resources #11934

Open
maxnitze opened this issue Jan 10, 2023 · 0 comments
Open

Show links in UI for non-core ingress resources #11934

maxnitze opened this issue Jan 10, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@maxnitze
Copy link

maxnitze commented Jan 10, 2023

Summary

It should be possible for ArgoCD to display links for non-core ingress resources.

Motivation

Besides the Kubernetes-core resource Ingress, some applications come with CRDs, that define new ingress resources. OpenShift Route (https://docs.openshift.com/container-platform/4.11/rest_api/network_apis/route-route-openshift-io-v1.html) and Traefik IngressRoute (https://doc.traefik.io/traefik/providers/kubernetes-crd/) come to my mind. For OpenShift there is a (seems-to-be-abandoned) open PR #5096.

Proposal

Links could be implemented the same way health checks are: Resource Customization.

Bundle Popular Resources with ArgoCD

Bundle more popular resources with ArgoCD natively, like we do it for health checks for some resources.

For example Prometheus:

hs={ status = "Progressing", message = "Waiting for initialization" }
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
if condition.type == "Available" and condition.status ~= "True" then
if condition.reason == "SomePodsNotReady" then
hs.status = "Progressing"
else
hs.status = "Degraded"
end
hs.message = condition.message or condition.reason
end
if condition.type == "Available" and condition.status == "True" then
hs.status = "Healthy"
hs.message = "All instances are available"
end
end
end
end
return hs

We could put a links.lua in the same folder for links created for Prometheus resources, for example.

Read Link Customization from ArgoCD config

Provide a way to specify resource customization in the argocd-cm.yaml file.

For example health checks for custom resources:

resource.customizations.health.certmanager.k8s.io-Certificate: |
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 certificate"
return hs

Example for Traefik IngressRoute:

data:
  ...
  resource.customizations.links.traefik.containo.us-IngressRoute |
    links = []
    // walk object and create link for each configured host and path
    return links

Additional Requirements

Releated Issues

@maxnitze maxnitze added the enhancement New feature or request label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant