From f89fbb8e2909207976ee46712bc864a0f0e73626 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 03:13:52 +0000 Subject: [PATCH 1/4] Initial plan From 0bf896ba47b6a5af07f4aff3c89e634b018a51cf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 03:16:13 +0000 Subject: [PATCH 2/4] Fix ArgoCD deployment: correct apiVersion and image name typos Co-authored-by: raykao <860691+raykao@users.noreply.github.com> --- Act-3/argocd/apps/broken-aks-store-all-in-one.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Act-3/argocd/apps/broken-aks-store-all-in-one.yaml b/Act-3/argocd/apps/broken-aks-store-all-in-one.yaml index 88ac619..0caf86d 100644 --- a/Act-3/argocd/apps/broken-aks-store-all-in-one.yaml +++ b/Act-3/argocd/apps/broken-aks-store-all-in-one.yaml @@ -175,7 +175,7 @@ data: ORDER_QUEUE_USERNAME: dXNlcm5hbWU= ORDER_QUEUE_PASSWORD: cGFzc3dvcmQ= --- -apiVersion: apps/v +apiVersion: apps/v1 kind: Deployment metadata: name: order-service @@ -472,7 +472,7 @@ spec: "kubernetes.io/os": linux containers: - name: store-admin - image: ghcr.io/azure-samples/aks-store-demo/store-dmin:2.1.0 + image: ghcr.io/azure-samples/aks-store-demo/store-admin:2.1.0 ports: - containerPort: 8081 name: store-admin From 06787c584753179d63142a439a283c2d122e3ef5 Mon Sep 17 00:00:00 2001 From: Diego Casati Date: Tue, 3 Feb 2026 21:32:06 -0700 Subject: [PATCH 3/4] Add env label to makeline-service deployment --- Act-3/argocd/apps/broken-aks-store-all-in-one.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Act-3/argocd/apps/broken-aks-store-all-in-one.yaml b/Act-3/argocd/apps/broken-aks-store-all-in-one.yaml index 0caf86d..c43a817 100644 --- a/Act-3/argocd/apps/broken-aks-store-all-in-one.yaml +++ b/Act-3/argocd/apps/broken-aks-store-all-in-one.yaml @@ -268,6 +268,7 @@ spec: metadata: labels: app: makeline-service + env: demo spec: nodeSelector: "kubernetes.io/os": linux From 2856dbc810c356452d5fc241b517eece04984e10 Mon Sep 17 00:00:00 2001 From: Diego Casati Date: Wed, 4 Feb 2026 11:23:44 -0700 Subject: [PATCH 4/4] Add workflow for AKS access with resource group and cluster name inputs --- .github/workflows/copilot-aks.yaml | 99 ++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .github/workflows/copilot-aks.yaml diff --git a/.github/workflows/copilot-aks.yaml b/.github/workflows/copilot-aks.yaml new file mode 100644 index 0000000..5775bb9 --- /dev/null +++ b/.github/workflows/copilot-aks.yaml @@ -0,0 +1,99 @@ +name: "Copilot - AKS Access" + +on: + workflow_dispatch: + inputs: + resource_group: + description: 'Azure Resource Group' + required: true + default: 'rg-anyscale-demo' + cluster_name: + description: 'AKS Cluster Name' + required: true + default: 'aks-eastus2' + issues: + types: [labeled] + +permissions: + id-token: write + contents: read + issues: write + +jobs: + copilot-setup-steps: + runs-on: ubuntu-latest + # Only run on label events if the label starts with 'cluster/' + if: github.event_name == 'workflow_dispatch' || startsWith(github.event.label.name, 'cluster/') + + # Job-level permissions override workflow-level, so you must include id-token here + permissions: + contents: write + id-token: write # Required for Azure federated identity + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Parse cluster info from label or inputs + id: cluster-info + run: | + if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + # Use workflow inputs + echo "RESOURCE_GROUP=${{ github.event.inputs.resource_group }}" >> $GITHUB_OUTPUT + echo "CLUSTER_NAME=${{ github.event.inputs.cluster_name }}" >> $GITHUB_OUTPUT + echo "Using workflow inputs: RG=${{ github.event.inputs.resource_group }}, Cluster=${{ github.event.inputs.cluster_name }}" + else + # Parse from label: cluster// + LABEL="${{ github.event.label.name }}" + echo "Parsing label: $LABEL" + + # Extract resource group and cluster name from label + # Expected format: cluster// + RESOURCE_GROUP=$(echo "$LABEL" | cut -d'/' -f2) + CLUSTER_NAME=$(echo "$LABEL" | cut -d'/' -f3) + + if [ -z "$RESOURCE_GROUP" ] || [ -z "$CLUSTER_NAME" ]; then + echo "ERROR: Invalid label format. Expected: cluster//" + echo "Got: $LABEL" + exit 1 + fi + + echo "RESOURCE_GROUP=$RESOURCE_GROUP" >> $GITHUB_OUTPUT + echo "CLUSTER_NAME=$CLUSTER_NAME" >> $GITHUB_OUTPUT + echo "Parsed from label: RG=$RESOURCE_GROUP, Cluster=$CLUSTER_NAME" + fi + + - name: Azure CLI Login + uses: azure/login@v2 + with: + client-id: ${{ secrets.ARM_CLIENT_ID }} + tenant-id: ${{ secrets.ARM_TENANT_ID }} + subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }} + + - name: Verify Azure Login + run: | + echo "Verifying Azure authentication..." + az account show + + - name: Get AKS Credentials + run: | + echo "Fetching kubeconfig for cluster ${{ steps.cluster-info.outputs.CLUSTER_NAME }}..." + az aks get-credentials \ + --resource-group ${{ steps.cluster-info.outputs.RESOURCE_GROUP }} \ + --name ${{ steps.cluster-info.outputs.CLUSTER_NAME }} \ + --overwrite-existing + echo "Kubeconfig fetched successfully!" + + - name: Verify Cluster Access + run: | + echo "Testing cluster connectivity..." + kubectl cluster-info + echo "" + echo "=== Cluster Nodes ===" + kubectl get nodes -o wide + echo "" + echo "=== All Pods ===" + kubectl get pods -A + echo "" + echo "=== Namespaces ===" + kubectl get namespaces \ No newline at end of file