Add E2E test cases for apply -f with kubeadm join flow#106
Add E2E test cases for apply -f with kubeadm join flow#106
apply -f with kubeadm join flow#106Conversation
Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
apply -f with kubeadm join flow
hack/e2e/infra/main.bicep
Outdated
| } | ||
| } | ||
|
|
||
| resource pipKubeadm 'Microsoft.Network/publicIPAddresses@2023-11-01' = { |
There was a problem hiding this comment.
do a refactor to make azure vm creation as a reusable bicep module
There was a problem hiding this comment.
Refactored in 949e7bc. Extracted pip + NIC + VM into hack/e2e/infra/modules/vm.bicep with an assignManagedIdentity flag. main.bicep now uses three module declarations and references outputs via vmMsi.outputs.principalId etc.
hack/e2e/lib/node-join.sh
Outdated
| sudo mkdir -p /etc/aks-flex-node /var/log/aks-flex-node | ||
| sudo cp /tmp/kubeadm-join.json /etc/aks-flex-node/ | ||
|
|
||
| sudo systemd-run \ |
There was a problem hiding this comment.
don't use systemd-run, just invoke the apply command
There was a problem hiding this comment.
Fixed in 949e7bc. The systemd-run wrapper is gone; the remote script now calls sudo /usr/local/bin/aks-flex-node apply --no-prettyui -f /etc/aks-flex-node/kubeadm-join.json directly and tee's output to /var/log/aks-flex-node/aks-flex-node.log.
…rect apply invocation Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
hack/e2e/infra/modules/vm.bicep
Outdated
| // ============================================================================= | ||
| // modules/vm.bicep - Reusable Ubuntu flex-node VM module | ||
| // | ||
| // Creates a public IP, NIC, and Ubuntu 22.04 VM in the given subnet. |
There was a problem hiding this comment.
allow customizing the vhd version. Use 24.04 by default
There was a problem hiding this comment.
Done in 836de59. Added imagePublisher, imageOffer, imageSku, and imageVersion parameters to modules/vm.bicep. Defaults are now Ubuntu 24.04 LTS (ubuntu-24_04-lts / server / latest). Callers can override any of these to pin a specific image.
…p module Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
test failed @copilot |
…ent names Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
... Fixed in |
hack/e2e/lib/node-join.sh
Outdated
| # node_join_msi - Install Azure CLI + MSI auth, deploy binary, run agent | ||
| # node_join_token - Create bootstrap token/RBAC, deploy binary, run agent | ||
| # node_join_all - Join both nodes (MSI first, then token) | ||
| # node_join_msi - Install Azure CLI + MSI auth, deploy binary, run agent |
There was a problem hiding this comment.
split node-join.sh by category into smaller files
There was a problem hiding this comment.
Done in eba1003. node-join.sh now only contains the shared _deploy_and_start_agent helper, the three source statements, and node_join_all. Each join mode has its own file:
node-join-msi.sh—node_join_msinode-join-token.sh—node_join_tokennode-join-kubeadm.sh—node_join_kubeadm
run.sh still sources only node-join.sh, so the public API is unchanged.
…in-kubeadm.sh Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
vm-e2e-kubeadm-*) tohack/e2e/infra/main.bicepfor the kubeadm join testhack/e2e/lib/infra.shto extract and store kubeadm VM outputs, and wait for SSH on the new VMnode_join_kubeadmfunction tohack/e2e/lib/node-join-kubeadm.sh(usesapply -fwith KubeadmNodeJoin action)node_join_allinnode-join.shto also join the kubeadm VM in parallelhack/e2e/lib/validate.shto include kubeadm VM in node validation and smoke testshack/e2e/lib/cleanup.shto collect logs from and clean up the kubeadm VMhack/e2e/run.shto addjoin-kubeadmcommandhack/e2e/README.mdto document the new kubeadm test flow and the three node join modeshack/e2e/infra/main.bicepto use reusablemodules/vm.bicepfor all flex-node VMssystemd-runwith directaks-flex-node apply -finvocation innode_join_kubeadmnode_join_kubeadm: add kubeadm Roles/RoleBindings (nodes-kubeadm-config, kubelet-config), ClusterRole/ClusterRoleBinding (get-nodes), and ConfigMaps (cluster-info, kubeadm-config, kubelet-config)imagePublisher,imageOffer,imageSku,imageVersionparameters tomodules/vm.bicepwith Ubuntu 24.04 LTS defaultsvmMsi.outputs.principalId(runtime value) withmsiVmNamevar (deployment-start value) inroleAssignmentsnamefieldsnode-join.shinto category-specific files:node-join.sh— shared_deploy_and_start_agenthelper +node_join_allorchestration + sources sub-filesnode-join-msi.sh—node_join_msinode-join-token.sh—node_join_tokennode-join-kubeadm.sh—node_join_kubeadmOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.