-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat(pv): iSCSI
Persistent Volume and possibility to bind PVs to PVCs in any namespace
#3285
Conversation
Signed-off-by: Julien DOCHE <julien.doche@datadoghq.com>
Signed-off-by: Julien DOCHE <julien.doche@datadoghq.com>
Signed-off-by: Julien DOCHE <julien.doche@datadoghq.com>
Signed-off-by: Julien DOCHE <julien.doche@datadoghq.com>
Signed-off-by: Julien DOCHE <julien.doche@datadoghq.com>
@iliapolo Could you take a look please ? |
iSCSI
Persistent Volume and possibility to bind PVs to PVCs in any namespace
@@ -208,10 +209,10 @@ export class PersistentVolume extends base.Resource implements IPersistentVolume | |||
* | |||
* @see https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reserving-a-persistentvolume | |||
*/ | |||
public reserve(): pvc.PersistentVolumeClaim { | |||
public reserve(namespace?: string): pvc.PersistentVolumeClaim { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't normally use optional positional arguments. Instead, create a PersistentVolumeReserveOptions
interface.
Also this requires a test.
metadata: { name: `pvc-${this.name}`, namespace: this.metadata.namespace }, | ||
|
||
metadata: { name: `pvc-${this.name}` }, | ||
namespace: namespace ? namespace : this.metadata.namespace, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace: namespace ? namespace : this.metadata.namespace, | |
namespace: namespace ?? this.metadata.namespace, |
Awesome, thanks for this! |
This PR has not received a response in a while and will be closed soon. If you want to keep it open, please leave a comment below @mentioning a maintainer. |
This adds the IscsiPersistentVolume class to be able to generate iSCSI backed persistent volumes.
This also adds the ability to bind a PV to a PVC in another namespace than the default one.