Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/deploy-lts-prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
GITHUB_REPO: ${{ vars.REPO }}
HMAC_TOKEN: ${{ secrets.HMAC_TOKEN }}
MINIO_CONSOLE_PORT: 8003
K8S_PROW_IMAGE_TAG: v20240802-66b115076
K8S_PROW_IMAGE_TAG: v20260225-8287579aa
steps:
- name: Generate fake mount secret
run: |
Expand Down Expand Up @@ -206,4 +206,26 @@ jobs:
- name: 'Apply test pod manifests'
run: for f in config/prow/k8s/test-pods/*.yaml; do envsubst < $f | kubectl apply -f -; done
env:
AZURE_RG: ${{ secrets.AZURE_RG }}
AZURE_RG: ${{ secrets.AZURE_RG }}

- name: 'Restart Prow components if secrets are out of sync'
run: |
# Compute current secret hash
SECRET_HASH=$(kubectl get secret s3-credentials -n prow -o jsonpath='{.data}' | md5sum | cut -d' ' -f1)
echo "Current s3-credentials hash: $SECRET_HASH"

# Check if Deck pods have the matching hash annotation
DECK_HASH=$(kubectl get deployment deck -n prow -o jsonpath='{.spec.template.metadata.annotations.s3-credentials-hash}' 2>/dev/null || echo "")
echo "Deck annotation hash: ${DECK_HASH:-<none>}"

if [ "$SECRET_HASH" != "$DECK_HASH" ]; then
echo "Secret hash mismatch — restarting Prow components..."
# Annotate deployments with the current hash (triggers rollout)
for deploy in deck crier; do
kubectl patch deployment "$deploy" -n prow -p \
"{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"s3-credentials-hash\":\"$SECRET_HASH\"}}}}}"
done
kubectl rollout status deployment -n prow deck crier --timeout=300s
else
echo "Secret hash matches — no restart needed"
fi
2 changes: 1 addition & 1 deletion config/prow/k8s/app/ghproxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
agentpool: prow
containers:
- name: ghproxy
image: gcr.io/k8s-prow/ghproxy:$K8S_PROW_IMAGE_TAG
image: us-docker.pkg.dev/k8s-infra-prow/images/ghproxy:$K8S_PROW_IMAGE_TAG
args:
- --cache-dir=/cache
- --cache-sizeGB=99
Expand Down
2 changes: 1 addition & 1 deletion config/prow/k8s/app/minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stringData:
{
"region": "minio",
"access_key": "$AZURE_STORAGE_ACCOUNT_USER",
"endpoint": "minio.prow.svc.cluster.local",
"endpoint": "http://minio.prow.svc.cluster.local",
"insecure": true,
"s3_force_path_style": true,
"secret_key": "$AZURE_STORAGE_ACCOUNT_PASSWORD"
Expand Down
2 changes: 1 addition & 1 deletion config/prow/k8s/test-pods/s3-credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stringData:
{
"region": "minio",
"access_key": "$AZURE_STORAGE_ACCOUNT_USER",
"endpoint": "minio.prow.svc.cluster.local",
"endpoint": "http://minio.prow.svc.cluster.local",
"insecure": true,
"s3_force_path_style": true,
"secret_key": "$AZURE_STORAGE_ACCOUNT_PASSWORD"
Expand Down