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

Derive API server LB DNS name from user-defined private DNS zone name #1890

Merged

Conversation

dlipovetsky
Copy link
Contributor

@dlipovetsky dlipovetsky commented Nov 24, 2021

What type of PR is this?
/kind bug

What this PR does / why we need it:
If the user defines a private DNS zone name, they expect the API server LB DNS name to use that zone. Prior to this change, the API server LB DNS name always used the default private DNS zone (capz.io).

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1885

Special notes for your reviewer:
I'm not yet familiar with the code base, so the fix and/or tests might be off-track. Constructive criticism welcome 😄

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

The user-defined private DNS zone name is now used to derive the cluster's API server load balancer DNS name. 

@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 24, 2021
@k8s-ci-robot k8s-ci-robot added area/provider/azure Issues or PRs related to azure provider sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. 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, 2021
@dlipovetsky
Copy link
Contributor Author

*** Running go-apidiff ***

sigs.k8s.io/cluster-api-provider-azure/azure
  Incompatible changes:
  - GeneratePrivateFQDN: removed
+ EXIT_VALUE=1
+ set +o xtrace

I removed that function because its only argument (clusterName) is not enough to derive the FQDN, and the function is not a ClusterScope receiver, it needs to accept the private zone DNS name as an argument.

I could leave the function, but it would become (a) dead code, and (b) an incorrect implementation.

Open to suggestions!

@CecileRobertMichon
Copy link
Contributor

lgtm

@dlipovetsky please squash commits!

@dlipovetsky dlipovetsky force-pushed the apiserver-host-private-dns-zone branch from 4c2d709 to 0918e9c Compare November 29, 2021 19:43
@CecileRobertMichon
Copy link
Contributor

/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 29, 2021
@CecileRobertMichon
Copy link
Contributor

/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 Nov 29, 2021
@dlipovetsky
Copy link
Contributor Author

I don't think the e2e failure is related to the change.

On a separate, and not really important note, the apidiff test passed. I guess that's because GeneratePrivateFQDN changed its argument name, but not its type. That's a false negative, but I guess the only way to make the check accurate here is to use a specific type, not a generic string, for the argument.)

@CecileRobertMichon
Copy link
Contributor

/retest

@CecileRobertMichon
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 30, 2021
@k8s-ci-robot k8s-ci-robot merged commit 420a1c5 into kubernetes-sigs:main Nov 30, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.1 milestone Nov 30, 2021
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. area/provider/azure Issues or PRs related to azure provider 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 Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. 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.

If the cluster is configured with a private DNS zone name, this name is not used to derive the API server host
3 participants