Skip to content

Commit f0fc256

Browse files
committed
update scripts.
1 parent 0496aef commit f0fc256

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- ../../../base/user.openshift.io/groups/neu-students
4+
- ../../../base/user.openshift.io/groups/neu-students
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- ../common
4+
- ../common

scripts/offboarding.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ PROJECT=$(yq e .project-name ${CONFIG})
1212
ENVIRONMENT=moc
1313
CLUSTER=$(yq e '.cluster[0] | downcase' ${CONFIG})
1414
NAMESPACE=$(yq e '.project-name | downcase' ${CONFIG})
15-
REQUESTER=$(yq e '.project-owner' ${CONFIG})
16-
DISPLAY_NAME=$(yq e '.project-name' ${CONFIG})
17-
PROJECT_OWNER=$(yq e '.project-owner' ${CONFIG})
18-
ONBOARDING_ISSUE=https://github.com/${ORG_NAME}/${SOURCE_REPO}/issues/${ISSUE_NUMBER}
19-
DOCS=$(yq e '.project-docs-link' ${CONFIG})
2015
GROUP=$(yq e '.team-name' ${CONFIG})
21-
USERS=$(yq '.users | split(",") | map(trim)' -o json -I=0 ${CONFIG})
22-
QUOTA=$(yq e '.quota[0] | downcase' ${CONFIG})
2316

2417

2518
# Remove OCP Group for team being onboarded
@@ -36,6 +29,9 @@ RBAC_PATH="${REPO}/cluster-scope/components/project-admin-rolebindings/${GROUP}/
3629
rm ${RBAC_PATH} -rf
3730

3831
# Remove from cluster
39-
# TODO
32+
cd ${REPO}/cluster-scope/overlays/prod/common
33+
kustomize edit remove resource ../../../base/user.openshift.io/groups/${GROUP}
34+
cd ${REPO}/cluster-scope/overlays/prod/${ENVIRONMENT}/${CLUSTER}
35+
kustomize edit remove resource ../../../../base/core/namespaces/${NAMESPACE}
4036

4137
set -o allexport

scripts/onboarding.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ REPO=${WORKING_DIR}/apps
99

1010
# Unpack Config file, we will need these environment variables for the remainder of the steps
1111
PROJECT=$(yq e .project-name ${CONFIG})
12-
ENVIRONMENT=moc
12+
ENVIRONMENT=$(yq e '.environment[0] | downcase' ${CONFIG})
1313
CLUSTER=$(yq e '.cluster[0] | downcase' ${CONFIG})
1414
NAMESPACE=$(yq e '.project-name | downcase' ${CONFIG})
1515
REQUESTER=$(yq e '.project-owner' ${CONFIG})
@@ -77,7 +77,10 @@ yq -i '.resources |= sort' kustomization.yaml
7777
cd ${REPO}/cluster-scope/overlays/prod/common
7878
kustomize edit add resource ../../../base/user.openshift.io/groups/${GROUP}
7979

80-
# Same as earlier, here we sort the resources field
80+
# Same as before, sort the resources field
8181
yq -i '.resources |= sort' kustomization.yaml
8282

83+
# Commit changes
84+
# TODO
85+
8386
set -o allexport

0 commit comments

Comments
 (0)