fix(typo): fixing typo in several webhook error messages (#212)

Co-authored-by: Erin Corson <ecorson@vmware.com>
This commit is contained in:
Erin Corson
2021-03-04 08:24:11 +01:00
committed by GitHub
co-authored by Erin Corson
parent 737b6ce65a
commit 2ea36db5d6
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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
```
# Whats next
+1 -1
View File
@@ -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"
}
+2 -2
View File
@@ -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("")
+1 -1
View File
@@ -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 {
+1 -1
View File
@@ -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")
}
}