forked from karmada-io/karmada
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request karmada-io#779 from jrkeen/support_multi_version_c…
…onversion chart support multi version conversion
- Loading branch information
Showing
4 changed files
with
175 additions
and
55 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
charts/templates/_patch_webhook_in_clusterresourcebindings.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- define "karmada.crd.patch.webhook.clusterresourcebinding" -}} | ||
{{ $name := include "karmada.name" .}} | ||
{{ $namespace := include "karmada.namespace" .}} | ||
--- | ||
# The following patch enables conversion webhook for CRD | ||
# CRD conversion requires k8s 1.13 or later. | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: clusterresourcebindings.work.karmada.io | ||
spec: | ||
conversion: | ||
strategy: Webhook | ||
webhook: | ||
clientConfig: | ||
url: https://{{ $name }}-webhook.{{ $namespace }}.svc:443/convert | ||
{{- include "karmada.webhook.caBundle" . | nindent 8 }} | ||
# TODO(RainbowMango): After we update controller-runtime to v0.10+, then we can remove `v1beta1` | ||
conversionReviewVersions: ["v1beta1", "v1"] | ||
--- | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- define "karmada.crd.patch.webhook.resourcebinding" -}} | ||
{{ $name := include "karmada.name" .}} | ||
{{ $namespace := include "karmada.namespace" .}} | ||
--- | ||
# The following patch enables conversion webhook for CRD | ||
# CRD conversion requires k8s 1.13 or later. | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: resourcebindings.work.karmada.io | ||
spec: | ||
conversion: | ||
strategy: Webhook | ||
webhook: | ||
clientConfig: | ||
url: https://{{ $name }}-webhook.{{ $namespace }}.svc:443/convert | ||
{{- include "karmada.webhook.caBundle" . | nindent 8 }} | ||
# TODO(RainbowMango): After we update controller-runtime to v0.10+, then we can remove `v1beta1` | ||
conversionReviewVersions: ["v1beta1", "v1"] | ||
--- | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters