Skip to content

Commit

Permalink
Merge pull request #1497 from alphagov/nsabri1/update-clamav-config
Browse files Browse the repository at this point in the history
Updating ClamAV configuration:
  • Loading branch information
nsabri1 authored Nov 29, 2023
2 parents 06beef8 + 750939d commit 8287899
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion charts/app-config/values-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,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

0 comments on commit 8287899

Please sign in to comment.