-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.15] gateway-api: fix an issue causing Informers to fail (#41297)
* gateway-api: fix an issue causing Informers to fail This picks up kubernetes-sigs/gateway-api#1439. Unfortunately we need to fork since the main branch in gateway-api has diverged too much. * Fix note as well * Fix unit tests
- Loading branch information
1 parent
bf9342d
commit 7b2c7de
Showing
10 changed files
with
411 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
pilot/pkg/config/kube/gateway/testdata/deployment/alpha-cluster-ip.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| annotations: | ||
| networking.istio.io/service-type: ClusterIP | ||
| labels: | ||
| gateway.istio.io/managed: istio.io-gateway-controller | ||
| name: default | ||
| namespace: default | ||
| ownerReferences: | ||
| - apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| name: default | ||
| uid: null | ||
| spec: | ||
| ports: | ||
| - name: status-port | ||
| port: 15021 | ||
| protocol: TCP | ||
| - name: http | ||
| port: 80 | ||
| protocol: TCP | ||
| selector: | ||
| istio.io/gateway-name: default | ||
| type: ClusterIP | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| annotations: | ||
| networking.istio.io/service-type: ClusterIP | ||
| labels: | ||
| gateway.istio.io/managed: istio.io-gateway-controller | ||
| name: default | ||
| namespace: default | ||
| ownerReferences: | ||
| - apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| name: default | ||
| uid: null | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| istio.io/gateway-name: default | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| inject.istio.io/templates: gateway | ||
| networking.istio.io/service-type: ClusterIP | ||
| labels: | ||
| istio.io/gateway-name: default | ||
| sidecar.istio.io/inject: "true" | ||
| spec: | ||
| containers: | ||
| - image: auto | ||
| name: istio-proxy | ||
| ports: | ||
| - containerPort: 15021 | ||
| name: status-port | ||
| protocol: TCP | ||
| readinessProbe: | ||
| failureThreshold: 10 | ||
| httpGet: | ||
| path: /healthz/ready | ||
| port: 15021 | ||
| scheme: HTTP | ||
| periodSeconds: 2 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 2 | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| privileged: false | ||
| readOnlyRootFilesystem: true | ||
| runAsGroup: 1337 | ||
| runAsNonRoot: true | ||
| runAsUser: 1337 | ||
| securityContext: | ||
| sysctls: | ||
| - name: net.ipv4.ip_unprivileged_port_start | ||
| value: "0" | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: default | ||
| namespace: default | ||
| spec: | ||
| gatewayClassName: "" | ||
| listeners: null | ||
| status: | ||
| conditions: | ||
| - lastTransitionTime: fake | ||
| message: Deployed gateway to the cluster | ||
| reason: ResourcesAvailable | ||
| status: "True" | ||
| type: Scheduled | ||
| --- |
96 changes: 96 additions & 0 deletions
96
pilot/pkg/config/kube/gateway/testdata/deployment/alpha-manual-ip.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| annotations: {} | ||
| labels: | ||
| gateway.istio.io/managed: istio.io-gateway-controller | ||
| name: default | ||
| namespace: default | ||
| ownerReferences: | ||
| - apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| name: default | ||
| uid: null | ||
| spec: | ||
| loadBalancerIP: 1.2.3.4 | ||
| ports: | ||
| - name: status-port | ||
| port: 15021 | ||
| protocol: TCP | ||
| selector: | ||
| istio.io/gateway-name: default | ||
| type: LoadBalancer | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| annotations: {} | ||
| labels: | ||
| gateway.istio.io/managed: istio.io-gateway-controller | ||
| name: default | ||
| namespace: default | ||
| ownerReferences: | ||
| - apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| name: default | ||
| uid: null | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| istio.io/gateway-name: default | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| inject.istio.io/templates: gateway | ||
| labels: | ||
| istio.io/gateway-name: default | ||
| sidecar.istio.io/inject: "true" | ||
| spec: | ||
| containers: | ||
| - image: auto | ||
| name: istio-proxy | ||
| ports: | ||
| - containerPort: 15021 | ||
| name: status-port | ||
| protocol: TCP | ||
| readinessProbe: | ||
| failureThreshold: 10 | ||
| httpGet: | ||
| path: /healthz/ready | ||
| port: 15021 | ||
| scheme: HTTP | ||
| periodSeconds: 2 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 2 | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| privileged: false | ||
| readOnlyRootFilesystem: true | ||
| runAsGroup: 1337 | ||
| runAsNonRoot: true | ||
| runAsUser: 1337 | ||
| securityContext: | ||
| sysctls: | ||
| - name: net.ipv4.ip_unprivileged_port_start | ||
| value: "0" | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: default | ||
| namespace: default | ||
| spec: | ||
| gatewayClassName: "" | ||
| listeners: null | ||
| status: | ||
| conditions: | ||
| - lastTransitionTime: fake | ||
| message: Deployed gateway to the cluster | ||
| reason: ResourcesAvailable | ||
| status: "True" | ||
| type: Scheduled | ||
| --- |
104 changes: 104 additions & 0 deletions
104
pilot/pkg/config/kube/gateway/testdata/deployment/alpha-multinetwork.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| annotations: {} | ||
| labels: | ||
| gateway.istio.io/managed: istio.io-gateway-controller | ||
| topology.istio.io/network: network-1 | ||
| name: default | ||
| namespace: default | ||
| ownerReferences: | ||
| - apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| name: default | ||
| uid: null | ||
| spec: | ||
| ports: | ||
| - name: status-port | ||
| port: 15021 | ||
| protocol: TCP | ||
| - name: http | ||
| port: 80 | ||
| protocol: TCP | ||
| selector: | ||
| istio.io/gateway-name: default | ||
| type: LoadBalancer | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| annotations: {} | ||
| labels: | ||
| gateway.istio.io/managed: istio.io-gateway-controller | ||
| topology.istio.io/network: network-1 | ||
| name: default | ||
| namespace: default | ||
| ownerReferences: | ||
| - apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| name: default | ||
| uid: null | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| istio.io/gateway-name: default | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| inject.istio.io/templates: gateway | ||
| labels: | ||
| istio.io/gateway-name: default | ||
| sidecar.istio.io/inject: "true" | ||
| topology.istio.io/network: network-1 | ||
| spec: | ||
| containers: | ||
| - env: | ||
| - name: ISTIO_META_REQUESTED_NETWORK_VIEW | ||
| value: network-1 | ||
| image: auto | ||
| name: istio-proxy | ||
| ports: | ||
| - containerPort: 15021 | ||
| name: status-port | ||
| protocol: TCP | ||
| readinessProbe: | ||
| failureThreshold: 10 | ||
| httpGet: | ||
| path: /healthz/ready | ||
| port: 15021 | ||
| scheme: HTTP | ||
| periodSeconds: 2 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 2 | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| privileged: false | ||
| readOnlyRootFilesystem: true | ||
| runAsGroup: 1337 | ||
| runAsNonRoot: true | ||
| runAsUser: 1337 | ||
| securityContext: | ||
| sysctls: | ||
| - name: net.ipv4.ip_unprivileged_port_start | ||
| value: "0" | ||
| --- | ||
| apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
| kind: Gateway | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: default | ||
| namespace: default | ||
| spec: | ||
| gatewayClassName: "" | ||
| listeners: null | ||
| status: | ||
| conditions: | ||
| - lastTransitionTime: fake | ||
| message: Deployed gateway to the cluster | ||
| reason: ResourcesAvailable | ||
| status: "True" | ||
| type: Scheduled | ||
| --- |
Oops, something went wrong.