Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prime compliance support #431

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Parameter | Description | Default | Notes
`global.azure.images.neuvector_csp_pod.digest` | csp adapter image digest | `nil` | Follow Azure subscription instruction
`global.azure.images.neuvector_csp_pod.imagePullPolicy` | csp adapter image pull policy | `IfNotPresent` | Follow Azure subscription instruction
`controller.enabled` | If true, create controller | `true` |
`controller.prime.enabled` | NeuVector prime deployment | `false` |
`controller.image.repository` | controller image repository | `neuvector/controller` |
`controller.image.hash` | controller image hash in the format of sha256:xxxx. If present it overwrites the image tag value. | |
`controller.replicas` | controller replicas | `3` |
Expand Down
26 changes: 25 additions & 1 deletion charts/core/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ spec:
serviceAccountName: {{ .Values.serviceAccount }}
serviceAccount: {{ .Values.serviceAccount }}
{{- end }}
initContainers:
{{- if or .Values.internal.certmanager.enabled .Values.controller.internal.certificate.secret }}
{{- else if and .Values.internal.autoGenerateCert (not $pre540) }}
initContainers:
- name: init
image: {{ include "neuvector.controller.image" . | quote }}
command: ["/usr/local/bin/upgrader", "create-upgrader-job" ]
Expand All @@ -100,6 +100,21 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.controller.prime.enabled }}
- name: prime-config-container
{{- if .Values.controller.prime.image.hash }}
image: "{{ .Values.registry }}/{{ .Values.controller.prime.image.repository }}@{{ .Values.controller.prime.image.hash }}"
{{- else }}
image: "{{ .Values.registry }}/{{ .Values.controller.prime.image.repository }}:{{ .Values.controller.prime.image.tag }}"
{{- end }}
imagePullPolicy: Always
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /usr/share
name: prime-config
{{- end }}
containers:
- name: neuvector-controller-pod
image: {{ include "neuvector.controller.image" . | quote }}
Expand Down Expand Up @@ -198,6 +213,11 @@ spec:
- mountPath: /etc/config
name: config-volume
readOnly: true
{{- if .Values.controller.prime.enabled }}
- mountPath: /etc/neuvector/prime/compliance/
name: prime-config
readOnly: true
{{- end }}
{{- if .Values.controller.certificate.secret }}
- mountPath: /etc/neuvector/certs/ssl-cert.key
subPath: {{ .Values.controller.certificate.keyFile }}
Expand Down Expand Up @@ -283,6 +303,10 @@ spec:
- secret:
name: neuvector-secret
optional: true
{{- if .Values.controller.prime.enabled }}
- emptyDir: {}
name: prime-config
{{- end }}
{{- if or (eq "true" (toString .Values.autoGenerateCert)) (and .Values.controller.certificate.key .Values.controller.certificate.certificate) }}
- name: cert
secret:
Expand Down
7 changes: 6 additions & 1 deletion charts/core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,12 @@ controller:
# key1: value1
# key2: value2
runAsUser: # MUST be set for Rancher hardened cluster

prime:
enabled: false
image:
repository: neuvector/complianceconfig
tag: 1.0.0
hash:
enforcer:
# If false, enforcer will not be installed
enabled: true
Expand Down
Loading