From 34d9c6d4db837a3ca06117206608954e7a18db06 Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Wed, 25 Aug 2021 00:07:13 +0000 Subject: [PATCH] chart: Fix webhook config installation error This fixes the below error on installing the chart: ``` Error: UPGRADE FAILED: error validating "": error validating data: [ValidationError(MutatingWebhookConfiguration.webhooks[0]): missing required field "admissionReviewVersions" 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 "admissionReviewVersions" in io.k8s.api.admissionregistration.v1.MutatingWebhook, ValidationError(MutatingWebhookConfiguration.webhooks[3]): missing required field "admissionReviewVersions" in io.k8s.api.admissionregistration.v1.MutatingWebhook] ``` Ref #144 --- .../templates/webhook_configs.yaml | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/charts/actions-runner-controller/templates/webhook_configs.yaml b/charts/actions-runner-controller/templates/webhook_configs.yaml index 3f784235..a7453e88 100644 --- a/charts/actions-runner-controller/templates/webhook_configs.yaml +++ b/charts/actions-runner-controller/templates/webhook_configs.yaml @@ -8,7 +8,9 @@ metadata: annotations: cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "actions-runner-controller.servingCertName" . }} webhooks: -- clientConfig: +- admissionReviewVersions: + - v1beta1 + clientConfig: service: name: {{ include "actions-runner-controller.webhookServiceName" . }} namespace: {{ .Release.Namespace }} @@ -26,7 +28,9 @@ webhooks: resources: - runners sideEffects: None -- clientConfig: +- admissionReviewVersions: + - v1beta1 + clientConfig: service: name: {{ include "actions-runner-controller.webhookServiceName" . }} namespace: {{ .Release.Namespace }} @@ -44,7 +48,9 @@ webhooks: resources: - runnerdeployments sideEffects: None -- clientConfig: +- admissionReviewVersions: + - v1beta1 + clientConfig: service: name: {{ include "actions-runner-controller.webhookServiceName" . }} namespace: {{ .Release.Namespace }} @@ -62,7 +68,9 @@ webhooks: resources: - runnerreplicasets sideEffects: None -- clientConfig: +- admissionReviewVersions: + - v1beta1 + clientConfig: service: name: {{ include "actions-runner-controller.webhookServiceName" . }} namespace: {{ .Release.Namespace }} @@ -91,7 +99,9 @@ metadata: annotations: cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "actions-runner-controller.servingCertName" . }} webhooks: -- clientConfig: +- admissionReviewVersions: + - v1beta1 + clientConfig: service: name: {{ include "actions-runner-controller.webhookServiceName" . }} namespace: {{ .Release.Namespace }} @@ -109,7 +119,9 @@ webhooks: resources: - runners sideEffects: None -- clientConfig: +- admissionReviewVersions: + - v1beta1 + clientConfig: service: name: {{ include "actions-runner-controller.webhookServiceName" . }} namespace: {{ .Release.Namespace }} @@ -127,7 +139,9 @@ webhooks: resources: - runnerdeployments sideEffects: None -- clientConfig: +- admissionReviewVersions: + - v1beta1 + clientConfig: service: name: {{ include "actions-runner-controller.webhookServiceName" . }} namespace: {{ .Release.Namespace }}