Skip to content
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

Tenant Autoenrolling feature - api & operator #877

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

giacoliva
Copy link
Contributor

@giacoliva giacoliva commented Nov 20, 2023

Description

Workspaces can now set AutoEnroll features with two flags in the Spec (no auto enroll / enroll request and manager's approval / completely self enroll)
Tenants can now autoenroll in Workspaces enabled (with user or candidate role depending on settings)

Tenants are able to edit themselves in order to add or remove Workspaces with autoEnroll enabled

How Has This Been Tested?

Environment:
KinD with CRDs installed, Tenant Operator and Webhooks running. Keycloak not configured.

  • through kubectl api - Tenant edit as root user
  • through kubectl api - Tenant edit as tenant user role (kubectl --as <tenantname>)
  • through kubectl api - Workspace edit as root user
  • through graphql - Tenant & Workspace edit as default user

@giacoliva giacoliva requested a review from a team as a code owner November 20, 2023 17:09
@kingmakerbot
Copy link
Collaborator

Hi @giacoliva. Thanks for your PR.

I am @kingmakerbot.
You can interact with me issuing a slash command in the first line of a comment.
Currently, I understand the following commands:

  • /rebase: Rebase this PR onto the master branch
  • /merge: Merge this PR into the master branch
  • /hold: Adds hold label to prevent merging with /merge
  • /unhold: Removes the hold label to allow merging with /merge
  • /deploy-staging: Deploy a staging environment to test this PR (the build-all flag enables user environments building)
  • /undeploy-staging: Manually undeploy the staging environment

Make sure this PR appears in the CrownLabs changelog, adding one of the following labels:

  • kind/breaking: 💥 Breaking Change
  • kind/feature: 🚀 New Feature
  • kind/bug: 🐛 Bug Fix
  • kind/cleanup: 🧹 Code Refactoring
  • kind/docs: 📝 Documentation

Copy link
Collaborator

@QcFe QcFe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comment on the actual implementation :)

operators/deploy/crds/crownlabs.polito.it_workspaces.yaml Outdated Show resolved Hide resolved
operators/deploy/crds/crownlabs.polito.it_workspaces.yaml Outdated Show resolved Hide resolved
operators/pkg/tenant-controller/tenant_controller.go Outdated Show resolved Hide resolved
operators/pkg/tenant-controller/tenant_controller.go Outdated Show resolved Hide resolved
@giacoliva giacoliva force-pushed the enrollRequest-nocrd branch 2 times, most recently from 9279479 to e031daa Compare December 13, 2023 14:42
@QcFe
Copy link
Collaborator

QcFe commented Dec 13, 2023

/deploy-staging

@kingmakerbot
Copy link
Collaborator

Your staging environment has been correctly deployed/updated!
Available here: Frontend, Qlkube
Operators: add the crownlabs.polito.it/operator-selector=staging-877 label to your tenant.

@QcFe
Copy link
Collaborator

QcFe commented Jan 8, 2024

/deploy-staging

@kingmakerbot
Copy link
Collaborator

Your staging environment has been correctly deployed/updated!
Available here: Frontend, Qlkube
Operators: add the crownlabs.polito.it/operator-selector=staging-877 label to your tenant.

@QcFe
Copy link
Collaborator

QcFe commented Jan 8, 2024

/merge

Tenant autoenrolling feature

kc fix

lint fix

broken link fix
@QcFe
Copy link
Collaborator

QcFe commented Jan 8, 2024

/merge

@kingmakerbot kingmakerbot merged commit 46977d1 into netgroup-polito:master Jan 8, 2024
31 of 32 checks passed
@kingmakerbot
Copy link
Collaborator

Your staging environment has been correctly teared-down!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants