openshift / csi-driver-shared-resource

CSI driver for sharing Secrets and ConfigMaps across namespaces.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow volume to be optional

lcarva opened this issue · comments

A regular Secret resource can be used as an optional volume:

volumes:            
- name: missing     
  secret:           
    secretName: missing
    optional: true  

If the secret does not exist, it does not prevent the Pod from being created. Any volumeMounts using the secret volume are mounted as an empty dir (or file if subpath is used).

This is helpful in creating resources (Pods, Jobs, Deployments, etc) that work in different environments.

Is it possible to do the same for the SharedSecret resource?

I just realized that a SharedSecret can be created to reference a Secret that does not exist. In that case, what is mounted is an empty directory. This kind of allows for an optional SharedSecret. It would be nice to not have to create the SharedSecret at all though.

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.