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

Updating ClamAV configuration: #1497

Merged
merged 2 commits into from
Nov 29, 2023
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
3 changes: 2 additions & 1 deletion charts/app-config/values-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,13 @@ govukApplications:
- path: /media/
- path: /auth/gds # Viewing draft assets requires user auth.
assetManagerNFS: &assets-nfs assets.blue.integration.govuk-internal.digital
clamMountConfigPath: /usr/local/etc
nginxConfigMap:
create: false
name: asset-manager-nginx-conf
extraEnv:
- name: ASSET_MANAGER_CLAMSCAN_PATH
value: /usr/bin/clamdscan
value: /usr/local/bin/clamdscan
- name: GDS_SSO_OAUTH_ID
valueFrom:
secretKeyRef:
Expand Down
2 changes: 1 addition & 1 deletion charts/asset-manager/templates/_freshclam_podspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- name: clam-virus-db
mountPath: /var/lib/clamav
- name: etc-clamav
mountPath: /etc/clamav
mountPath: {{ .Values.clamMountConfigPath }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand Down
2 changes: 2 additions & 0 deletions charts/asset-manager/templates/clamav-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ data:
Foreground yes
LogTime yes
LogVerbose yes
DatabaseDirectory /var/lib/clamav
DatabaseOwner app
# Avoid peaky RAM usage. clamd will complain anyway if something's wrong with the database.
TestDatabases no
4 changes: 2 additions & 2 deletions charts/asset-manager/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
- name: asset-manager-efs
mountPath: &uploads-path /mnt/asset-manager
- name: etc-clamav
mountPath: /etc/clamav
mountPath: {{ .Values.clamMountConfigPath }}
{{- with .Values.appExtraVolumeMounts }}
{{ . | toYaml | trim | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -123,7 +123,7 @@ spec:
- name: clamd-tmp
mountPath: /tmp
- name: etc-clamav
mountPath: /etc/clamav
mountPath: {{ .Values.clamMountConfigPath }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
3 changes: 3 additions & 0 deletions charts/asset-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ clamdResources:
cpu: 500m
memory: 2000Mi

# clamMountConfigPath is the path to which the clamav.conf and freshclam.conf are mounted
clamMountConfigPath: "/etc/clamav"

# assetManagerNFS is the address of the NFSv4 (or Amazon EFS) server where uploaded
assetManagerNFS: "asset-manager-efs.dev.gov.uk"

Expand Down
Loading