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

feat(ux): namespace oncrete hook to check namespace exsistence #889

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

prometherion
Copy link
Member

@prometherion prometherion commented Nov 9, 2023

Closes #868.

I tested the behaviour, and it's nice:

$: kubectl get tnt solar
NAME    STATE    NAMESPACE QUOTA   NAMESPACE COUNT   NODE SELECTOR   AGE
solar   Active   1                 1                                 27m

$: kubectl --as alice --as-group capsule.clastix.io create ns solar-test
namespace/solar-test created

$: kubectl --as alice --as-group capsule.clastix.io create ns solar-test
Error from server (AlreadyExists): namespaces "solar-test" already exists

$: kubectl --as alice --as-group capsule.clastix.io create ns solar-overquota
Error from server (Forbidden): admission webhook "namespaces.capsule.clastix.io" denied the request: Cannot exceed Namespace quota: please, reach out to the system administrators

Copy link

netlify bot commented Nov 9, 2023

Deploy Preview for capsule-documentation canceled.

Name Link
🔨 Latest commit 5d2ea24
🔍 Latest deploy log https://app.netlify.com/sites/capsule-documentation/deploys/654ce6af3d241f00085838b7

@prometherion prometherion merged commit 25b4a35 into projectcapsule:main Nov 9, 2023
16 of 23 checks passed
@prometherion prometherion deleted the issues/868 branch November 9, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Modify OnCreate namespace hook to check Namespace Existence by Name
1 participant