Feat: support chart value to disable conversation on application crd (#3890)

Signed-off-by: huangminjie <minjie.huang@daocloud.io>
This commit is contained in:
JarHMJ 2022-05-21 22:57:38 +08:00 committed by GitHub
parent ba7c22a37e
commit 55f82781ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 29 deletions

View File

@ -6,18 +6,6 @@ metadata:
controller-gen.kubebuilder.io/version: v0.6.2 controller-gen.kubebuilder.io/version: v0.6.2
name: applications.core.oam.dev name: applications.core.oam.dev
spec: spec:
conversion:
strategy: Webhook
webhook:
clientConfig:
service:
name: vela-core-webhook
namespace: vela-system
path: /convert
port: 443
conversionReviewVersions:
- v1beta1
- v1alpha2
group: core.oam.dev group: core.oam.dev
names: names:
categories: categories:

View File

@ -36,7 +36,9 @@ spec:
- --namespace={{ .Release.Namespace }} - --namespace={{ .Release.Namespace }}
- --secret-name={{ template "kubevela.fullname" . }}-admission - --secret-name={{ template "kubevela.fullname" . }}-admission
- --patch-failure-policy={{ .Values.admissionWebhooks.failurePolicy }} - --patch-failure-policy={{ .Values.admissionWebhooks.failurePolicy }}
- --crds=applications.core.oam.dev {{- if .Values.admissionWebhooks.appConversion.enabled }}
- --crds={"name":"applications.core.oam.dev","conversion":{"strategy":"Webhook","webhook":{"clientConfig":{"service":{"name":"vela-core-webhook","namespace":"vela-system","path":"/convert","port":443}},"conversionReviewVersions":["v1beta1","v1alpha2"]}}}
{{- end }}
restartPolicy: OnFailure restartPolicy: OnFailure
serviceAccountName: {{ template "kubevela.fullname" . }}-admission serviceAccountName: {{ template "kubevela.fullname" . }}-admission
{{- with .Values.admissionWebhooks.patch.affinity }} {{- with .Values.admissionWebhooks.patch.affinity }}

View File

@ -224,11 +224,13 @@ admissionWebhooks:
enabled: true enabled: true
image: image:
repository: oamdev/kube-webhook-certgen repository: oamdev/kube-webhook-certgen
tag: v2.3 tag: v2.4.0
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
nodeSelector: {} nodeSelector: {}
affinity: {} affinity: {}
tolerations: [] tolerations: []
appConversion:
enabled: false
certManager: certManager:
enabled: false enabled: false
revisionHistoryLimit: 3 revisionHistoryLimit: 3

View File

@ -6,18 +6,6 @@ metadata:
controller-gen.kubebuilder.io/version: v0.6.2 controller-gen.kubebuilder.io/version: v0.6.2
name: applications.core.oam.dev name: applications.core.oam.dev
spec: spec:
conversion:
strategy: Webhook
webhook:
clientConfig:
service:
name: vela-core-webhook
namespace: vela-system
path: /convert
port: 443
conversionReviewVersions:
- v1beta1
- v1alpha2
group: core.oam.dev group: core.oam.dev
names: names:
categories: categories:

View File

@ -32,7 +32,9 @@ spec:
- --namespace={{ .Release.Namespace }} - --namespace={{ .Release.Namespace }}
- --secret-name={{ template "kubevela.fullname" . }}-admission - --secret-name={{ template "kubevela.fullname" . }}-admission
- --patch-failure-policy={{ .Values.admissionWebhooks.failurePolicy }} - --patch-failure-policy={{ .Values.admissionWebhooks.failurePolicy }}
- --crds=applications.core.oam.dev {{- if .Values.admissionWebhooks.appConversion.enabled }}
- --crds={"name":"applications.core.oam.dev","conversion":{"strategy":"Webhook","webhook":{"clientConfig":{"service":{"name":"vela-core-webhook","namespace":"vela-system","path":"/convert","port":443}},"conversionReviewVersions":["v1beta1","v1alpha2"]}}}
{{- end }}
restartPolicy: OnFailure restartPolicy: OnFailure
serviceAccountName: {{ template "kubevela.fullname" . }}-admission serviceAccountName: {{ template "kubevela.fullname" . }}-admission
{{- with .Values.admissionWebhooks.patch.nodeSelector }} {{- with .Values.admissionWebhooks.patch.nodeSelector }}

View File

@ -201,11 +201,13 @@ admissionWebhooks:
enabled: true enabled: true
image: image:
repository: oamdev/kube-webhook-certgen repository: oamdev/kube-webhook-certgen
tag: v2.3 tag: v2.4.0
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
nodeSelector: {} nodeSelector: {}
affinity: {} affinity: {}
tolerations: [] tolerations: []
appConversion:
enabled: false
certManager: certManager:
enabled: false enabled: false
revisionHistoryLimit: 3 revisionHistoryLimit: 3

View File

@ -7,7 +7,7 @@ resources:
patchesStrategicMerge: patchesStrategicMerge:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
- patches/webhook_in_applications.yaml # - patches/webhook_in_applications.yaml
# +kubebuilder:scaffold:crdkustomizewebhookpatch # +kubebuilder:scaffold:crdkustomizewebhookpatch
# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. # [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.