Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
saliceti committed May 2, 2024
1 parent a63be5d commit 336a5a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/enable-maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ on:
required: true
type: string
options:
- review
- qa
- production

jobs:
enable-maintenance:
name: Enable maintenance app
runs-on: ubuntu-latest
environment: review
# environment: ${{ inputs.environment }}

steps:
- name: Checkout
Expand All @@ -37,24 +38,13 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

# - name: Set up kubelogin for non-interactive login
# uses: azure/use-kubelogin@v1
# with:
# kubelogin-version: 'v0.0.34'

# - uses: azure/aks-set-context@v3
# with:
# resource-group: s189t01-tsc-ts-rg
# cluster-name: s189t01-tsc-test-aks
# use-kubelogin: true
# admin: 'false'

- name: Set ARM and kubelogin environment
uses: DFE-Digital/github-actions/set-kubelogin-environment@master
with:
azure-credentials: ${{ secrets.AZURE_CREDENTIALS }}

- name: Deploy maintenance app
run: make review_aks maintenance-fail-over PR_NUMBER=1
# run: make ${{ inputs.environment }}_aks maintenance-fail-over
env:
MAINTENANCE_IMAGE_TAG: ${{steps.build-image.outputs.tag}}
4 changes: 3 additions & 1 deletion maintenance_page/scripts/failback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ set -eu

NAMESPACE=$(jq -r '.namespace' terraform/aks/workspace_variables/${CONFIG}.tfvars.json)

echo Reconfigure ingresses using terraform
echo Reset external ingress
kubectl apply -n ${NAMESPACE} -f maintenance_page/manifests/${CONFIG}/ingress_external_to_main.yml

echo Reset internal ingress
kubectl apply -n ${NAMESPACE} -f maintenance_page/manifests/${CONFIG}/ingress_internal_to_main.yml

echo Delete temp ingress
Expand Down

0 comments on commit 336a5a5

Please sign in to comment.