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

Dynamic Provisioning does not create different access point when PV has the same name in seperate namespaces #1505

Open
tschirmer opened this issue Nov 20, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@tschirmer
Copy link

tschirmer commented Nov 20, 2024

/kind bug

What happened?
Created 2 PVCs with the same name (using the same helm chart) in different namespaces while using "reuseAccessPoint". The resulting Volume Handle was the same on both dynamically created PVs. I understand this is for portability, but a namespace separation option is needed as well

What you expected to happen?
2 PVCs should create 2 dynamically created PVs and require 2 different access points for namespace isolation.

How to reproduce it (as minimally and precisely as possible)?

---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: aws-efs-csi
provisioner: efs.csi.aws.com
mountOptions:
  - tls
  - iam
parameters:
  provisioningMode: efs-ap
  fileSystemId: fs-******
  directoryPerms: "700"
  reuseAccessPoint: "true" 

---
apiVersion: v1
kind: Namespace
metadata:
  name: test-1
---
apiVersion: v1
kind: Namespace
metadata:
  name: test-2

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: duplicate-name-for-pvc
  namespace: test-1
  annotations:
    volume.beta.kubernetes.io/storage-class: "aws-efs-csi"
spec:
  storageClassName: "aws-efs-csi"
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: duplicate-name-for-pvc
  namespace: test-2
  annotations:
    volume.beta.kubernetes.io/storage-class: "aws-efs-csi"
spec:
  storageClassName: "aws-efs-csi"
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
kubectl get pv  "$(kubectl get  pvc -n test-1 duplicate-name-for-pvc --template="{{.spec.volumeName}})"  --template="{{.spec.csi.volumeHandle}}"
kubectl get pv  "$(kubectl get  pvc -n test-2 duplicate-name-for-pvc --template="{{.spec.volumeName}})"  --template="{{.spec.csi.volumeHandle}}"

These should be different. But are not.

Environment

  • Kubernetes version (use kubectl version):

Server Version: version.Info{Major:"1", Minor:"31", GitVersion:"v1.31.1-eks-ce1d5eb", GitCommit:"13dba3fbdc91154b8ad7d77d07933985753810cc", GitTreeState:"clean", BuildDate:"2024-09-21T09:30:36Z", GoVersion:"go1.22.6", Compiler:"gc", Platform:"linux/amd64"}

  • Driver version: v2.0.8-eksbuild.1

  • Instructions to gather debug logs can be found here

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants