Sync groups to DSMLP from AWSEd. Creates workspaces and pod security policies (superceded by OPA)
Usage:
docker run --rm -it --network host \
-e AWSED_API_KEY=key \
-v admin.conf:/root/.kube/config:ro \
ucsd-ets/group-sync:latest
kubectl delete pod group-sync -n group-sync
kubectl run group-sync -it \
--namespace=group-sync \
--generator=run-pod/v1 \
--image=ucsdets/group-sync:latest \
--image-pull-policy=Always \
--env AWSED_ENDPOINT=https://awsed-dev.ucsd.edu/api \
--env AWSED_API_KEY=XYZ \
--env AWSED_API_SLUG=dsmlp \
--env COURSE_IDS=BIPN162_S120_A00 \
--env PSP_ENABLED=False \
--env HOMES_ENABLED=True \
--env FORCE_CREATE=False \
--serviceaccount default \
--requests=cpu=100m,memory=256Mi
Config
~/.kube/config or supplied as a config mapapiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "group-sync.fullname" . }}
rules:
- apiGroups: ["extensions", "policy"]
resources: ["podsecuritypolicies"]
verbs: ["get", "patch", "update"]
- apiGroups: [""]
resources:
- persistentvolumeclaims
verbs:
- list
- create
- get
- apiGroups: [""]
resources:
- persistentvolumes
verbs:
- get
- list
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "group-sync.fullname" . }}
subjects:
- kind: ServiceAccount
namespace: group-sync
name: default
roleRef:
kind: ClusterRole #this must be Role or ClusterRole
name: group-sync # this must match the name of the Role or ClusterRole you wish to bind to
apiGroup: rbac.authorization.k8s.io
<cd to repository base>
sudo apt install python3.8-venv
<cd to repository base>
brew install [email protected]
python3.8 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
For unit tests:
tox
For integration tests:
./run_integration_tests.sh
NOTE: Docker required for integration tests
tox -e protoc
Content type
Image
Digest
sha256:f1064becb…
Size
367 MB
Last updated
over 2 years ago
docker pull ucsdets/group-sync