diff --git a/charts/core/templates/crd-webhook-service.yaml b/charts/core/templates/crd-webhook-service.yaml new file mode 100644 index 00000000..a4f9e58b --- /dev/null +++ b/charts/core/templates/crd-webhook-service.yaml @@ -0,0 +1,19 @@ +{{- if .Values.crdwebhook.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: neuvector-svc-crd-webhook + namespace: {{ .Release.Namespace }} + labels: + chart: {{ template "neuvector.chart" . }} + release: {{ .Release.Name }} +spec: + ports: + - port: 443 + targetPort: 30443 + protocol: TCP + name: crd-webhook + type: {{ .Values.crdwebhook.type }} + selector: + app: neuvector-controller-pod +{{- end }} diff --git a/charts/core/templates/crd.yaml b/charts/core/templates/crd.yaml index 6c726d34..15834c9d 100644 --- a/charts/core/templates/crd.yaml +++ b/charts/core/templates/crd.yaml @@ -974,22 +974,4 @@ spec: type: object type: object {{- end }} ---- -apiVersion: v1 -kind: Service -metadata: - name: neuvector-svc-crd-webhook - namespace: {{ .Release.Namespace }} - labels: - chart: {{ template "neuvector.chart" . }} - release: {{ .Release.Name }} -spec: - ports: - - port: 443 - targetPort: 30443 - protocol: TCP - name: crd-webhook - type: {{ .Values.crdwebhook.type }} - selector: - app: neuvector-controller-pod {{- end }} diff --git a/charts/crd/templates/crd.yaml b/charts/crd/templates/crd.yaml index 97171909..87b52703 100644 --- a/charts/crd/templates/crd.yaml +++ b/charts/crd/templates/crd.yaml @@ -980,22 +980,3 @@ spec: type: object type: object {{- end }} ---- -apiVersion: v1 -kind: Service -metadata: - name: neuvector-svc-crd-webhook - namespace: {{ .Release.Namespace }} - labels: - chart: {{ template "neuvector.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - ports: - - port: 443 - targetPort: 30443 - protocol: TCP - name: crd-webhook - type: {{ .Values.crdwebhook.type }} - selector: - app: neuvector-controller-pod