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

"Waiting for controller" when creating gateway in release v0.3.0 #701

Closed
achim92 opened this issue May 31, 2023 · 3 comments
Closed

"Waiting for controller" when creating gateway in release v0.3.0 #701

achim92 opened this issue May 31, 2023 · 3 comments

Comments

@achim92
Copy link

achim92 commented May 31, 2023

Describe the bug
Creating a gateway ends up in "Waiting for controller" when using release v0.3.0.

To Reproduce
Steps to reproduce the behavior:

  1. Follow installation instructions for release v0.3.0: https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.3.0/docs/installation.md
  2. Create gateway like in example deployment manifest: https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.3.0/examples/cafe-example/gateway.yaml
  3. kubectl describe gateway gateway:
Name:         gateway
Namespace:    default
Labels:       domain=k8s-gateway.nginx.org
Annotations:  <none>
API Version:  gateway.networking.k8s.io/v1beta1
Kind:         Gateway
Metadata:
  Creation Timestamp:  2023-05-31T13:10:53Z
  Generation:          1
  Managed Fields:
    API Version:  gateway.networking.k8s.io/v1beta1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
        f:labels:
          .:
          f:domain:
      f:spec:
        .:
        f:gatewayClassName:
        f:listeners:
          .:
          k:{"name":"http"}:
            .:
            f:allowedRoutes:
              .:
              f:namespaces:
                .:
                f:from:
            f:name:
            f:port:
            f:protocol:
    Manager:      kubectl-client-side-apply
    Operation:    Update
    Time:         2023-05-31T13:10:53Z
    API Version:  gateway.networking.k8s.io/v1beta1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        f:conditions:
          k:{"type":"Accepted"}:
            f:reason:
          k:{"type":"Programmed"}:
            .:
            f:lastTransitionTime:
            f:message:
            f:reason:
            f:status:
            f:type:
        f:listeners:
          .:
          k:{"name":"http"}:
            .:
            f:attachedRoutes:
            f:conditions:
              .:
              k:{"type":"Accepted"}:
                .:
                f:lastTransitionTime:
                f:message:
                f:observedGeneration:
                f:reason:
                f:status:
                f:type:
              k:{"type":"Conflicted"}:
                .:
                f:lastTransitionTime:
                f:message:
                f:observedGeneration:
                f:status:
                f:type:
              k:{"type":"ResolvedRefs"}:
                .:
                f:lastTransitionTime:
                f:message:
                f:observedGeneration:
                f:reason:
                f:status:
                f:type:
            f:name:
            f:supportedKinds:
    Manager:         gateway
    Operation:       Update
    Subresource:     status
    Time:            2023-05-31T13:10:55Z
  UID:               a5dbf88a-55a7-47f0-987c-562e05ee576a
Spec:
  Gateway Class Name:  nginx
  Listeners:
    Allowed Routes:
      Namespaces:
        From:  Same
    Name:      http
    Port:      80
    Protocol:  HTTP
Status:
  Conditions:
    Last Transition Time:  1970-01-01T00:00:00Z
    Message:               Waiting for controller
    Reason:                Pending
    Status:                Unknown
    Type:                  Accepted
    Last Transition Time:  1970-01-01T00:00:00Z
    Message:               Waiting for controller
    Reason:                Pending
    Status:                Unknown
    Type:                  Programmed
  Listeners:
    Attached Routes:  0
    Conditions:
      Last Transition Time:  2023-05-31T13:10:55Z
      Message:               Listener is accepted
      Observed Generation:   1
      Reason:                Accepted
      Status:                True
      Type:                  Accepted
      Last Transition Time:  2023-05-31T13:10:55Z
      Message:               All references are resolved
      Observed Generation:   1
      Reason:                ResolvedRefs
      Status:                True
      Type:                  ResolvedRefs
      Last Transition Time:  2023-05-31T13:10:55Z
      Message:               No conflicts
      Observed Generation:   1
      Reason:                NoConflicts
      Status:                False
      Type:                  Conflicted
    Name:                    http
    Supported Kinds:
      Group:  gateway.networking.k8s.io
      Kind:   HTTPRoute
