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 Kourier LoadBalancerIP Config #1343

Merged
merged 6 commits into from
Sep 12, 2023
Merged

Add Kourier LoadBalancerIP Config #1343

merged 6 commits into from
Sep 12, 2023

Conversation

theomessin
Copy link
Contributor

@theomessin theomessin commented Feb 21, 2023

Fixes #1290

Proposed Changes

  • Adds new service-load-balancer-ip config for the Kourier Gateway.
  • This sets Kourier's Service loadBalancerIP to the configured value.
  • Several Cloud Providers use this setting to specify the IP address that a service gets assigned:

Some cloud providers allow you to specify the loadBalancerIP. In those cases, the load-balancer is created with the user-specified loadBalancerIP. If the loadBalancerIP field is not specified, the loadBalancer is set up with an ephemeral IP address. If you specify a loadBalancerIP but your cloud provider does not support the feature, the loadbalancerIP field that you set is ignored.

Release Note

NONE

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 21, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@knative-prow
Copy link

knative-prow bot commented Feb 21, 2023

Welcome @theomessin! It looks like this is your first PR to knative/operator 🎉

@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 21, 2023
@knative-prow
Copy link

knative-prow bot commented Feb 21, 2023

Hi @theomessin. Thanks for your PR.

I'm waiting for a knative 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.

@knative-prow knative-prow bot requested review from aliok and matzew February 21, 2023 11:12
Copy link

@knative-prow knative-prow bot left a comment

Choose a reason for hiding this comment

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

@theomessin: 0 warnings.

In response to this:

Fixes #1290

Proposed Changes

  • Adds new service-loadBalancerIP config for the Kourier Gateway.
  • This sets Kourier's Service loadBalancerIP to the configured value.
  • Several Cloud Providers use this setting to specify the IP address that a service gets assigned:

Some cloud providers allow you to specify the loadBalancerIP. In those cases, the load-balancer is created with the user-specified loadBalancerIP. If the loadBalancerIP field is not specified, the loadBalancer is set up with an ephemeral IP address. If you specify a loadBalancerIP but your cloud provider does not support the feature, the loadbalancerIP field that you set is ignored.

Release Note

NONE

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.

@nak3
Copy link
Contributor

nak3 commented Mar 1, 2023

/ok-to-test

@knative-prow knative-prow bot 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 Mar 1, 2023
Copy link
Contributor

@nak3 nak3 left a comment

Choose a reason for hiding this comment

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

Thank you for this PR @theomessin

But I realized that the LoadBalancerIP field has been deprecated in k8s 1.24. Is it possible to ask your cloud provider to support the annotation as suggested in the change log?

https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md#deprecation

Deprecated Service.Spec.LoadBalancerIP. This field was under-specified and its meaning varies across implementations. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version.

@theomessin
Copy link
Contributor Author

theomessin commented Mar 3, 2023

Hi @nak3. Yes, it has been marked as deprecated. We're using Google Kubernetes Engine and as far as I can tell they haven't implemented any alternatives as of yet. They still recommend we use loadBalancerIP [1].

Deprecated Service.Spec.LoadBalancerIP. This field was under-specified and its meaning varies across implementations. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version.

The field is still available and since there aren't any implementation-specific annotations when available I'd say the best thing to do is still add this in the operator. I think GCP is a pretty important cloud provider and we have no power over Google 🤷🏼

[1] https://cloud.google.com/kubernetes-engine/docs/concepts/service-load-balancer-parameters#spd-static-ip

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 17, 2023
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 25, 2023
@theomessin theomessin requested a review from nak3 May 25, 2023 23:15
@theomessin
Copy link
Contributor Author

@nak3 any update on this?

Copy link
Contributor

@nak3 nak3 left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM except for one comment.

config/crd/bases/operator.knative.dev_knativeservings.yaml Outdated Show resolved Hide resolved
@nak3
Copy link
Contributor

nak3 commented Jun 13, 2023

/lgtm
/approve

/assign @houshengbo
Thank you! I think I don't have a permission to merge this so defer to @houshengbo

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2023
@nak3
Copy link
Contributor

nak3 commented Jun 23, 2023

bump @houshengbo
/cc @dprotaso @psschwei

@knative-prow knative-prow bot requested review from dprotaso and psschwei June 23, 2023 01:04
@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Patch coverage: 82.35% and project coverage change: +0.02% 🎉

Comparison is base (1a2ae4b) 79.25% compared to head (38b3609) 79.28%.

❗ Current head 38b3609 differs from pull request most recent head 6b0d948. Consider uploading reports for the commit 6b0d948 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1343      +/-   ##
==========================================
+ Coverage   79.25%   79.28%   +0.02%     
==========================================
  Files          40       40              
  Lines        1822     1810      -12     
==========================================
- Hits         1444     1435       -9     
+ Misses        275      273       -2     
+ Partials      103      102       -1     
Files Changed Coverage Δ
pkg/reconciler/knativeserving/ingress/kourier.go 79.72% <82.35%> (+0.65%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@theomessin
Copy link
Contributor Author

Are we only waiting on the lint failing? The error message doesn't mean anything to me...

Running [/home/runner/golangci-lint-1.52.0-linux-amd64/golangci-lint run --out-format=github-actions --new-from-patch=/tmp/tmp-1720-r08HIklCaYvx/pull.patch --new=false --new-from-rev= --go=1.20] in [] ...
  Error: unnecessary conversion (unconvert)

@theomessin
Copy link
Contributor Author

@nak3 @houshengbo

@nak3
Copy link
Contributor

nak3 commented Aug 23, 2023

As I commented #1343 (comment), I don't have a power to approve PR.

@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2023
@nak3
Copy link
Contributor

nak3 commented Aug 25, 2023

/lgtm
/approve

(again I think I don't have a power to merge..)

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 25, 2023
Copy link
Contributor

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

I don't know the operator but trust @nak3 's judgment
/approve
/hold
In case @houshengbo wants to weigh in, but feel free to unhold in a day or two

@knative-prow knative-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 25, 2023
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 29, 2023
@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 11, 2023
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 11, 2023
@theomessin
Copy link
Contributor Author

/retest

@theomessin
Copy link
Contributor Author

@nak3 @psschwei @houshengbo Can we please get this merged? The longer it sits the more work I have to keep doing to resolve conflicts every time main changes...

@nak3
Copy link
Contributor

nak3 commented Sep 12, 2023

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 12, 2023
@knative-prow
Copy link

knative-prow bot commented Sep 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nak3, psschwei, theomessin

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

@nak3
Copy link
Contributor

nak3 commented Sep 12, 2023

/hold cancel

@knative-prow knative-prow bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 12, 2023
@knative-prow knative-prow bot merged commit c42751f into knative:main Sep 12, 2023
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. lgtm 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specify Kourier Load Balancer IP
5 participants