mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-05-09 10:56:34 +00:00
chore(deps): update dependency golangci/golangci-lint to v2.2.1 (#1521)
* chore(deps): update dependency golangci/golangci-lint to v2.2.1 * chore(deps): update github/codeql-action action to v3.29.1 (#1519) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update github/codeql-action digest to 4c57370 (#1518) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency b1nary-gr0up/nwa to v0.7.4 (#1520) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency golangci/golangci-lint to v2.2.1 chore(deps): update dependency golangci/golangci-lint to v2.2.1 Signed-off-by: Hristo Hristov <me@hhristov.info> --------- Signed-off-by: Hristo Hristov <me@hhristov.info> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Hristo Hristov <me@hhristov.info>
This commit is contained in:
@@ -74,7 +74,6 @@ func (r *collision) validate(ctx context.Context, client client.Client, req admi
|
||||
}
|
||||
|
||||
var collisionErr *ingressHostnameCollisionError
|
||||
|
||||
if errors.As(err, &collisionErr) {
|
||||
recorder.Eventf(tenant, corev1.EventTypeWarning, "IngressHostnameCollision", "Ingress %s/%s hostname is colliding", ing.Namespace(), ing.Name())
|
||||
}
|
||||
|
||||
@@ -80,7 +80,6 @@ func (r *hostnames) validate(ctx context.Context, client client.Client, req admi
|
||||
}
|
||||
|
||||
var hostnameNotValidErr *ingressHostnameNotValidError
|
||||
|
||||
if errors.As(err, &hostnameNotValidErr) {
|
||||
recorder.Eventf(tenant, corev1.EventTypeWarning, "IngressHostnameNotValid", "Ingress %s/%s hostname is not valid", ingress.Namespace(), ingress.Name())
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ func (r *userMetadataHandler) getForbiddenNodeLabels(node *corev1.Node) map[stri
|
||||
|
||||
for label, value := range node.GetLabels() {
|
||||
var forbidden, matched bool
|
||||
|
||||
forbidden = forbiddenLabels.ExactMatch(label)
|
||||
matched = forbiddenLabels.RegexMatch(label)
|
||||
|
||||
@@ -115,6 +116,7 @@ func (r *userMetadataHandler) getForbiddenNodeAnnotations(node *corev1.Node) map
|
||||
|
||||
for annotation, value := range node.GetAnnotations() {
|
||||
var forbidden, matched bool
|
||||
|
||||
forbidden = forbiddenAnnotations.ExactMatch(annotation)
|
||||
matched = forbiddenAnnotations.RegexMatch(annotation)
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ func (r *resourceCounterHandler) OnCreate(clt client.Client, _ admission.Decoder
|
||||
var tntName string
|
||||
|
||||
var err error
|
||||
|
||||
if tntName, err = r.getTenantName(ctx, clt, req); err != nil {
|
||||
return utils.ErroredResponse(err)
|
||||
}
|
||||
@@ -90,7 +89,6 @@ func (r *resourceCounterHandler) OnDelete(clt client.Client, _ admission.Decoder
|
||||
var tntName string
|
||||
|
||||
var err error
|
||||
|
||||
if tntName, err = r.getTenantName(ctx, clt, req); err != nil {
|
||||
return utils.ErroredResponse(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user