Skip to content

Commit

Permalink
Merge pull request #81 from gianlucam76/conversion-webhook
Browse files Browse the repository at this point in the history
(feat) do not start conversion webhook by default
  • Loading branch information
gianlucam76 authored Dec 11, 2024
2 parents 81c6670 + 9562bb8 commit 38f2fad
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/projectsveltos/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion charts/projectsveltos/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ metadata:
name: register-mgmt-cluster
labels:
{{- include "projectsveltos.labels" . | nindent 4 }}
{{ if .Values.webhook.conversion }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -668,4 +669,4 @@ spec:
secret:
defaultMode: 420
secretName: webhook-server-cert

{{ end }}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{ if .Values.webhook.conversion }}
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: project-selfsigned-issuer
labels:
{{- include "projectsveltos.labels" . | nindent 4 }}
spec:
selfSigned: {}
selfSigned: {}
{{ end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.webhook.conversion }}
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
Expand All @@ -17,4 +18,5 @@ webhooks:
path: /mutate-projectsveltos-v1beta1-clusterprofile
failurePolicy: Fail
name: mclusterprofile.projectsveltos.io
sideEffects: None
sideEffects: None
{{ end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.webhook.conversion }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -12,3 +13,4 @@ spec:
kind: Issuer
name: 'project-selfsigned-issuer'
secretName: webhook-server-cert
{{ end }}
4 changes: 3 additions & 1 deletion charts/projectsveltos/templates/webhook-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.webhook.conversion }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -10,4 +11,5 @@ spec:
app: sveltos-webhook
{{- include "projectsveltos.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.webhookService.ports | toYaml | nindent 2 -}}
{{- .Values.webhookService.ports | toYaml | nindent 2 -}}
{{ end }}
2 changes: 2 additions & 0 deletions charts/projectsveltos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,5 @@ webhookService:
protocol: TCP
targetPort: 9443
type: ClusterIP
webhook:
conversion: false

0 comments on commit 38f2fad

Please sign in to comment.