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

Clean aks-as-mgmt.sh and Tiltfile #5385

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

nawazkh
Copy link
Member

@nawazkh nawazkh commented Jan 23, 2025

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

  • Updates default K8s version used in Tiltfile to v1.30.2
  • Cleans up aks-as-mgmt.sh script by dropping unused ENV Vars.
  • Delete peering code block in Tiltfile uses /bin/sh to process peering_names for PEERING_NAME in ${PEERING_NAMES} ... . /bin/sh fails with bad substitution when it encounters ${PEERING_NAME[@]}. Hence it has been replaced with ${PEERING_NAME} .
    • Note: ${PEERING_NAME[@]} is applicable when using /bin/bash to run the commands.

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

Special notes for your reviewer:

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jan 23, 2025
@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 23, 2025
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.44%. Comparing base (90b15c2) to head (9617982).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5385   +/-   ##
=======================================
  Coverage   52.43%   52.44%           
=======================================
  Files         272      272           
  Lines       29349    29349           
=======================================
+ Hits        15389    15391    +2     
+ Misses      13154    13152    -2     
  Partials      806      806           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nawazkh
Copy link
Member Author

nawazkh commented Jan 23, 2025

Tested these changes locally and was able to delete Peerings

Running cmd: sh -ec "./hack/tools/bin/kubectl delete clusters --all --wait=false;\n    echo \"--------Clearing AKS MGMT VNETs Peerings--------\";\n    az network vnet wait --resource-group ${AKS_RESOURCE_GROUP} --name ${AKS_MGMT_VNET_NAME} --created --timeout 180;\n    echo \" VNet ${AKS_MGMT_VNET_NAME} found \"; \n    PEERING_NAMES=$(az network vnet peering list --resource-group ${AKS_RESOURCE_GROUP} --vnet-name ${AKS_MGMT_VNET_NAME} --query \"[].name\" --output tsv);\n    for PEERING_NAME in ${PEERING_NAMES}; do echo \"Deleting peering: ${PEERING_NAME}\"; az network vnet peering delete --name ${PEERING_NAME} --resource-group ${AKS_RESOURCE_GROUP} --vnet-name ${AKS_MGMT_VNET_NAME}; done;\n    echo \"All VNETs Peerings deleted in ${AKS_MGMT_VNET_NAME}\"; "
cluster.cluster.x-k8s.io "apiserver-ilb-12461" deleted
cluster.cluster.x-k8s.io "apiserver-ilb-31643" deleted
cluster.cluster.x-k8s.io "win-apiserver-ilb-606" deleted
--------Clearing AKS MGMT VNETs Peerings--------
 VNet aks-mgmt-vnet-27509 found 
Deleting peering: mgmt-to-apiserver-ilb-31643
Deleting peering: mgmt-to-win-apiserver-ilb-606
All VNETs Peerings deleted in aks-mgmt-vnet-27509

@nawazkh nawazkh changed the title Cleaning up aks-as-mgmt and Tiltfile Clean aks-as-mgmt.sh and Tiltfile Jan 23, 2025
aks-as-mgmt.sh
- Remove unused variables
- Rearrange the printing of the variables
- update K8s to v1.30.2

Tiltfile
- Delete peering command is using /bin/sh -e, hence ${PEERING_NAMES[@]} gives error. Replacing ${PEERING_NAMES[@]} with ${PEERING_NAMES}
@nawazkh nawazkh marked this pull request as ready for review January 23, 2025 22:59
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 23, 2025
@k8s-ci-robot k8s-ci-robot requested a review from marosset January 23, 2025 22:59
@nawazkh nawazkh requested review from mboersma and Jont828 January 23, 2025 23:07
@nawazkh
Copy link
Member Author

nawazkh commented Jan 24, 2025

/retest

@nawazkh
Copy link
Member Author

nawazkh commented Jan 24, 2025

I0124 01:09:49.667557 15 utils.go:776] Unexpected error: Failed to create node-port-service service: Internal error occurred: failed to allocate a serviceIP: range is full: 

@nawazkh
Copy link
Member Author

nawazkh commented Jan 24, 2025

/retest

1 similar comment
@willie-yao
Copy link
Contributor

/retest

Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 27, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 676528961c498a8fb365882967e05c26d83e2cfb

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: willie-yao

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 Jan 27, 2025
@k8s-ci-robot k8s-ci-robot merged commit b026094 into kubernetes-sigs:main Jan 27, 2025
31 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Jan 27, 2025
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants