Skip to content

add COIP support for ALB on outpost #1685

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

Merged
merged 2 commits into from
Nov 25, 2020
Merged

Conversation

M00nF1sh
Copy link
Collaborator

@M00nF1sh M00nF1sh commented Nov 24, 2020

add COIP support for ALB on outpost

This PR supports to specify the ID of the customer-owned address pool via annotation alb.ingress.kubernetes.io/customer-owned-ipv4-pool.

Note: coIPv4 pool for ALB should be immutable.

  1. currently we don't have webhooks to enforce the immutability).
  2. we didn't take the approach of recreate ALB if the coIPv4 pool changes, which is left as improvement for future versions. (depends on whether ALB exposes the API to modify coIP pool)

Test done

  1. normal ALB continue to work without been impacted.
  2. with coIPPool on normal subnet, got error "You must use a customer owned IPv4 pool with an Application Load Balancer on an Outpost"
  3. with coIPPool on outpost subnet:
LoadBalancers:
- AvailabilityZones:
  - LoadBalancerAddresses: []
    OutpostId: op-<redacted>
    SubnetId: subnet-<redacted>
    ZoneName: us-west-2a
  CanonicalHostedZoneId: <redacted>
  CreatedTime: '2020-11-24T22:48:08.690000+00:00'
  CustomerOwnedIpv4Pool: ipv4pool-coip-<redacted>
  DNSName: k8s-echoserv-echoserv-<redacted>.us-west-2.elb.amazonaws.com
  IpAddressType: ipv4
  LoadBalancerArn: <redacted>
  LoadBalancerName: k8s-echoserv-echoserv-<redacted>
  Scheme: internet-facing
  SecurityGroups:
  - sg-<redacted>
  State:
    Code: active
  Type: application
  VpcId: vpc-<redacted>

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 24, 2020
@codecov-io
Copy link

codecov-io commented Nov 24, 2020

Codecov Report

Merging #1685 (a11a989) into main (9e7d172) will increase coverage by 0.14%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1685      +/-   ##
==========================================
+ Coverage   46.19%   46.34%   +0.14%     
==========================================
  Files         110      110              
  Lines        5933     5957      +24     
==========================================
+ Hits         2741     2761      +20     
- Misses       2927     2930       +3     
- Partials      265      266       +1     
Impacted Files Coverage Δ
pkg/model/elbv2/load_balancer.go 0.00% <ø> (ø)
pkg/deploy/elbv2/load_balancer_manager.go 20.24% <66.66%> (+1.77%) ⬆️
pkg/ingress/model_build_load_balancer.go 45.72% <88.88%> (+4.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e7d172...a11a989. Read the comment docs.


!!!warning ""
This annotation should be treated as immutable. To remove or change coIPv4Pool, you need to recreate Ingress.

Copy link
Contributor

Choose a reason for hiding this comment

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

How will be this surfaced to the user in the current approach if they still end up changing it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a check for drifted settings.
Now customer will saw errors in controller log and Ingress events if they changed it.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fawadkhaliq, M00nF1sh
To complete the pull request process, please assign after the PR has been reviewed.
You can assign the PR to them by writing /assign in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@M00nF1sh M00nF1sh merged commit a08ca0d into kubernetes-sigs:main Nov 25, 2020
Timothy-Dougherty pushed a commit to adammw/aws-load-balancer-controller that referenced this pull request Nov 9, 2023
* add COIP support for ALB on outpost

* check for drifted coIPv4Pool settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

4 participants