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

Asset-Manager: switch to EFS CSI driver and PersistentVolumeClaim #514

Merged
merged 1 commit into from
Aug 16, 2022
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: 0 additions & 1 deletion charts/argocd-apps/values-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ govukApplications:
- name: asset-manager.eks.integration.govuk.digital
workerReplicaCount: 1
assetManagerNFS: &assets-nfs assets.blue.integration.govuk-internal.digital
clamavNFS: clamav-db-govuk.integration.govuk-internal.digital
nginxConfigMap:
create: false
name: asset-manager-nginx-conf
Expand Down
5 changes: 2 additions & 3 deletions charts/asset-manager/templates/_freshclam_podspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
allowPrivilegeEscalation: false
volumes:
- name: clam-virus-db
nfs:
server: "{{ .Values.clamavNFS }}"
path: /
persistentVolumeClaim:
claimName: clamav-db
- name: clamd-conf
configMap:
name: {{ .Release.Name }}-clamd-conf
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing the EFS CSI driver takes care of the PersistentVolume side of things and that's why we don't define a PersistentVolume ourselves? Is that right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

metadata:
name: clamav-db
spec:
accessModes:
- ReadWriteMany
storageClassName: clamav-db-efs-sc
resources:
requests:
storage: 1Gi
5 changes: 2 additions & 3 deletions charts/asset-manager/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ spec:
server: "{{ .Values.assetManagerNFS }}"
path: /
- name: clam-virus-db
nfs:
server: "{{ .Values.clamavNFS }}"
path: /
persistentVolumeClaim:
claimName: clamav-db
- name: clamd-conf
configMap:
name: {{ .Release.Name }}-clamd-conf
Expand Down
2 changes: 0 additions & 2 deletions charts/asset-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ clamdResources:

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

# dnsConfig is passed directly into the pod specs in the app and worker
# deployment templates.
Expand Down