-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Description: - Currently assets are stored in `assets_efs` EFS after scanning by ClamAV prior to upload to S3. These are transferred via an NFS mount in each of their pods. We want to move away from this as `nfs` volume type isn't compatible with PSS restricted - Install the EFS CSI Driver as a first step to migrate from NFS to PersistentVolumes - As part of alphagov/govuk-helm-charts#1883
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
terraform/deployments/cluster-infrastructure/aws_efs_csi_driver.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
resource "helm_release" "efs_csi_driver" { | ||
chart = "aws-efs-csi-driver" | ||
name = "aws-efs-csi-driver" | ||
namespace = "kube-system" | ||
repository = "https://kubernetes-sigs.github.io/aws-efs-csi-driver" | ||
version = "3.1.1" # TODO: Dependabot or equivalent so this doesn't get neglected. | ||
|
||
values = [yamlencode({ | ||
controller = { | ||
serviceAccount = { | ||
create = true | ||
name = data.terraform_remote_state.cluster_infrastructure.outputs.aws_efs_csi_driver_controller_service_account_name | ||
annotations = { | ||
"eks.amazonaws.com/role-arn" = data.terraform_remote_state.cluster_infrastructure.outputs.aws_efs_csi_driver_iam_role_arn | ||
} | ||
} | ||
} | ||
storageClasses = [{ | ||
name = "assets_efs-efs-sc" | ||
apiVersion = "storage.k8s.io/v1" | ||
mountOptions = ["tls"] | ||
parameters = { | ||
fileSystemId = data.terraform_remote_state.cluster_infrastructure.outputs.assets_efs_id | ||
} | ||
reclaimPolicy = "Retain" | ||
volumeBindingMode = "WaitForFirstConsumer" | ||
}] | ||
})] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters