Skip to content

credentials: auto-enable VPC endpoint when running in VPC network#1653

Open
huww98 wants to merge 1 commit intokubernetes-sigs:masterfrom
huww98:auto-enable-vpc-endpoint
Open

credentials: auto-enable VPC endpoint when running in VPC network#1653
huww98 wants to merge 1 commit intokubernetes-sigs:masterfrom
huww98:auto-enable-vpc-endpoint

Conversation

@huww98
Copy link
Copy Markdown
Contributor

@huww98 huww98 commented Mar 13, 2026

What type of PR is this?

/kind feature

What this PR does / why we need it:

When the CSI driver is running in a VPC network, the Alibaba Cloud credentials SDK supports using VPC endpoints for authentication (controlled by the ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED environment variable). Previously, users had to manually set this environment variable to enable VPC endpoint usage.

This PR automatically sets ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED=true when:

  1. The current network type is detected as vpc (via utils.GetNetworkType())
  2. The environment variable has not already been set by the user

This improves out-of-the-box behavior for VPC deployments without breaking existing configurations where the variable is explicitly set.

Which issue(s) this PR fixes:

No linked issues

Special notes for your reviewer:

The check uses os.LookupEnv to preserve any existing user-set value (including false) and only auto-sets when the variable is absent.

Does this PR introduce a user-facing change?

credentials: automatically enable VPC endpoint for Alibaba Cloud credential provider when running in VPC network

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


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 13, 2026
@k8s-ci-robot k8s-ci-robot requested review from iltyty and mowangdk March 13, 2026 11:53
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 13, 2026
@huww98 huww98 force-pushed the auto-enable-vpc-endpoint branch from 3a6149d to fd471d7 Compare March 13, 2026 12:58
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: huww98
Once this PR has been reviewed and has the lgtm label, please assign mowangdk for approval. For more information see the Code Review Process.

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

Details 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 added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 13, 2026
@huww98 huww98 force-pushed the auto-enable-vpc-endpoint branch from fd471d7 to 2669950 Compare March 13, 2026 13:02
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. kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants