Skip to content

Commit

Permalink
fix: NVSHAS-8682 remove misplaced resc from crds
Browse files Browse the repository at this point in the history
In the previous charts, a service neuvector-svc-crd-webhook is misplaced
in crds charts.

This commit fixes the issue.

Note: This change would affect upgrade.  Users are advised to upgrade
crds first before upgrade core in order to prevent resource conflict.
  • Loading branch information
holyspectral committed Oct 31, 2024
1 parent 3ddd337 commit 26df101
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 37 deletions.
19 changes: 19 additions & 0 deletions charts/core/templates/crd-webhook-service.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
18 changes: 0 additions & 18 deletions charts/core/templates/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
19 changes: 0 additions & 19 deletions charts/crd/templates/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 26df101

Please sign in to comment.