-
Notifications
You must be signed in to change notification settings - Fork 830
fix(translator): Early status push for headless Service #5827
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
93ce309
fix(translator): if routingType=Service and Host is None, push status
ShinyaIshitobi ce548c3
test: TestValidateDestinationSettings, TestIsHeadlessService
ShinyaIshitobi 71fe196
Merge branch 'main' into validate-headless
ShinyaIshitobi 62adf31
fix: fix for linter
ShinyaIshitobi fab6bac
fix(translator): if routingType=Service and Host is None, push status
ShinyaIshitobi 8d32a39
test: TestValidateDestinationSettings, TestIsHeadlessService
ShinyaIshitobi 2a0ecf1
fix: fix for linter
ShinyaIshitobi f6c1c00
Merge branch 'main' into validate-headless
shawnh2 4c069f0
test: add headless service test with routingType=Endpoint
ShinyaIshitobi a8132fa
test: add headless service test with routingType=Service
ShinyaIshitobi 3730c63
test: rename file name and remove endpointSlices
ShinyaIshitobi 8693921
Merge branch 'validate-headless' of ssh://github.com/ShinyaIshitobi/g…
ShinyaIshitobi 5da1686
test: lastTransitionTime should be null
ShinyaIshitobi 0c308d7
chore: make gen-check
ShinyaIshitobi a1c6a94
Merge branch 'main' into validate-headless
ShinyaIshitobi bebc4c5
fix: add a
ShinyaIshitobi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
47 changes: 47 additions & 0 deletions
47
internal/gatewayapi/testdata/httproute-with-headless-service-endpoint-routing.in.yaml
This file contains hidden or 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,47 @@ | ||
| gateways: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| namespace: envoy-gateway | ||
| name: gateway-1 | ||
| spec: | ||
| gatewayClassName: envoy-gateway-class | ||
| listeners: | ||
| - name: http | ||
| protocol: HTTP | ||
| port: 80 | ||
| allowedRoutes: | ||
| namespaces: | ||
| from: All | ||
| httpRoutes: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| namespace: default | ||
| name: httproute-headless | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway-1 | ||
| namespace: envoy-gateway | ||
| rules: | ||
| - backendRefs: | ||
| - name: headless-service | ||
| port: 80 | ||
| services: | ||
| - apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| namespace: default | ||
| name: headless-service | ||
| spec: | ||
| clusterIP: None | ||
| ports: | ||
| - port: 80 | ||
| envoyProxyForGatewayClass: | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: EnvoyProxy | ||
| metadata: | ||
| name: default | ||
| namespace: default | ||
| spec: | ||
| routingType: Endpoint |
135 changes: 135 additions & 0 deletions
135
internal/gatewayapi/testdata/httproute-with-headless-service-endpoint-routing.out.yaml
This file contains hidden or 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,135 @@ | ||
| gateways: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: gateway-1 | ||
| namespace: envoy-gateway | ||
| spec: | ||
| gatewayClassName: envoy-gateway-class | ||
| listeners: | ||
| - allowedRoutes: | ||
| namespaces: | ||
| from: All | ||
| name: http | ||
| port: 80 | ||
| protocol: HTTP | ||
| status: | ||
| listeners: | ||
| - attachedRoutes: 1 | ||
| conditions: | ||
| - lastTransitionTime: null | ||
| message: Sending translated listener configuration to the data plane | ||
| reason: Programmed | ||
| status: "True" | ||
| type: Programmed | ||
| - lastTransitionTime: null | ||
| message: Listener has been successfully translated | ||
| reason: Accepted | ||
| status: "True" | ||
| type: Accepted | ||
| - lastTransitionTime: null | ||
| message: Listener references have been resolved | ||
| reason: ResolvedRefs | ||
| status: "True" | ||
| type: ResolvedRefs | ||
| name: http | ||
| supportedKinds: | ||
| - group: gateway.networking.k8s.io | ||
| kind: HTTPRoute | ||
| - group: gateway.networking.k8s.io | ||
| kind: GRPCRoute | ||
| httpRoutes: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: httproute-headless | ||
| namespace: default | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway-1 | ||
| namespace: envoy-gateway | ||
| rules: | ||
| - backendRefs: | ||
| - name: headless-service | ||
| port: 80 | ||
| status: | ||
| parents: | ||
| - conditions: | ||
| - lastTransitionTime: null | ||
| message: Route is accepted | ||
| reason: Accepted | ||
| status: "True" | ||
| type: Accepted | ||
| - lastTransitionTime: null | ||
| message: Resolved all the Object references for the Route | ||
| reason: ResolvedRefs | ||
| status: "True" | ||
| type: ResolvedRefs | ||
| controllerName: gateway.envoyproxy.io/gatewayclass-controller | ||
| parentRef: | ||
| name: gateway-1 | ||
| namespace: envoy-gateway | ||
| infraIR: | ||
| envoy-gateway/gateway-1: | ||
| proxy: | ||
| config: | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: EnvoyProxy | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: default | ||
| namespace: default | ||
| spec: | ||
| logging: {} | ||
| routingType: Endpoint | ||
| status: {} | ||
| listeners: | ||
| - address: null | ||
| name: envoy-gateway/gateway-1/http | ||
| ports: | ||
| - containerPort: 10080 | ||
| name: http-80 | ||
| protocol: HTTP | ||
| servicePort: 80 | ||
| metadata: | ||
| labels: | ||
| gateway.envoyproxy.io/owning-gateway-name: gateway-1 | ||
| gateway.envoyproxy.io/owning-gateway-namespace: envoy-gateway | ||
| name: envoy-gateway/gateway-1 | ||
| xdsIR: | ||
| envoy-gateway/gateway-1: | ||
| accessLog: | ||
| json: | ||
| - path: /dev/stdout | ||
| http: | ||
| - address: 0.0.0.0 | ||
| hostnames: | ||
| - '*' | ||
| isHTTP2: false | ||
| metadata: | ||
| kind: Gateway | ||
| name: gateway-1 | ||
| namespace: envoy-gateway | ||
| sectionName: http | ||
| name: envoy-gateway/gateway-1/http | ||
| path: | ||
| escapedSlashesAction: UnescapeAndRedirect | ||
| mergeSlashes: true | ||
| port: 10080 | ||
| routes: | ||
| - directResponse: | ||
| statusCode: 500 | ||
| hostname: '*' | ||
| isHTTP2: false | ||
| metadata: | ||
| kind: HTTPRoute | ||
| name: httproute-headless | ||
| namespace: default | ||
| name: httproute/default/httproute-headless/rule/0/match/-1/* | ||
| readyListener: | ||
| address: 0.0.0.0 | ||
| ipFamily: IPv4 | ||
| path: /ready | ||
| port: 19003 |
47 changes: 47 additions & 0 deletions
47
internal/gatewayapi/testdata/httproute-with-headless-service-service-routing.in.yaml
This file contains hidden or 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,47 @@ | ||
| gateways: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| namespace: envoy-gateway | ||
| name: gateway-1 | ||
| spec: | ||
| gatewayClassName: envoy-gateway-class | ||
| listeners: | ||
| - name: http | ||
| protocol: HTTP | ||
| port: 80 | ||
| allowedRoutes: | ||
| namespaces: | ||
| from: All | ||
| httpRoutes: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| namespace: default | ||
| name: httproute-headless | ||
| spec: | ||
| parentRefs: | ||
| - name: gateway-1 | ||
| namespace: envoy-gateway | ||
| rules: | ||
| - backendRefs: | ||
| - name: headless-service | ||
| port: 80 | ||
| services: | ||
| - apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| namespace: default | ||
| name: headless-service | ||
| spec: | ||
| clusterIP: None | ||
| ports: | ||
| - port: 80 | ||
| envoyProxyForGatewayClass: | ||
| apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: EnvoyProxy | ||
| metadata: | ||
| name: default | ||
| namespace: default | ||
| spec: | ||
| routingType: Service |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bebc4c5