-
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: - Adds a statically provisioned EFS CSI Driver as part of a series of PRs to move asset-manager from `nfs` volume type. This shouldn't affect the current NFS setup as it only provisions the driver not call the RPCs on it - #1549 added the IAM roles for EKS nodes to access EFS - See https://github.com/kubernetes-sigs/aws-efs-csi-driver/tree/master/ for configuration details - As part of alphagov/govuk-helm-charts#1883
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
terraform/deployments/cluster-services/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,24 @@ | ||
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 = "clamav-db-efs-sc" | ||
apiVersion = "storage.k8s.io/v1" | ||
reclaimPolicy = "Retain" | ||
}] | ||
})] | ||
} |
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
5 changes: 5 additions & 0 deletions
5
terraform/deployments/govuk-publishing-infrastructure/outputs.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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
output "eks_ingress_www_origin_security_group_name" { | ||
value = aws_security_group.eks_ingress_www_origin.name | ||
} | ||
|
||
output "assets_efs_id" { | ||
description = "EFS Filesystem ID for assets" | ||
value = aws_efs_file_system.assets_efs.id | ||
} |