helm-charts
helm-charts copied to clipboard
Support EFS CSI by changing volume claim
Hi,
EFS is great for atlantis since it's not locked to a single AZ. The future of EFS kubernetes is https://github.com/kubernetes-sigs/aws-efs-csi-driver. There's no way (I know of) to use volumeclaimtemplates (which this helm chart uses) with the CSI spec. There are details here: https://github.com/kubernetes-sigs/aws-efs-csi-driver/issues/42
Rather than a storageclass inside the volumeclaimtemplates, can we use our own PersistentVolume (where we can configure a volumeHandle) ?
+1
Looks like you can provide your own StorageClass using name efs-atlantis
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: efs-atlantis
provisioner: efs.csi.aws.com
parameters:
provisioningMode: efs-ap
fileSystemId: <EFS ID>
directoryPerms: "777"
Then set the volume claim to the new storage class
# values.yaml
volumeClaim:
storageClassName: efs-atlantis
https://github.com/runatlantis/helm-charts/blob/bc9db325f8f023a282fabe03de6a5fb9b969ac7a/charts/atlantis/templates/statefulset.yaml#L540-L542
https://github.com/kubernetes-sigs/aws-efs-csi-driver/issues/541#issuecomment-1027226852
@cep21 can you confirm if @nitrocode suggestion addresses your issue?
@nitrocode I tested it and it didn't work for me, can you tell me what else you did?
hello everything is fine?
sorry for the intrusion, but I have noticed that the atlantis replicas do not use the same access point when using the aws-efs-csi plugin
Is it possible that atlantis replicas use the same access point?
i tested it and i didn't work for me @nitrocode
Trying to revive this; I'm trying to use EFS with Atlantis and I'm having a hard time while using this Helm Chart.
Setting up EFS with the chart is doable on both EC2 and Fargate.
- Install and configure aws-efs-csi-driver
- Create a
StorageClass
,PersistentVolumeClaim
, and in case of FargatePersistentVolume
outside the chart, because Fargate doesn't support dynamically provisionedPersistentVolume
- Set
.Values.volumeClaim.enabled
tofalse
- Mount the new volume via
.Values.extraVolumes
and.Values.extraVolumeMounts
StatefulSet
creates a new PersistentVolumeClaim
for each replica, so if you want a common filesystem for all your pods, you need to create the PVC separately https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-storage
Example from efs-csi docs: https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/examples/kubernetes/statefulset/specs/example.yaml
Looks like this is not an issue anymore? Please let us know.
This issue is stale because it has been open for 1 month with no activity. Remove stale label or comment or this will be closed in 1 month.'