-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add platform engineer user entity and developer group #16
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
base: main
Are you sure you want to change the base?
feat: add platform engineer user entity and developer group #16
Conversation
| children: [] | ||
| --- | ||
| apiVersion: backstage.io/v1alpha1 | ||
| kind: Group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This group makes it easier to assign RBAC permissions to all regular users1...n
| apiVersion: backstage.io/v1alpha1 | ||
| kind: User | ||
| metadata: | ||
| name: pe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PE user will have admin privileges from RBAC plugin
| picture: https://avatars.dicebear.com/api/avataaars/breanna-davison@example.com.svg?background=%23fff | ||
| memberOf: [user{{ index + 1 }}] | ||
| picture: https://api.dicebear.com/9.x/thumbs/svg?seed={{ user_images[index % user_images | length] }} | ||
| memberOf: [user{{ index + 1 }}, developers] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: should we remove the userN group entirely? Was there a reason it was added? Seems a little confusing to have a user and group with the same name 1:1.
What does this PR do / why we need it
Enables a new platform engineer user to login. Linked PR redhat-gpte-devopsautomation/agnosticg#5
It also creates a
developersgroup foruser1..userN, and fixes the avatar URLs to use the newer format by dicebear.In theory we can avoid the need to hardcode these entities in the future, by using the GitLab Org plugin and structuring groups in GitLab appropriately. It will depend on this issue being resolved
How to test changes / Special notes to the reviewer
You can add this entity to the org.yaml on an existing RHDH demo cluster and create the user manually in GitLab using the following cURL command. You should be able to login to RHDH as the
peuser after completing both of these steps.curl --request POST \ --url "$GITLAB_HOST/api/v4/users" \ --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \ --header "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "admin=false" \ --data-urlencode "email=pe@demo.com" \ --data-urlencode "public_email=pe@demo.com" \ --data-urlencode "skip_confirmation=true" \ --data-urlencode "username=pe" \ --data-urlencode "password=$PE_PASSWORD" \ --data-urlencode "name=Platform Engineer"