Skip to content

Undefined check for apiserver_loadbalancer_domain_name in apiserver_sans#13009

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
chadswen:undefined-check
Feb 16, 2026
Merged

Undefined check for apiserver_loadbalancer_domain_name in apiserver_sans#13009
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
chadswen:undefined-check

Conversation

@chadswen
Copy link
Member

@chadswen chadswen commented Feb 13, 2026

What type of PR is this?
/kind bug

What this PR does / why we need it:
Defaults apiserver_loadbalancer_domain_name to '' in apiserver_sans, like the other nullable vars in the task, preventing undefined variable related fatal ansible errors.

How to reproduce

When loadbalancer_apiserver_localhost: false and loadbalancer_apiserver.address is not set (e.g. when the nginx-proxy static pod and a load balancer are not desired).

Root Cause

One of the undefined checks for this variable was removed from apiserver_sans in PR 12507 when the set_fact templating was simplified.

However, when loadbalancer_apiserver_localhost: false and loadbalancer_apiserver.address is not set, apiserver_loadbalancer_domain_name defaults to undefined instead of a string as of the cleanup in PR 12872 .

apiserver_loadbalancer_domain_name: "{{ 'localhost' if loadbalancer_apiserver_localhost else (loadbalancer_apiserver.address | d(undef())) }}"

Special notes for your reviewer:
I realize apiserver_loadbalancer_domain_name will be removed eventually by #12897 (which will be a great improvement IMO), but in the meantime this is blocking some of my cluster validation tests that don't provision a load balancer.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. labels Feb 13, 2026
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 13, 2026
@chadswen
Copy link
Member Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 13, 2026
@chadswen
Copy link
Member Author

/retest-failed

@VannTen
Copy link
Contributor

VannTen commented Feb 13, 2026 via email

@VannTen
Copy link
Contributor

VannTen commented Feb 16, 2026

/lgtm
/approve
/cherrypick release-2.30

@k8s-infra-cherrypick-robot

@VannTen: once the present PR merges, I will cherry-pick it on top of release-2.30 in a new PR and assign it to you.

Details

In response to this:

/lgtm
/approve
/cherrypick release-2.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-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 16, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chadswen, VannTen

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 16, 2026
@k8s-ci-robot k8s-ci-robot merged commit 8af9f37 into kubernetes-sigs:master Feb 16, 2026
51 checks passed
@k8s-infra-cherrypick-robot

@VannTen: new pull request created: #13014

Details

In response to this:

/lgtm
/approve
/cherrypick release-2.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.

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants