[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: OKD 3.11 - Volume and Claim Pre-binding - volumes for a namespace



Not that I know of.
The claimRef is not meant to be changed manually. Once set, PV should have been bound already, you won't be able to only set a namespace.

Have you considered using ResourceQuotas?

To deny users in a Project from requesting persistent storage, you could use the following: 

apiVersion: v1
kind: ResourceQuota
metadata:
  name: no-pv
  namespace: project-with-no-persistent-volumes
spec:
  hard:
    persistentvolumeclaims: 0


On Mon, Nov 18, 2019 at 12:00 PM Alan Christie <achristie informaticsmatters com> wrote:
On the topic of volume claim pre-binding …

Is there a pattern for creating volumes that can only be bound to a PVC from a known namespace, specifically when the PVC name may not be known in advance?

In my specific case I don’t have control over the application's PVC name but I do know its namespace. I need to prevent the pre-allocated volume from being bound to a claim from a namespace other than the one the application’s in.

The `PersistentVolume` spec contains a `claimRef` section but I suspect that you can’t just fill-out the `namespace`, you need to provide both the `name` and `namespace` (because although the former doesn’t generate an error it doesn’t work).

Any suggestions?

Alan Christie
achristie informaticsmatters com




_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users


--
Samuel Martín Moro
{EPITECH.} 2011

"Nobody wants to say how this works.
 Maybe nobody knows ..."
                      Xorg.conf(5)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]