Skip to content

Commit 0372654

Browse files
authored
Merge pull request #824 from citizensadvice/review-apps-use-configmaps-subns-anchors
ci(review-app): Update to use new configmap subns anchors
2 parents e273915 + 4701b9a commit 0372654

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/review-app-create.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,15 @@ jobs:
6767
- name: Create Sub-namespace
6868
run: |
6969
kubectl apply -f - << EOF
70-
apiVersion: hnc.x-k8s.io/v1alpha2
71-
kind: SubnamespaceAnchor
70+
apiVersion: v1
71+
kind: ConfigMap
7272
metadata:
73-
name: ${{ env.NAMESPACE }}
73+
name: '${{ env.NAMESPACE }}-namespace-anchor'
7474
namespace: "dev-energy-apps"
75-
EOF
75+
annotations:
76+
citizensadvice.org.uk/subnamespace-anchor: "true"
77+
citizensadvice.org.uk/subnamespace-name: ${{ env.NAMESPACE }}
78+
data: {}
7679
7780
- name: Escape Characters
7881
id: escape_chars

.github/workflows/review-app-destroy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Destroy Review App
4343
run: |
4444
if [[ $(helm status -n ${{ env.NAMESPACE }} ${{ env.NAMESPACE }}) ]] ; then
45-
kubectl delete subnamespaceanchor ${{ env.NAMESPACE }} -n dev-energy-apps
45+
kubectl delete configmap ${{ env.NAMESPACE }}-namespace-anchor -n dev-energy-apps
4646
fi
4747
4848
- name: Remove Review app label

.github/workflows/review-app-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Check Review Environments
3535
id: scan
3636
run: |
37-
pip3 install git+https://github.com/citizensadvice/review-app-scan@v1.2.2
37+
pip3 install git+https://github.com/citizensadvice/review-app-scan@v2.0.0
3838
python3 -m review_app_scan energy-apps dev-energy-apps
3939
4040
trigger_destroy:

0 commit comments

Comments
 (0)