gateway-api
gateway-api copied to clipboard
Create utils to make it easier to work with custom types
What would you like to be added:
Helper funcs that help with type conversion, especially from and to pointers, for our custom types. Examples of these types include Hostname, Namespace, and Group.
Why this is needed: To simplify CRD validation, we've created a lot of custom types. Unfortunately this makes it difficult to work with our APIs with go. It would be very helpful if we had some utils that made this easier to work with. Otherwise each implementation will likely end up implementing their own set of these.
Want to make sure I understand you right. Are you referring to something like?
func NamespacePtr(ns string) *gwapi.Namespace
func Namespace(ns string) gwapi.Namespace
@hbagdi yep, thanks for adding the examples!
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
:+1:, see https://github.com/projectcontour/contour/blob/main/internal/gatewayapi/helpers.go for some examples of what we've needed for the Contour implementation. Would love to see these upstreamed.
That's a great set of helpers! I think I've seen similar helpers in at least the Istio code base, @howardjohn is there much overlap here? Agree that it would be great to move any broadly shared code into Gateway.
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
ping @howardjohn, what do you think about upstreaming some helpers like the Contour ones above?
/good-first-issue
@bowei: This request has been marked as suitable for new contributors.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.
In response to this:
/good-first-issue
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten /lifecycle frozen
This is still a reasonably good first issue, as described in Rob's initial comment.
/assign
Hey @abhijit-dev82 just checking in, everything going good with this one? Is there anything we can do to support/help?
HI @shaneutt I had dropped a message on slack to @robscott asking for some pointers . Will cover the below list of custom types to start off with. Please let me know if I have missed out on any.
Hostname Namespace Kind Group SectionName PortNumber PreciseHostname ObjectName GatewayController