From 34d9c6d4db837a3ca06117206608954e7a18db06 Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Wed, 25 Aug 2021 00:07:13 +0000 Subject: [PATCH 1/2] 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 }} From 424c33b11f1977144c8b4c7a988878bc41a96d6f Mon Sep 17 00:00:00 2001 From: Yusuke Kuoka Date: Wed, 25 Aug 2021 00:10:16 +0000 Subject: [PATCH 2/2] kustomize: Fix error while generating release manifests This fixes the below error that occurs in `make release`: ``` kustomize build config/default > release/actions-runner-controller.yaml Error: accumulating resources: accumulation err='accumulating resources from '../webhook': '/home/mumoshu/p/actions-runner-controller/config/webhook' must resolve to a file': recursed accumulation of path '/home/mumoshu/p/actions-runner-controller/config/webhook': accumulating resources: accumulation err='accumulating resources from 'manifests.v1beta1.yaml': evalsymlink failure on '/home/mumoshu/p/actions-runner-controller/config/webhook/manifests.v1beta1.yaml' : lstat /home/mumoshu/p/actions-runner-controller/config/webhook/manifests.v1beta1.yaml: no such file or directory': evalsymlink failure on '/home/mumoshu/p/actions-runner-controller/config/webhook/manifests.v1beta1.yaml' : lstat /home/mumoshu/p/actions-runner-controller/config/webhook/manifests.v1beta1.yaml: no such file or directory make: *** [Makefile:156: release] Error 1 ``` Ref #144 --- config/webhook/kustomization.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/webhook/kustomization.yaml b/config/webhook/kustomization.yaml index ed45edef..9cf26134 100644 --- a/config/webhook/kustomization.yaml +++ b/config/webhook/kustomization.yaml @@ -1,6 +1,5 @@ resources: - manifests.yaml -- manifests.v1beta1.yaml - service.yaml configurations: