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

Add NEG CRD definition #1154

Merged
merged 2 commits into from
Jun 26, 2020
Merged

Conversation

swetharepakula
Copy link
Member

NEG CRD is needed to enabled custom named negs. This CRD also exposes more information about the status of the NEG to users.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 12, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @swetharepakula!

It looks like this is your first PR to kubernetes/ingress-gce 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/ingress-gce has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @swetharepakula. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 12, 2020
@k8s-ci-robot k8s-ci-robot requested review from bowei and rramkumar1 June 12, 2020 19:09
@freehan
Copy link
Contributor

freehan commented Jun 12, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 12, 2020
@thockin
Copy link
Member

thockin commented Jun 12, 2020

I assume you tagged me for API review?

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

Overall this is pretty straight-forward from API POV

pkg/apis/servicenetworkendpointgroup/v1beta1/types.go Outdated Show resolved Hide resolved
pkg/apis/servicenetworkendpointgroup/v1beta1/types.go Outdated Show resolved Hide resolved
type NetworkEndpointType string

const (
VmIpPortEndpointType = NetworkEndpointType("GCE_VM_IP_PORT")
Copy link
Member

Choose a reason for hiding this comment

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

Decision - should we keep the GCP CONST_STYLE_NAMES or adopt K8s ConstStyleNames (and convert to/from) ?

K8s style would be my preference, but it's a weak preference

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 notice that we use the same constants in the neg types (https://github.com/kubernetes/ingress-gce/blob/master/pkg/neg/types/types.go#L38-L40). That leads me to use GCP style constants for consistency, but I don't have a strong preference either.

Copy link
Member

Choose a reason for hiding this comment

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

If we already published them, should we just be re-using the same consts?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I agree. @freehan and I had that discussion. Our plan is to migrate the other package to depend on these constants in a followup PR.

pkg/apis/servicenetworkendpointgroup/v1beta1/types.go Outdated Show resolved Hide resolved
@thockin
Copy link
Member

thockin commented Jun 12, 2020 via email

@thockin
Copy link
Member

thockin commented Jun 13, 2020 via email

@swetharepakula swetharepakula force-pushed the neg-crd branch 3 times, most recently from 44bdd70 to 445e19f Compare June 15, 2020 21:41
Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

API LGTM

pkg/apis/servicenetworkendpointgroup/v1beta1/types.go Outdated Show resolved Hide resolved
type NetworkEndpointType string

const (
VmIpPortEndpointType = NetworkEndpointType("GCE_VM_IP_PORT")
Copy link
Member

Choose a reason for hiding this comment

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

If we already published them, should we just be re-using the same consts?

@swetharepakula swetharepakula force-pushed the neg-crd branch 2 times, most recently from 7db45a3 to 05adde2 Compare June 18, 2020 22:36
@bowei
Copy link
Member

bowei commented Jun 18, 2020

/assign

@swetharepakula swetharepakula force-pushed the neg-crd branch 2 times, most recently from 7b141cd to 4f1e4d9 Compare June 19, 2020 00:12
@swetharepakula
Copy link
Member Author

I have addressed the comments given so far. I think this PR is ready for another round of reviews. Thanks!

@freehan
Copy link
Contributor

freehan commented Jun 24, 2020

LGTM. Leaving @bowei for final approval

@swetharepakula swetharepakula requested a review from bowei June 25, 2020 18:10
Copy link
Member

@bowei bowei left a comment

Choose a reason for hiding this comment

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

/approve

LGTM -- minor things

limitations under the License.
*/

package servicenetworkendpointgroup
Copy link
Member

Choose a reason for hiding this comment

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

yikes this is super long -- I'm assuming this is autogenerated.

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 think we can change the package name. However, the CRD will be ServiceNetworkEndpointGroup, so I kept this package name to stay consistent. We could drop the Service prefix.

pkg/apis/servicenetworkendpointgroup/v1beta1/types.go Outdated Show resolved Hide resolved
pkg/apis/servicenetworkendpointgroup/v1beta1/types.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2020
@swetharepakula swetharepakula force-pushed the neg-crd branch 2 times, most recently from f02dcdb to 8cee965 Compare June 26, 2020 21:32
Copy link
Contributor

@freehan freehan left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2020
@freehan
Copy link
Contributor

freehan commented Jun 26, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bowei, freehan, swetharepakula

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 1265e68 into kubernetes:master Jun 26, 2020
@swetharepakula swetharepakula deleted the neg-crd branch July 29, 2020 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants