Skip to content

Conversation

@stevekuznetsov
Copy link
Contributor

When users have public FQDN on their private cluster and want to use normal DNS resolution for bastion, we should let them.

When users have public FQDN on their private cluster and want to use
normal DNS resolution for bastion, we should let them.

Signed-off-by: Steve Kuznetsov <[email protected]>
Copilot AI review requested due to automatic review settings November 11, 2025 22:49
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link

Hi @stevekuznetsov,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 11, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

Copilot finished reviewing on behalf of stevekuznetsov November 11, 2025 22:51
@github-actions
Copy link

Hi @stevekuznetsov

Release Suggestions

Module: aks-preview

  • Please log updates into to src/aks-preview/HISTORY.rst
  • Update VERSION to 19.0.0b16 in src/aks-preview/setup.py

Notes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for using public FQDN when connecting to private AKS clusters via Azure Bastion. The change allows users who have a public FQDN configured on their private cluster to use normal DNS resolution when establishing bastion connections.

Key changes:

  • Added public_fqdn parameter to the aks_bastion function signature
  • Added help documentation for the new --public-fqdn flag

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/aks-preview/azext_aks_preview/custom.py Added public_fqdn parameter to aks_bastion function signature and passed it to aks_bastion_runner
src/aks-preview/azext_aks_preview/_help.py Added documentation for the new --public-fqdn flag
Comments suppressed due to low confidence (1)

src/aks-preview/azext_aks_preview/custom.py:4993

  • The public_fqdn parameter is not being passed to aks_get_credentials. This function accepts a public_fqdn parameter (line 1491 in custom.py) that should be forwarded here to enable the intended functionality. Update the call to: aks_get_credentials(cmd, client, resource_group_name, name, admin=admin, path=kubeconfig_path, public_fqdn=public_fqdn)
            aks_get_credentials(cmd, client, resource_group_name, name, admin=admin, path=kubeconfig_path)

port,
mc_id,
kubeconfig_path,
public_fqdn=public_fqdn,
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

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

The aks_bastion_runner function does not accept a public_fqdn parameter. Its signature (line 202-204 in bastion/bastion.py) only includes: bastion_resource, port, mc_id, kubeconfig_path, test_hook. This line should be removed since the public_fqdn parameter should only be passed to aks_get_credentials (line 4993) to retrieve credentials with the correct server address.

Suggested change
public_fqdn=public_fqdn,

Copilot uses AI. Check for mistakes.


def aks_bastion(cmd, client, resource_group_name, name, bastion=None, port=None, admin=False, yes=False):
def aks_bastion(cmd, client, resource_group_name, name, bastion=None, port=None, admin=False, yes=False, public_fqdn=False):
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

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

The public_fqdn parameter is missing its corresponding argument definition in _params.py (around line 3090-3099). Add an argument definition similar to the other boolean flags: c.argument(\"public_fqdn\", action=\"store_true\") to properly register the CLI argument.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants