diff --git a/charts/projectsveltos/Chart.yaml b/charts/projectsveltos/Chart.yaml index d69fece..bebaa46 100644 --- a/charts/projectsveltos/Chart.yaml +++ b/charts/projectsveltos/Chart.yaml @@ -13,7 +13,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.44.1 +version: 0.44.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. diff --git a/charts/projectsveltos/templates/deployment.yaml b/charts/projectsveltos/templates/deployment.yaml index e7fea2e..d3204c8 100644 --- a/charts/projectsveltos/templates/deployment.yaml +++ b/charts/projectsveltos/templates/deployment.yaml @@ -597,6 +597,7 @@ metadata: name: register-mgmt-cluster labels: {{- include "projectsveltos.labels" . | nindent 4 }} +{{ if .Values.webhook.conversion }} --- apiVersion: apps/v1 kind: Deployment @@ -668,4 +669,4 @@ spec: secret: defaultMode: 420 secretName: webhook-server-cert - +{{ end }} diff --git a/charts/projectsveltos/templates/project-selfsigned-issuer.yaml b/charts/projectsveltos/templates/project-selfsigned-issuer.yaml index dfdc333..1bf32d3 100644 --- a/charts/projectsveltos/templates/project-selfsigned-issuer.yaml +++ b/charts/projectsveltos/templates/project-selfsigned-issuer.yaml @@ -1,3 +1,4 @@ +{{ if .Values.webhook.conversion }} apiVersion: cert-manager.io/v1 kind: Issuer metadata: @@ -5,4 +6,5 @@ metadata: labels: {{- include "projectsveltos.labels" . | nindent 4 }} spec: - selfSigned: {} \ No newline at end of file + selfSigned: {} +{{ end }} \ No newline at end of file diff --git a/charts/projectsveltos/templates/projectsveltos-mutating-webhook-configuration.yaml b/charts/projectsveltos/templates/projectsveltos-mutating-webhook-configuration.yaml index 2e90069..e75c55c 100644 --- a/charts/projectsveltos/templates/projectsveltos-mutating-webhook-configuration.yaml +++ b/charts/projectsveltos/templates/projectsveltos-mutating-webhook-configuration.yaml @@ -1,3 +1,4 @@ +{{ if .Values.webhook.conversion }} apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: @@ -17,4 +18,5 @@ webhooks: path: /mutate-projectsveltos-v1beta1-clusterprofile failurePolicy: Fail name: mclusterprofile.projectsveltos.io - sideEffects: None \ No newline at end of file + sideEffects: None +{{ end }} \ No newline at end of file diff --git a/charts/projectsveltos/templates/projectsveltos-serving-cert.yaml b/charts/projectsveltos/templates/projectsveltos-serving-cert.yaml index 70a414b..ecc645f 100644 --- a/charts/projectsveltos/templates/projectsveltos-serving-cert.yaml +++ b/charts/projectsveltos/templates/projectsveltos-serving-cert.yaml @@ -1,3 +1,4 @@ +{{ if .Values.webhook.conversion }} apiVersion: cert-manager.io/v1 kind: Certificate metadata: @@ -12,3 +13,4 @@ spec: kind: Issuer name: 'project-selfsigned-issuer' secretName: webhook-server-cert +{{ end }} diff --git a/charts/projectsveltos/templates/webhook-service.yaml b/charts/projectsveltos/templates/webhook-service.yaml index 71ee973..7a95c04 100644 --- a/charts/projectsveltos/templates/webhook-service.yaml +++ b/charts/projectsveltos/templates/webhook-service.yaml @@ -1,3 +1,4 @@ +{{ if .Values.webhook.conversion }} apiVersion: v1 kind: Service metadata: @@ -10,4 +11,5 @@ spec: app: sveltos-webhook {{- include "projectsveltos.selectorLabels" . | nindent 4 }} ports: - {{- .Values.webhookService.ports | toYaml | nindent 2 -}} \ No newline at end of file + {{- .Values.webhookService.ports | toYaml | nindent 2 -}} +{{ end }} \ No newline at end of file diff --git a/charts/projectsveltos/values.yaml b/charts/projectsveltos/values.yaml index 9350df5..2f34018 100644 --- a/charts/projectsveltos/values.yaml +++ b/charts/projectsveltos/values.yaml @@ -251,3 +251,5 @@ webhookService: protocol: TCP targetPort: 9443 type: ClusterIP +webhook: + conversion: false \ No newline at end of file