Open fatsolko opened 3 months ago
Here is the logic for whether a LoadBalancer Service is healthy: https://github.com/argoproj/gitops-engine/blob/5fd9f449e75774f6b2b7b1ff137c7759e075e385/pkg/health/health_service.go#L29
In the case where a Service is of type LoadBalancer
, Argo CD will assume it is healthy iff the length of .status.loadBalancer.ingress
is greater than 0.
Here is the logic for whether a LoadBalancer Service is healthy: https://github.com/argoproj/gitops-engine/blob/5fd9f449e75774f6b2b7b1ff137c7759e075e385/pkg/health/health_service.go#L29
In the case where a Service is of type
LoadBalancer
, Argo CD will assume it is healthy iff the length of.status.loadBalancer.ingress
is greater than 0.
Thank you for answer. How can I fix this?
@fatsolko My initial expectation is that this is not an Argo CD issue, but rather an issue with the configuration of the nginx ingress controller, and/or the K8s cluster.
You could try applying the nginx ingress controller without using Argo CD, and see if it works as expected there. FWIW I'm not aware of any other users that have reported issues with the Ingress health check.
@fatsolko My initial expectation is that this is not an Argo CD issue, but rather an issue with the configuration of the nginx ingress controller, and/or the K8s cluster.
You could try applying the nginx ingress controller without using Argo CD, and see if it works as expected there. FWIW I'm not aware of any other users that have reported issues with the Ingress health check.
Nginx ingress controller worked without the Argo CD and works as expected, I just added it to the Argo CD later.
This is documented as well here.
Can you dump the complete YAML from that service, please?
Looking at the screenshot, the service is considered to be 6 months old. So it did exist in the cluster before you included it with an Argo CD application?
So it did exist in the cluster before you included it with an Argo CD application?
Yes
Can you dump the complete YAML from that service, please?
kubectl get svc -o yaml ingress-nginx-controller -n ingress-nginx
apiVersion: v1 kind: Service metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app.kubernetes.io/component":"controller","app.kubernetes.io/instance":"ingress-nginx","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"ingress-nginx","app.kubernetes.io/part-of":"ingress-nginx","app.kubernetes.io/version":"1.8.2","helm.sh/chart":"ingress-nginx-4.7.2"},"name":"ingress-nginx-controller","namespace":"ingress-nginx"},"spec":{"externalIPs":["111.202.6.78"],"ipFamilies":["IPv4"],"ipFamilyPolicy":"SingleStack","ports":[{"appProtocol":"http","name":"http","port":80,"protocol":"TCP","targetPort":"http"},{"appProtocol":"https","name":"https","port":443,"protocol":"TCP","targetPort":"https"}],"selector":{"app.kubernetes.io/component":"controller","app.kubernetes.io/instance":"ingress-nginx","app.kubernetes.io/name":"ingress-nginx"},"type":"LoadBalancer"}} meta.helm.sh/release-name: ingress-nginx meta.helm.sh/release-namespace: ingress-nginx creationTimestamp: "2023-09-28T05:39:05Z" labels: app.kubernetes.io/component: controller app.kubernetes.io/instance: ingress-nginx app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx app.kubernetes.io/version: 1.8.2 helm.sh/chart: ingress-nginx-4.7.2 k8slens-edit-resource-version: v1 name: ingress-nginx-controller namespace: ingress-nginx resourceVersion: "108066390" uid: 4a59b47a-cb13-4ce1-b32b-35858f3f9e4b spec: allocateLoadBalancerNodePorts: true clusterIP: 10.233.18.180 clusterIPs:
Describe the bug
I add the
ingress-nginx
chart already installed in the k8s(187 days ago) toargocd
, all resources are synchronized, but the serviceingress-nginx-controller
with typeLoadBalancer
is in a progressing state because:waiting for healthy state of /Service/ingress-nginx-controller
.All the other apps with service type
ClusterIP
working normally.To Reproduce
Install chart ingress-nginx version: 4.7.2 with service.type LoadBalancer and add it to argocd
Expected behavior
all resources healthy and synchronized
Screenshots
Version argocd v2.8.4+c279299