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

Gateways never become ready/programmed when running daemonset EnvoyProxy #4416

Closed
jukie opened this issue Oct 9, 2024 · 1 comment · Fixed by #4429
Closed

Gateways never become ready/programmed when running daemonset EnvoyProxy #4416

jukie opened this issue Oct 9, 2024 · 1 comment · Fixed by #4429
Assignees
Labels
area/provider kind/bug Something isn't working
Milestone

Comments

@jukie
Copy link
Contributor

jukie commented Oct 9, 2024

Description:

What issue is being seen? Describe what should be happening instead of
the bug, for example: Envoy should not crash, the expected value isn't
returned, etc.

I'm trying to run envoy proxy as a daemonset which was implemented with #3092.
I think the cause of this bug is

if deployment == nil || deployment.Status.AvailableReplicas == 0 {
gw.Status.Conditions = MergeConditions(gw.Status.Conditions,
newCondition(string(gwapiv1.GatewayConditionProgrammed), metav1.ConditionFalse, string(gwapiv1.GatewayReasonNoResources),
messageNoResources, time.Now(), gw.Generation))
return
}
and doing a lookup on deployment vs daemonset.

Repro steps:

Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.

Use the below configuration with an EnvoyProxy to trigger using a daemonset:

apiVersion: gateway.envoyproxy.io/v1alpha1
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
  name: custom-proxy-config
  namespace: envoy-gateway-system
spec:
  mergeGateways: true
  provider:
    type: Kubernetes
    kubernetes:
      envoyDaemonSet:
        strategy:
          type: RollingUpdate
---
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
  name: eg
spec:
  controllerName: gateway.envoyproxy.io/gatewayclass-controller
  parametersRef:
    group: gateway.envoyproxy.io
    kind: EnvoyProxy
    name: custom-proxy-config
    namespace: envoy-gateway-system
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: eg
  namespace: gateway-demo
spec:
  gatewayClassName: eg
  listeners:
    - name: http
      protocol: HTTP
      port: 80

Then the programmed status will always show as false even though the gateway is actually functional:

Status:
  Conditions:
    Last Transition Time:  2024-10-09T16:12:58Z
    Message:               Deployment replicas unavailable
    Observed Generation:   1
    Reason:                NoResources
    Status:                False
    Type:                  Programmed

Note: If there are privacy concerns, sanitize the data prior to
sharing.

Environment:

Include the environment like gateway version, envoy version and so on.

Logs:

Include the access logs and the Envoy logs.

@jukie jukie added the triage label Oct 9, 2024
@zirain zirain self-assigned this Oct 10, 2024
@zirain
Copy link
Contributor

zirain commented Oct 10, 2024

let me take a look

@arkodg arkodg added the kind/bug Something isn't working label Oct 10, 2024
@arkodg arkodg added this to the v1.2.0-rc1 milestone Oct 10, 2024
@zirain zirain assigned jukie and unassigned zirain Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants