mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-19 12:36:39 +00:00
fix(typo): fixing typo in several webhook error messages (#212)
Co-authored-by: Erin Corson <ecorson@vmware.com>
This commit is contained in:
co-authored by
Erin Corson
parent
737b6ce65a
commit
2ea36db5d6
@@ -90,7 +90,7 @@ Once the namespace quota assigned to the tenant has been reached, Alice cannot c
|
||||
|
||||
```
|
||||
alice@caas# kubectl create ns oil-training
|
||||
Error from server (Cannot exceed Namespace quota: please, reach out the system administrators): admission webhook "quota.namespace.capsule.clastix.io" denied the request.
|
||||
Error from server (Cannot exceed Namespace quota: please, reach out to the system administrators): admission webhook "quota.namespace.capsule.clastix.io" denied the request.
|
||||
```
|
||||
The enforcement on the maximum number of Namespace resources per Tenant is the responsibility of the Capsule controller via its Dynamic Admission Webhook capability.
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ However, the Capsule controller prevents Alice to delete the tenant network poli
|
||||
|
||||
```
|
||||
alice@caas# kubectl -n oil-production delete networkpolicy capsule-oil-0
|
||||
Error from server (Capsule Network Policies cannot be deleted: please, reach out the system administrators): admission webhook "validating.network-policy.capsule.clastix.io" denied the request: Capsule Network Policies cannot be deleted: please, reach out the system administrators
|
||||
Error from server (Capsule Network Policies cannot be deleted: please, reach out to the system administrators): admission webhook "validating.network-policy.capsule.clastix.io" denied the request: Capsule Network Policies cannot be deleted: please, reach out to the system administrators
|
||||
```
|
||||
|
||||
# What’s next
|
||||
|
||||
@@ -23,5 +23,5 @@ func NewNamespaceQuotaExceededError() error {
|
||||
}
|
||||
|
||||
func (namespaceQuotaExceededError) Error() string {
|
||||
return "Cannot exceed Namespace quota: please, reach out the system administrators"
|
||||
return "Cannot exceed Namespace quota: please, reach out to the system administrators"
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ func (r *handler) OnDelete(client client.Client, decoder *admission.Decoder) cap
|
||||
return admission.Errored(http.StatusInternalServerError, err)
|
||||
}
|
||||
if ok {
|
||||
return admission.Denied("Capsule Network Policies cannot be deleted: please, reach out the system administrators")
|
||||
return admission.Denied("Capsule Network Policies cannot be deleted: please, reach out to the system administrators")
|
||||
}
|
||||
|
||||
return admission.Allowed("")
|
||||
@@ -102,7 +102,7 @@ func (r *handler) OnUpdate(client client.Client, decoder *admission.Decoder) cap
|
||||
return admission.Errored(http.StatusInternalServerError, err)
|
||||
}
|
||||
if ok {
|
||||
return admission.Denied("Capsule Network Policies cannot be updated: please, reach out the system administrators")
|
||||
return admission.Denied("Capsule Network Policies cannot be updated: please, reach out to the system administrators")
|
||||
}
|
||||
|
||||
return admission.Allowed("")
|
||||
|
||||
@@ -122,7 +122,7 @@ func (h *handler) OnCreate(clt client.Client, decoder *admission.Decoder) capsul
|
||||
sort.Sort(sort.Reverse(tenants))
|
||||
|
||||
if len(tenants) == 0 {
|
||||
return admission.Denied("You do not have any Tenant assigned: please, reach out the system administrators")
|
||||
return admission.Denied("You do not have any Tenant assigned: please, reach out to the system administrators")
|
||||
}
|
||||
|
||||
if len(tenants) == 1 {
|
||||
|
||||
@@ -76,7 +76,7 @@ func (r *handler) OnCreate(clt client.Client, decoder *admission.Decoder) capsul
|
||||
}
|
||||
if r.protectedNamespacesRegex != nil {
|
||||
if matched := r.protectedNamespacesRegex.MatchString(ns.GetName()); matched {
|
||||
return admission.Denied("Creating namespaces with name matching " + r.protectedNamespacesRegex.String() + " regexp is not allowed; please, reach out the system administrators")
|
||||
return admission.Denied("Creating namespaces with name matching " + r.protectedNamespacesRegex.String() + " regexp is not allowed; please, reach out to the system administrators")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user