Events:       <none>

Expected behavior
Gateway is accepted:

Status:
  Addresses:
    Type:   IPAddress
    Value:  172.20.0.179
  Conditions:
    Last Transition Time:  2023-05-31T11:47:21Z
    Message:               Gateway is accepted
    Observed Generation:   1
    Reason:                Accepted
    Status:                True
    Type:                  Accepted

Your environment

  • Version of the NGINX Kubernetes Gateway - {"level":"info","ts":"2023-05-31T12:23:39Z","msg":"Starting NGINX Kubernetes Gateway","version":"0.3.0","commit":"288e58f0bd9b974959bedc8a1c3661c9d3b84f9b","date":"2023-04-24T19:00:25Z"}
  • Version of Kubernetes: v1.25.2
  • Kubernetes platform: individual setup
  • Details on how you expose the NGINX Gateway Pod: LoadBalancer
  • Logs of NGINX container:
2023/05/31 13:41:34 [notice] 14#14: reconfiguring
2023/05/31 13:41:34 [notice] 14#14: using the "epoll" event method
2023/05/31 13:41:34 [notice] 14#14: start worker processes
2023/05/31 13:41:34 [notice] 14#14: start worker process 33
2023/05/31 13:41:34 [notice] 31#31: gracefully shutting down
2023/05/31 13:41:34 [notice] 31#31: exiting
2023/05/31 13:41:34 [notice] 31#31: exit
2023/05/31 13:41:34 [notice] 14#14: signal 17 (SIGCHLD) received from 31
2023/05/31 13:41:34 [notice] 14#14: worker process 31 exited with code 0
2023/05/31 13:41:34 [notice] 14#14: signal 29 (SIGIO) received
  • NGINX Configuration:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# configuration file /etc/nginx/nginx.conf:
load_module /usr/lib/nginx/modules/ngx_http_js_module.so; events {}  pid /etc/nginx/nginx.pid; error_log stderr debug; http { include /etc/nginx/conf.d/*.conf; js_import /usr/lib/nginx/modules/njs/httpmatches.js; }

# configuration file /etc/nginx/conf.d/http.conf:


upstream invalid-backend-ref {
    random two least_conn;

    server unix:/var/lib/nginx/nginx-500-server.sock;

}




server {
        listen 80 default_server;

        default_type text/html;
        return 404;
}


server {
    listen unix:/var/lib/nginx/nginx-502-server.sock;
    access_log off;

    return 502;
}

server {
    listen unix:/var/lib/nginx/nginx-500-server.sock;
    access_log off;

    return 500;
}

Additional context
All working fine when using image ghcr.io/nginxinc/nginx-kubernetes-gateway:edge

@kate-osborn
Copy link
Contributor

Hi @achim92,

We recently merged #633, which sets the Accepted condition on the Gateway status. This will be a part of our next release (0.4.0).

@achim92
Copy link
Author

achim92 commented Jun 1, 2023

Thanks @kate-osborn.
Does it mean v0.3.0 is broken and I have to use main (edge) until release v0.4.0?
Or is there a workaround to get it running with v0.3.0?

@kate-osborn
Copy link
Contributor

@achim92 I wouldn't say that v0.3.0 is broken. Version 0.3.0 supports all the use cases in the examples directory. It can configure NGINX based on the Gateway and HTTPRoutes you have created, it just doesn't set the Accepted condition on the Gateway. So a Gateway can be "accepted" by the controller, but the controller just isn't reporting that status.

If you depend on the Accepted condition being set, then yes, you will have to use main until release v0.4.0.

We are still working on adding support for all the Gateway API fields, and as of today, we are not fully conformant to the API. In every release, we will add more support for the API. If you want to check our project's compatibility with the API, you can look at the Gateway API Compatibility document for a given release:

Edge: https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/docs/gateway-api-compatibility.md
v0.3.0: https://github.com/nginxinc/nginx-kubernetes-gateway/blob/release-0.3/docs/gateway-api-compatibility.md

@achim92 achim92 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants