From 007e5c07a7b93761d668f235b64d62ae2502c961 Mon Sep 17 00:00:00 2001 From: Peter Matseykanets Date: Fri, 1 Nov 2024 10:17:04 -0400 Subject: [PATCH] Add versioned docs --- .../version-2.10/api/workflows/projects.md | 76 ++++++++++++++++++- .../version-2.8/api/workflows/projects.md | 71 +++++++++++++++++ .../version-2.9/api/workflows/projects.md | 73 +++++++++++++++++- 3 files changed, 218 insertions(+), 2 deletions(-) diff --git a/versioned_docs/version-2.10/api/workflows/projects.md b/versioned_docs/version-2.10/api/workflows/projects.md index ea4b6fe66f39..1d6f6317c0d9 100644 --- a/versioned_docs/version-2.10/api/workflows/projects.md +++ b/versioned_docs/version-2.10/api/workflows/projects.md @@ -48,6 +48,9 @@ EOF ``` Setting the `field.cattle.io/creatorId` field allows the cluster member account to see project resources with the `get` command and view the project in the Rancher UI. Cluster owner and admin accounts don't need to set this annotation to perform these tasks. +Setting the `field.cattle.io/creator-principal-name` annotation to the user's principal preserves it in a projectroletemplatebinding automatically created for the project owner. + +If you don't want the creator to be added as the owner member (e.g. if the creator is a cluster administrator) to the project you may set the `field.cattle.io/no-creator-rbac` annotation to `true`, which will prevent the corresponding projectroletemplatebinding from being created. ### Creating a Project With a Resource Quota @@ -91,6 +94,77 @@ spec: limitsMemory: 100Mi requestsCpu: 50m requestsMemory: 50Mi +EOF +``` + +## Adding a Member to a Project + +Look up the project ID to specify the `metadata.namespace` field and `projectName` field values. + +```bash +kubectl --namespace c-m-abcde get projects +``` + +Look up the role template ID to specify the `roleTemplateName` field value (e.g. `project-member` or `project-owner`). + +```bash +kubectl get roletemplates +``` + +When adding a user member specify the `userPrincipalName` field: + +```bash +kubectl create -f - <