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

Status progressing when status.loadbalancer.ingress is non empty and does not have Hostname OR IP #997

Closed
peterbosalliandercom opened this issue Jan 9, 2019 · 13 comments

Comments

@peterbosalliandercom
Copy link

argocd app get grafana
Name:               grafana
Server:             https://k8s-api.test.appx.cloud
Namespace:          test-ops
URL:                https://localhost:8080/applications/grafana
Repo:               https://github.com/helm/charts.git
Target:
Path:               stable/grafana
Helm Values:        http://github-raw-content-service.demo:8080/k8s-test-cluster-config?filepath=grafana/helm-config.yaml
Sync Policy:        <none>
Sync Status:        Synced to  (722b19a)
Health Status:      Progressing

GROUP                      KIND                NAMESPACE  NAME                        STATUS  HEALTH
extensions                 PodSecurityPolicy   test-ops   grafana                     Synced  Healthy
                           Secret              test-ops   grafana                     Synced  Healthy
                           ConfigMap           test-ops   grafana                     Synced  Healthy
                           ServiceAccount      test-ops   grafana                     Synced  Healthy
rbac.authorization.k8s.io  ClusterRole         test-ops   grafana-clusterrole         Synced  Healthy
rbac.authorization.k8s.io  ClusterRoleBinding  test-ops   grafana-clusterrolebinding  Synced  Healthy
rbac.authorization.k8s.io  Role                test-ops   grafana                     Synced  Healthy
rbac.authorization.k8s.io  RoleBinding         test-ops   grafana                     Synced  Healthy
                           Service             test-ops   grafana                     Synced  Healthy
apps                       Deployment          test-ops   grafana                     Synced  Healthy
extensions                 Ingress             test-ops   grafana                     Synced  Progressing

Similarly, the ingress for grafana is likely empty for status.loadBalancer.ingress, so we consider this not healthy.

See:
https://github.com/argoproj/argo-cd/blob/master/docs/health.md

In our situation this status.loadBalancer.ingress is

status:
loadBalancer:
ingress:
- {}
For us this is a valid state, we do not have a hostname or IP in that field maybe thats the reason?

We do not use a loadbalancer so it is empty. I think this problem needs to be fixed right?

@k8sedu
Copy link

k8sedu commented Jan 9, 2019

ingress not update it. if u use traefik and version above 1.7, it has config.

@jessesuen
Copy link
Member

jessesuen commented Jan 10, 2019

For us this is a valid state. We do not use a loadbalancer so it is empty. I think this problem needs to be fixed right?

@peterbosalliandercom - which ingress controller are you running? Do you mind also providing the ingress object YAML? So far I know of the following ingress controllers which have issues with setting status. I would like to understand the logic & behavior of other problematic controllers as well.

If your controller cannot be configured in a way that it updates status.loadBalancer.ingress, then I think the following workaround can be done, where Ingress objects are deployed using a placeholder value for status.loadBalancer.ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
spec:
  rules:
  - http:
      paths:
      - path: /testpath
        backend:
          serviceName: test
          servicePort: 80
status:
  loadBalancer:
    ingress:
    - hostname: placeholder

The other point is that we will be implementing #911 (comment) which will allow users the ability to override our built-in health assessments, including the ingress health assessment.

BTW, the Ingress health assessment logic is in-line with what is being proposed with sig-apps: kubernetes-sigs/application#78

@peterbosalliandercom
Copy link
Author

@peterbosalliandercom
Copy link
Author

Hereby an example ingress object Yaml file:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  generation: 1
  labels:
    app: grafana
    app.kubernetes.io/instance: grafana
    chart: grafana-1.12.0
    heritage: Tiller
    release: grafana
  name: grafana
  namespace: test-ops
spec:
  rules:
  - host: xxxx
    http:
      paths:
      - backend:
          serviceName: grafana
          servicePort: 80
        path: /
  tls:
  - hosts:
    - xxxx
    secretName: xxxx
status:
  loadBalancer:
    ingress:
    - {}

@lcostea
Copy link
Member

lcostea commented Jan 11, 2019


Later edit: Please disregard this, it seems we have a problem with the kong ingress controller, it wasn't deployed correctly


The same thing happens for kong ingress
Here is the ingress yaml which remains in Progressing status

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{},"labels":{"app.kubernetes.io/instance":"po-xx"},"name":"po-xx-xxxx","namespace":"xxxx"},"spec":{"rules":[{"host":"*.dev.x.x.x","http":{"paths":[{"backend":{"serviceName":"po-xx-xxxx","servicePort":80},"path":"/api/v1/xxxxxxx[/]?$"}]}}]}}
  creationTimestamp: 2019-01-11T14:45:22Z
  generation: 1
  labels:
    app.kubernetes.io/instance: po-xx
  name: po-xx-xxxx
  namespace: xxxx
  resourceVersion: "11513131"
  selfLink: /apis/extensions/v1beta1/namespaces/xxxx/ingresses/po-xx-xxxx
  uid: 863e8068-15af-11e9-91f1-02fd02d95eb8
spec:
  rules:
  - host: '*.dev.x.x.x'
    http:
      paths:
      - backend:
          serviceName: po-xx-xxxx
          servicePort: 80
        path: /api/v1/xxxxxxx[/]?$
status:
  loadBalancer: {}

@peterbosalliandercom
Copy link
Author

BTW, the Ingress health assessment logic is in-line with what is being proposed with sig-apps: kubernetes-sigs/application#78
<

According to above it should be non empty and thats exactly what it is. The list is non empty. Shouldn't it be correct that way?

@jessesuen
Copy link
Member

According to above it should be non empty and thats exactly what it is. The list is non empty. Shouldn't it be correct that way?

I think you're right. I think we may have interpreted this incorrectly. I think the correct behavior should be:

Progressing:

status:
  loadBalancer: {}

Healthy:

status:
  loadBalancer:
    ingress:
    - {}

@peterbosalliandercom
Copy link
Author

Thank you for the reponse.

@bnouvelbmll
Copy link

Was kubernetes-sigs/application#78 approved ? It would be nice to have the status "not continously progressing " when not using "load-balancers" it seems "load-balancers" in the concept of k8s (which are always assumed to come from cloud-provider) and ingress are slightly different concepts, and that one is possible without the other.

@jessesuen
Copy link
Member

jessesuen commented Sep 2, 2019 via email

@AndreLouisCaron
Copy link

@lcostea I also have this issue with the Kong ingress controller. Do you happen to remember what was not deployed correctly?

@prateekkhera92
Copy link

prateekkhera92 commented Jun 9, 2021

@jessesuen - I wrote below to exlude my service, but its not working :/

    core/v1/Service:
        health.lua: |
          hs = {}
          hs.status = "Healthy"
          return hs

bukowa added a commit to bukowa/k8start that referenced this issue Oct 6, 2022
bukowa added a commit to bukowa/k8start that referenced this issue Oct 6, 2022
…nx controller argoproj/argo-cd#997"

This reverts commit 126a498.

Signed-off-by: bukowa <gitbukowa@gmail.com>
@robotjoosen
Copy link

Was running into the same things, but your path for the service is incorrect.

As described in the docs, you need to use group/kind. The group for Service is empty, so instead of core/v1/Service: you just need to do Service:.

Service:
  health.lua: |
    hs = {}
    hs.status = "Healthy"
    return hs

@jessesuen - I wrote below to exlude my service, but its not working :/

   core/v1/Service:
        health.lua: |
          hs = {}
          hs.status = "Healthy"
          return hs

SangYunLeee added a commit to SangYunLeee/argocd-enttolog that referenced this issue Sep 13, 2023
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

8 participants