kelseyhightower / grafeas-tutorial

A step by step guide for getting started with Grafeas and Kubernetes.
Apache License 2.0
190 stars 45 forks source link

Error validating data: unknown field "webHooks" #6

Open andyrhee opened 6 years ago

andyrhee commented 6 years ago

When I run the following, I get the error:

$ kubectl apply -f kubernetes/validating-webhook-configuration.yaml
error: error validating "kubernetes/validating-webhook-configuration.yaml": error validating data: ValidationError(ValidatingWebhookConfiguration): unknown field "webHooks" in io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration; if you choose to ignore these errors, turn validation off with --validate=false

This can be fixed simply by changing webHooks to webhooks:

$ git diff
diff --git a/kubernetes/validating-webhook-configuration.yaml b/kubernetes/validating-webhook-configuration.yaml
index 886ea73..1a716fb 100644
--- a/kubernetes/validating-webhook-configuration.yaml
+++ b/kubernetes/validating-webhook-configuration.yaml
@@ -2,7 +2,7 @@ apiVersion: admissionregistration.k8s.io/v1beta1
 kind: ValidatingWebhookConfiguration
 metadata:
   name: image-signature-webook
-webHooks:
+webhooks:
   - name: image-signature.hightowerlabs.com
     rules:
       - apiGroups:

My kubectl version:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"9+", GitVersion:"v1.9.2-eks.1", GitCommit:"e6c42d312ce5a80461ce10e6543e8fe0346bf065", GitTreeState:"clean", BuildDate:"2018-02-16T21:41:28Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"d2835416544f298c919e2ead3be3d0864b52323b", GitTreeState:"clean", BuildDate:"2018-02-07T11:55:20Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}

I can submit a PR if you want me to, but this is a simple fix so...

jomojowo commented 5 years ago

Hi Andyrhee,

Were you able to get grafeas and webhook validation working? Am issues getting it working. validating not working for me. kindly, assist if you can.