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

Docs for Gateway API #1813

Merged
merged 10 commits into from
Dec 20, 2024
Merged

Docs for Gateway API #1813

merged 10 commits into from
Dec 20, 2024

Conversation

nelljerram
Copy link
Member

Product Version(s):

Issue:

Link to docs preview:

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

@nelljerram nelljerram requested a review from a team as a code owner December 13, 2024 17:47
Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for tigera failed. Why did it fail? →

Built without sensitive environment variables

Name Link
🔨 Latest commit e057c7f
🔍 Latest deploy log https://app.netlify.com/sites/tigera/deploys/67630600e8581e0008f0da07

Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit e057c7f
🔍 Latest deploy log https://app.netlify.com/sites/calico-docs-preview-next/deploys/67630600cea35a0009636da9
😎 Deploy Preview https://deploy-preview-1813--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 30
Accessibility: 90
Best Practices: 83
SEO: 92
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Shortly after this you will see that Gateway API resources are now available:

```bash
kubectl api-resources | grep gateway.networking.k8s.io
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be relying on the new tigerastatus instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point I'm more interested in showing that the CRDs have been installed. But certainly we could mention the "gatewayapi" tigerastatus object as well - would you like me to add that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think tigerastatus is a more useful thing to use. If it succeeds, then we know CRDs are installed. If not, it provides you useful troubleshooting information.


### Use the Gateway API

Now you can use the Gateway API in any way that the API supports. When configuring a Gateway resource, be sure to specify `gatewayClassName: tigera-gateway-class`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be calling it tigera-gateway? -class is redundant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do. But in this case I think the -class is helpful, on balance. There are so many things that are called "gateway": the API, the controller, the Gateway objects, and the GatewayClass. So here I think it's helpful to be more explicit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't add suffixes to any resource we create in the operator, like storage classes, deployments, services, ... I think we should be consistent in naming things.

- Once that pod is running, install `curl` in it:

```bash
kubectl exec -it test-client -- apt-get -y update
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we combine the lines and remote -it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a need to do that. I agree it's slightly annoying that everyone puts -it everywhere even when not needed, but it does no harm. (And I remember cases where -i is surprisingly needed. Not sure if this could be one of those.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confident that these don't need it.

Copy link
Member

@rene-dekker rene-dekker Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use https://hub.docker.com/r/alpine/curl image for this page to avoid apt update and installing curl.

-- update --
Never mind, I see you need jq


### Gateway API

The Gateway API is an official Kubernetes API for advanced routing to services in a cluster. To read about its use cases, structure and design, please see [the official docs](https://gateway-api.sigs.k8s.io/).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify which (minimum) gateway api version(s) we support? I imagine that there may be conflicts with api versions, for example the grant is at v1beta1 now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've added a table to show this.


- The output confirms that the request was handled by the echo server in namespace `ns1`:

```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be empty? Maybe if we expect an empty output, we can put it in text, rather than an empty code block? (I'm not even sure something will be rendered, the deploy preview didn't build unfortunately.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this was work-in-progress. It's filled in now.


- The output confirms that the request was handled by the echo server in namespace `ns2`:

```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be empty as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this was work-in-progress. It's filled in now.


| Resource | Versions |
| ---------------- | ----------------- |
| BackendLBPolicy | v1alpha2 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to ask if we should state a specific version of the gateway API we support and not document alpha and beta versions, so the list would just be

Gateway, GatewayClass, HTTPRoute and GRPCRoute to start. Which are v1.

But I guess we support all of the beta and alpha too via EnvoyGateway so there's no reason not to document that really, I can't think of any

Copy link
Member

@peterkellydev peterkellydev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

This naming and sidebar etc is fine while PM still decides on the naming.

I can see the sidebar being "Ingress Gateway" potentially (and positioned directly above / below "Egress Gateway" but we are waiting on PM to decide on what this feature is going to be called.

Because I now realize that this is intentionally a release time process, not
dev time.

This reverts commit 1b9c8be.
Comment on lines +216 to +221
- Once that pod is running, install `curl` in it:

```bash
kubectl exec -it test-client -- apt-get -y update
kubectl exec -it test-client -- apt-get -y install curl
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use an image that already has curl installed. I typically use wbitt/network-multitool for that kind of stuff (not sure if there are better alternatives).

@ctauchen
Copy link
Collaborator

Merging this now with plans to make improvements as discussed in coming weeks. Thanks for this, @nelljerram!

@ctauchen ctauchen merged commit 65378fe into tigera:main Dec 20, 2024
6 of 10 checks passed
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

Successfully merging this pull request may close these issues.

5 participants