Skip to content

Instantly share code, notes, and snippets.

@ToroNZ
Created March 26, 2020 03:15
Show Gist options
  • Save ToroNZ/288cb99f0cc4e1dec4d31f38584954f6 to your computer and use it in GitHub Desktop.
Save ToroNZ/288cb99f0cc4e1dec4d31f38584954f6 to your computer and use it in GitHub Desktop.
Request# Activate Forms REST API Endpoint Activate Openshift role Observations Example
1 Create/Delete Project POST /apis/project.openshift.io/v1/projectrequests
DELETE /apis/project.openshift.io/v1/projects
activate-project JSON schema defined here Create
curl -XPOST -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" https://$API_URL:8443/apis/project.openshift.io/v1/projectrequests -d {JSON}
Delete
curl -XDELETE -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' https://$API_URL/apis/project.openshift.io/v1/projects/$PROJECT_NAME
2 Sync groups POST /apis/user.openshift.io/v1/groups activate-groups-sync Syncs AD groups with Openshift ones.
JSON schema defined here
TBC - Tomas to define exactly how we are going to do this.
3 Bind Role POST /apis/rbac.authorization.k8s.io/v1beta1/namespaces/$PROJECT_NAME/rolebindings activate-role-bind Bind Group to Project role.
JSON schema defined here
curl -X POST -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' -H 'Content-Type: application/json' https://$ENDPOINT/apis/rbac.authorization.k8s.io/v1beta1/rolebindings -d {JSON}
Each CREATE project action triggers the creation of 3x AD groups, each AD group is to be bind with a clusterrole (`admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment