Actions-runner-controller: Error installing chart `0.6.0`

Created on 27 Feb 2021  路  6Comments  路  Source: summerwind/actions-runner-controller

When trying to upgrade I get this error, and I'm pretty confused about how to diagnose it.

  Error: Failed to render chart: exit status 1: Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(MutatingWebhookConfiguration.webhooks[0]): missing required field "sideEffects" in io.k8s.api.admissionregistration.v1.MutatingWebhook, ValidationError(MutatingWebhookConfiguration.webhooks[0]): missing required field "admissionReviewVersions" in io.k8s.api.admissionregistration.v1.MutatingWebhook, ValidationError(MutatingWebhookConfiguration.webhooks[1]): missing required field "sideEffects" in io.k8s.api.admissionregistration.v1.MutatingWebhook, ValidationError(MutatingWebhookConfiguration.webhooks[1]): missing required field "admissionReviewVersions" in io.k8s.api.admissionregistration.v1.MutatingWebhook, ValidationError(MutatingWebhookConfiguration.webhooks[2]): missing required field "sideEffects" in io.k8s.api.admissionregistration.v1.MutatingWebhook, ValidationError(MutatingWebhookConfiguration.webhooks[2]): missing required field "admissionReviewVersions" in io.k8s.api.admissionregistration.v1.MutatingWebhook]
  Error: plugin "diff" exited with error

All 6 comments

Thanks for reporting! It seems like we're missing sideEffects: None for validating and mutating webhook configs https://github.com/summerwind/actions-runner-controller/blob/master/charts/actions-runner-controller/templates/webhook_configs.yaml for K8s 1.16 or greater.

We've recently added

{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: admissionregistration.k8s.io/v1

to the condition so it should be affecting any setup with K8s 1.16 or greate.

https://github.com/Jollerprutt/actions-runner-controller/commit/16a6565b5cda090afa9bfede95a89347c7b7c2a9 allows the chart to install.
However it without an AdmissionReview response the webhooks don't work.

$ kubectl apply -f runner.yaml -n actions-runner-system
Error from server (InternalError): error when creating "runner.yaml": Internal error occurred: failed calling webhook "mutate.runner.actions.summerwind.dev": expected response.uid="8d58c51d-5010-4df7-90ce-b074bf3a3bf5", got ""

Sorry, #343 is broken. I just wrote a fix #364.
@mumoshu Can you review and merge?

@kimxogus I've just tried your fix and I'm still unable to deploy a runnerdeployment manifest. Helm chart installs fine, but still errors for runners manifest.

Error from server (InternalError): error when creating "runnerdeployment-manifest.yaml": Internal error occurred: failed calling webhook "mutate.runnerdeployment.actions.summerwind.dev": expected response.uid="b0a8f972-1c31-4c4a-92a4-38c716eb9894", got ""

And there is an error in logs

no kind \"AdmissionReview\" is registered for version \"admission.k8s.io/v1\"

Full error

2021-03-02T12:14:49.975Z    ERROR   controller-runtime.webhook.webhooks unable to decode the request    {"webhook": "/mutate-actions-summerwind-dev-v1alpha1-runnerdeployment", "error": "no kind \"AdmissionReview\" is registered for version \"admission.k8s.io/v1\" in scheme \"pkg/runtime/scheme.go:101\""}
github.com/go-logr/zapr.(*zapLogger).Error
    /go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128
sigs.k8s.io/controller-runtime/pkg/webhook/admission.(*Webhook).ServeHTTP
    /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/admission/http.go:79
sigs.k8s.io/controller-runtime/pkg/webhook.instrumentedHook.func1
    /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/webhook/server.go:117
net/http.HandlerFunc.ServeHTTP
    /usr/local/go/src/net/http/server.go:2042
net/http.(*ServeMux).ServeHTTP
    /usr/local/go/src/net/http/server.go:2417
net/http.serverHandler.ServeHTTP
    /usr/local/go/src/net/http/server.go:2843
net/http.(*conn).serve
    /usr/local/go/src/net/http/server.go:1925

The kubernetes version is v1.16.15

It seems weird, I reverted to v1beta1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

missedone picture missedone  路  10Comments

kimxogus picture kimxogus  路  3Comments

naka-gawa picture naka-gawa  路  5Comments

iagomelanias picture iagomelanias  路  6Comments

vitobotta picture vitobotta  路  7Comments