Skip to content

Commit ef4c237

Browse files
committed
cleanup
Signed-off-by: sk593 <shruthikumar@microsoft.com>
1 parent 5ee7321 commit ef4c237

2 files changed

Lines changed: 3 additions & 89 deletions

File tree

.github/scripts/create-cluster.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fi
172172

173173
if [[ -z "${AZURE_CLIENT_ID:-}" ]]; then
174174
echo "Error: AZURE_CLIENT_ID must be set to install Radius with Azure Workload Identity."
175-
echo "Ensure the GitHub secret/environment variable is available before running make create-radius-cluster."
175+
echo "Ensure the environment variable is available before running make create-radius-cluster."
176176
exit 1
177177
fi
178178

@@ -181,8 +181,7 @@ rad install kubernetes \
181181
--set rp.publicEndpointOverride=localhost:8081 \
182182
--skip-contour-install \
183183
--set dashboard.enabled=false \
184-
--set global.azureWorkloadIdentity.enabled=true \
185-
--set global.azureWorkloadIdentity.clientId="${AZURE_CLIENT_ID}" \
184+
--set global.azureWorkloadIdentity.enabled="${AZURE_WORKLOAD_IDENTITY_ENABLED}" \
186185

187186
echo "Installing Dapr on Kubernetes..."
188187
helm repo add dapr https://dapr.github.io/helm-charts --force-update >/dev/null 2>&1

.github/workflows/validate-azure-recipes.yaml

Lines changed: 1 addition & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ jobs:
4747
if [ -z "$LOCATION" ]; then
4848
LOCATION="westus3"
4949
fi
50-
RG="radtest-${{ github.run_id }}-${{ github.run_attempt }}"
51-
# Temporary override for targeted testing against an existing resource group.
52-
RG="shruthikumar"
50+
RG="rrttest-${{ github.run_id }}-${{ github.run_attempt }}"
5351
STATE_FILE=".azure-test-state"
5452
echo "AZURE_LOCATION=$LOCATION" >> "$GITHUB_ENV"
5553
echo "AZURE_RESOURCE_GROUP=$RG" >> "$GITHUB_ENV"
@@ -94,89 +92,6 @@ jobs:
9492
- name: Configure Azure Provider
9593
run: make configure-azure-provider
9694

97-
- name: Verify Azure Workload Identity Setup
98-
env:
99-
TEST_AZURE_OIDC_JSON: ${{ secrets.TEST_AZURE_OIDC_JSON }}
100-
run: |
101-
echo "=== 0. Checking webhook installation ==="
102-
echo "Helm releases:"
103-
helm list -n radius-default
104-
echo ""
105-
echo "Helm manifest for workload-identity-webhook (to confirm resource names):"
106-
helm get manifest workload-identity-webhook -n radius-default || echo "Unable to retrieve manifest"
107-
echo ""
108-
echo "Deployments in radius-default:"
109-
kubectl get deployments -n radius-default
110-
echo ""
111-
echo "Pods in radius-default:"
112-
kubectl get pods -n radius-default
113-
echo ""
114-
WEBHOOK_DEPLOYMENT=$(kubectl get deployment -n radius-default -l app=workload-identity-webhook -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true)
115-
if [ -n "$WEBHOOK_DEPLOYMENT" ]; then
116-
echo "Webhook deployment '$WEBHOOK_DEPLOYMENT' exists. Describing deployment:"
117-
kubectl describe deployment "$WEBHOOK_DEPLOYMENT" -n radius-default
118-
else
119-
echo "❌ Webhook deployment not found"
120-
echo "Listing all deployments/pods in radius-default for debugging:"
121-
kubectl get deployments -n radius-default -o wide
122-
kubectl get pods -n radius-default -o wide
123-
fi
124-
echo ""
125-
echo "Checking webhook configuration selectors:"
126-
kubectl get mutatingwebhookconfiguration azure-wi-webhook-mutating-webhook-configuration -o jsonpath='{.webhooks[0].namespaceSelector}'
127-
echo ""
128-
echo "Webhook object selector:"
129-
kubectl get mutatingwebhookconfiguration azure-wi-webhook-mutating-webhook-configuration -o jsonpath='{.webhooks[0].objectSelector}'
130-
echo ""
131-
echo ""
132-
echo "Checking radius-system namespace labels:"
133-
kubectl get namespace radius-system -o jsonpath='{.metadata.labels}'
134-
echo ""
135-
echo ""
136-
137-
echo "=== 1. Checking OIDC issuer accessibility ==="
138-
if ! ISSUER=$(printf '%s' "$TEST_AZURE_OIDC_JSON" | jq -r '.AZURE_OIDC_ISSUER' 2>/dev/null); then
139-
echo "❌ Failed to parse TEST_AZURE_OIDC_JSON - JSON is malformed"
140-
exit 1
141-
fi
142-
echo "Testing discovery document..."
143-
if curl -sf -o /dev/null "$ISSUER/.well-known/openid-configuration"; then
144-
echo "✅ Discovery document reachable"
145-
else
146-
echo "❌ Discovery document not accessible"
147-
fi
148-
echo "Testing JWKS..."
149-
if curl -sf -o /dev/null "$ISSUER/.well-known/openid-configuration/jwks"; then
150-
echo "✅ JWKS endpoint reachable"
151-
else
152-
echo "❌ JWKS endpoint not accessible"
153-
fi
154-
155-
echo ""
156-
echo "=== 2. applications-rp pod annotations ==="
157-
kubectl get pod -n radius-system -l app.kubernetes.io/name=applications-rp -o json | jq -r '.items[] | "--- " + .metadata.name + " ---\n" + (((.metadata.annotations // {}) | tojson))'
158-
159-
echo ""
160-
echo "=== 3. Checking pod labels ==="
161-
kubectl get pods -n radius-system -o json | \
162-
jq -r '.items[] | "\(.metadata.name): " + (if (.metadata.labels // {})["azure.workload.identity/use"] == "true" then "LABEL_PRESENT" else "LABEL_MISSING" end)'
163-
164-
echo ""
165-
echo "=== 4. Checking AZURE_CLIENT_ID environment variable ==="
166-
kubectl get pods -n radius-system -o json | \
167-
jq -r '.items[] | (.metadata.name) as $name | {name: $name, env: [(.spec.containers[]?.env[]? | select(.name=="AZURE_CLIENT_ID"))]} | "\(.name): " + (if (.env | length) > 0 then "AZURE_CLIENT_ID_PRESENT" else "NOT_SET" end)'
168-
169-
echo ""
170-
echo "=== 5. Checking projected service account token ==="
171-
kubectl get pods -n radius-system -o json | \
172-
jq -r '.items[] | "\(.metadata.name): " + (if .spec.volumes[]? | select(.name=="azure-identity-token") then "TOKEN_VOLUME_MOUNTED" else "NO_TOKEN_VOLUME" end)'
173-
174-
echo ""
175-
echo "=== 6. Federated credential requirements ==="
176-
echo "✓ Issuer must match AZURE_OIDC_ISSUER from secret"
177-
echo "✓ Subject must be: system:serviceaccount:radius-system:<service-account-name>"
178-
echo "✓ Audience must be: api://AzureADTokenExchange"
179-
18095
- name: Build Azure Recipes
18196
run: make build-azure-recipes
18297

0 commit comments

Comments
 (0)