Currently the app doesn't specify any limits to matching resources when it registers the webhook, which results in a webhook with scope set to *, which means it matches any resources, regardless of labels, annotations, etc.
|
Operations: []admissionv1.OperationType{admissionv1.Create, admissionv1.Update}, |
|
Rule: admissionv1.Rule{ |
|
APIGroups: []string{""}, |
|
APIVersions: []string{"v1"}, |
|
Resources: []string{"pods"}, |
|
}, |
|
}, |
|
{ |
|
Operations: []admissionv1.OperationType{admissionv1.Create, admissionv1.Update}, |
|
Rule: admissionv1.Rule{ |
|
APIGroups: []string{"apps"}, |
|
APIVersions: []string{"v1"}, |
|
Resources: []string{"deployments", "statefulsets", "daemonsets", "replicasets"}, |
|
}, |
|
}, |
If the app is unavailable for any reason and k8s can't successfully call it when creating or updating a resource, the create/update action will fail, even if the resource doesn't have anything to do with NSM.
Currently the app doesn't specify any limits to matching resources when it registers the webhook, which results in a webhook with
scopeset to*, which means it matches any resources, regardless of labels, annotations, etc.cmd-admission-webhook-k8s/internal/k8s/selfregister.go
Lines 91 to 105 in cf9eb5f
If the app is unavailable for any reason and k8s can't successfully call it when creating or updating a resource, the create/update action will fail, even if the resource doesn't have anything to do with NSM.