Skip to content

Create custom user for e2e tests with limited rights #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 14 additions & 2 deletions .github/workflows/e2e_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
- name: Checkout common repo code
uses: actions/checkout@v3
with:
repository: 'project-codeflare/codeflare-common'
ref: 'main'
repository: 'sutaakar/codeflare-common'
ref: 'custom-users'
path: 'common'

- name: Set Go
Expand Down Expand Up @@ -67,6 +67,18 @@ jobs:
echo Setting up CodeFlare stack
make setup-e2e

- name: Add experimental user to KinD
uses: ./common/github-actions/kind-add-user
with:
user-name: experiment

- name: Configure RBAC for experiment user to use edit role with namespaces
run: |
kubectl create clusterrolebinding experiment-edit --clusterrole=edit --user=experiment
kubectl create clusterrole namespace-creator --verb=get,list,create,delete,patch --resource=namespaces
kubectl create clusterrolebinding experiment-namespace-creator --clusterrole=namespace-creator --user=experiment
kubectl config use-context experiment

- name: Run e2e tests
run: |
export CODEFLARE_TEST_TIMEOUT_SHORT=1m
Expand Down