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

SLK-88616 - Allow user to specify where aquasec from the container will be mounted #918

Open
wants to merge 2 commits into
base: 2022.4
Choose a base branch
from
Open
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 enforcer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ Parameter | Description | Default| Mandatory
`TLS.privateKey_fileName` | filename of the private key eg: aqua_enforcer.key | `nil` | `YES` <br /> `if TLS.enabled is set to true`
`TLS.rootCA_fileName` | filename of the rootCA, if using self-signed certificates eg: rootCA.crt | `nil` | `NO` <br /> `if TLS.enabled is set to true and using self-signed certificates for TLS/mTLS`
`TLS.aqua_verify_enforcer` | change it to "1" or "0" for enabling/disabling mTLS between enforcer and ay/envoy | `0` | `YES` <br /> `if TLS.enabled is set to true`
`hostAquasecPath` | folder on host machine where aquasec folder in the container will be mounted | `unset` | `NO`
`extraEnvironmentVars` | is a list of extra environment variables to set in the enforcer daemonset.| `{}` | `NO`
`extraSecretEnvironmentVars` | is a list of extra environment variables to set in the scanner daemonset, these variables take value from existing Secret objects. | `[]` | `NO`
`windowsEnforcer.allWinNodes.enable` | Enable to true, If All the nodes are windows os and it deploys only windows agents on all windows nodes | `false` | `NO`
Expand Down
7 changes: 7 additions & 0 deletions enforcer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,11 @@ For gke-autopilot should be /var/autopilot/addon
{{- else -}}
{{- printf "%s" "/var/lib" -}}
{{- end -}}
{{- end -}}
{{- define "hostAquasecPath" -}}
{{- if .Values.hostAquasecPath -}}
{{- printf "%s" .Values.hostAquasecPath }}
{{- else -}}
{{- template "varLibPrefix" . }}/aquasec
{{- end -}}
{{- end -}}
10 changes: 5 additions & 5 deletions enforcer/templates/enforcer-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ spec:
name: aquasec-audit
- mountPath: /data
name: aquasec-data
- mountPath: {{ template "varLibPrefix" . }}/containers
- mountPath: /var/lib/containers
name: containers
{{- if .Values.healthMonitor.enabled }}
{{- with .Values.livenessProbe }}
Expand Down Expand Up @@ -220,18 +220,18 @@ spec:
type: ""
- name: aquasec
hostPath:
path: {{ template "varLibPrefix" . }}/aquasec
path: {{ template "hostAquasecPath" . }}
type: ""
- name: aquasec-tmp
hostPath:
path: {{ template "varLibPrefix" . }}/aquasec/tmp
path: {{ template "hostAquasecPath" . }}/tmp
type: ""
- name: aquasec-audit
hostPath:
path: {{ template "varLibPrefix" . }}/aquasec/audit
path: {{ template "hostAquasecPath" . }}/audit
- name: aquasec-data
hostPath:
path: {{ template "varLibPrefix" . }}/aquasec/data
path: {{ template "hostAquasecPath" . }}/data
type: ""
- name: containers
hostPath:
Expand Down