-
Notifications
You must be signed in to change notification settings - Fork 84
[WIP] Add initial support for parentRefs #244
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rikatz The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
For now this is a WIP, I have added the flags only. If we agree with the syntax, I will apply the parentRefs on the *Route generation. Later we need to discuss about "not creating a Gateway" if a parentRef is specified (we can add a flag to disable it, so it wont be a breaking change) |
| providerSpecificFlags map[string]*string | ||
|
|
||
| // parentRefs indicates that the created *Route should contain a specific set | ||
| // of parentRefs. Its format should be as: --parentRefs=ns/name:sectionname:port=group/kind |
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.
not sure I understand the format.what is the double "=" for?
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.
like why we use both ":" and "=" as dividers? I understand the code and what it does but probably missing something on why we choose it.
also this would highly benefit from being a type by itself, I think.
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.
It would, do we support types on flags?
So, from the structure of the flag itself, I wanted to follow something that was "as easy as set just the name of the ref" (--parentRef=xpto) but as complex as "I need all of the other fields".
To be really honest, I don't like flags that start to have its own complexity to cover all of the edge cases (eg.: do we really want to add port? sectionName? etc) but also, how can we make it easier once we support ListenerSet to provide the proper conversion? I am open to ideas here
One last comment: this format of the flag was highly inspired on "kubectl create ingress" command, I just did inverted some parameters to make it easier to have something like --parentRefs=Ricardo=XListenerSet
What type of PR is this?
/kind feature
What this PR does / why we need it:
This change adds a feature to support adding parentRefs on Route resources. It is a new slice flag that can be used to establish parentRefs that should be added to converted resources.
This is still a WIP
Which issue(s) this PR fixes:
Part of #243
Does this PR introduce a user-facing change?: