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

fix: Support switching from loadbalancer to externalName for services #7518

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

nilo19
Copy link
Contributor

@nilo19 nilo19 commented Nov 8, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fix two issues when changing service type from lb to externalName.

  1. ExternalName service has no ipFamilies, we should not panic this.
  2. We should not use v4Enabled, v6Enabled := getIPFamiliesEnabled(service) to check what backend pools should be deleted from the vmss.

Which issue(s) this PR fixes:

Fixes #7503

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: Support switching from loadbalancer to externalName for services

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Nov 8, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 8, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 8, 2024
@nilo19
Copy link
Contributor Author

nilo19 commented Nov 9, 2024

/retest

Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

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

Thanks for the fix.

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feiskyer, nilo19

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

@nilo19
Copy link
Contributor Author

nilo19 commented Nov 11, 2024

/retest

1 similar comment
@MartinForReal
Copy link
Contributor

/retest

@nilo19
Copy link
Contributor Author

nilo19 commented Nov 12, 2024

/test pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz

@k8s-ci-robot k8s-ci-robot merged commit 8691566 into kubernetes-sigs:master Nov 12, 2024
18 checks passed
@nilo19 nilo19 deleted the fix/ipfamily branch November 13, 2024 03:01
@nilo19
Copy link
Contributor Author

nilo19 commented Nov 13, 2024

/cherrypick release-1.31

@nilo19
Copy link
Contributor Author

nilo19 commented Nov 13, 2024

/cherrypick release-1.30

@nilo19
Copy link
Contributor Author

nilo19 commented Nov 13, 2024

/cherrypick release-1.29

@nilo19
Copy link
Contributor Author

nilo19 commented Nov 13, 2024

/cherrypick release-1.28

@k8s-infra-cherrypick-robot

@nilo19: new pull request created: #7565

In response to this:

/cherrypick release-1.31

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@nilo19: new pull request created: #7566

In response to this:

/cherrypick release-1.30

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@nilo19: #7518 failed to apply on top of branch "release-1.29":

Applying: fix: Support switching from loadbalancer to externalName for services
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	pkg/provider/azure_privatelinkservice.go
M	pkg/provider/azure_utils.go
M	pkg/provider/azure_utils_test.go
M	pkg/provider/azure_vmss.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/provider/azure_vmss.go
Auto-merging pkg/provider/azure_utils_test.go
Auto-merging pkg/provider/azure_utils.go
Auto-merging pkg/provider/azure_privatelinkservice.go
CONFLICT (content): Merge conflict in pkg/provider/azure_privatelinkservice.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
CONFLICT (content): Merge conflict in pkg/provider/azure_loadbalancer.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 fix: Support switching from loadbalancer to externalName for services

In response to this:

/cherrypick release-1.29

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@nilo19: #7518 failed to apply on top of branch "release-1.28":

Patch is empty.
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To record the empty patch as an empty commit, run "git am --allow-empty".
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"

In response to this:

/cherrypick release-1.28

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-sigs/prow repository.

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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check the nil pointer of service.spec.ipfamilies
5 participants