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

Add Istio egress CLI commands #8524

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

nshankar13
Copy link
Contributor

@nshankar13 nshankar13 commented Mar 3, 2025


This PR adds the CLI commands to az aks mesh for enable-egress-gateway and disable-egress-gateway. It also vendors the python Kubernetes client under src/aks-preview/azext_aks_preview/vendored_sdks/kubernetes. The Kubernetes client is used to create a StaticGatewayConfiguration custom resource prior to enabling the egress gateway for the live tests, as this is required on the RP side to enable an Istio egress gateway.

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az aks mesh enable egress gateway

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copy link

azure-client-tools-bot-prd bot commented Mar 3, 2025

⚠️Azure CLI Extensions Breaking Change Test
⚠️aks-preview
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd aks mesh disable-egress-gateway cmd aks mesh disable-egress-gateway added
⚠️ 1001 - CmdAdd aks mesh enable-egress-gateway cmd aks mesh enable-egress-gateway added

Copy link

Hi @nshankar13,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 3, 2025

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

Copy link

github-actions bot commented Mar 3, 2025

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>

Signed-off-by: nshankar <[email protected]>
Copy link

github-actions bot commented Mar 3, 2025

Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Copy link
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

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

the change generally looks good to me, please fix failed checks

/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/_params.py:2228:1: W293 blank line contains whitespace
/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/_validators.py:857:1: E302 expected 2 blank lines, found 1
/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/_validators.py:861:5: F841 local variable 'asm_egress_name_regex' is assigned to but never used
/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/_validators.py:862:13: F821 undefined name 'asm_revision_regex'
/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/_validators.py:864:56: F821 undefined name 'revision'
/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/_validators.py:866:1: E302 expected 2 blank lines, found 1
/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/custom.py:3144:1: E302 expected 2 blank lines, found 1
/mnt/vss/_work/1/s/src/aks-preview/azext_aks_preview/managed_cluster_decorator.py:2413:1: W293 blank line contains whitespace

  • FAIL - HIGH severity: missing_parameter_help
    Parameter: aks mesh disable-egress-gateway, egress_gateway_name - Missing help
    Parameter: aks mesh disable-egress-gateway, egress_gateway_namespace - Missing help
    Parameter: aks mesh enable-egress-gateway, egress_gateway_name - Missing help
    Parameter: aks mesh enable-egress-gateway, egress_gateway_namespace - Missing help

bypass in src/aks-preview/linter_exclusions.yml

  • FAIL - HIGH severity: option_length_too_long
    Parameter: aks mesh disable-egress-gateway, egress_gateway_namespace - The lengths of all options ['--egress-gateway-namespace'] are longer than threshold 22. Argument egress_gateway_namespace must have a short abbreviation.
    Parameter: aks mesh enable-egress-gateway, egress_gateway_namespace - The lengths of all options ['--egress-gateway-namespace'] are longer than threshold 22. Argument egress_gateway_namespace must have a short abbreviation.
    Parameter: aks mesh enable-egress-gateway, gateway_configuration_name - The lengths of all options ['--gateway-configuration-name'] are longer than threshold 22. Argument gateway_configuration_name must have a short abbreviation.

Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Signed-off-by: nshankar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AKS Auto-Assign Auto assign by bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants