summaryrefslogtreecommitdiff
path: root/pkg/domain/entities/volumes.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-10-27 11:42:25 -0700
committerJhon Honce <jhonce@redhat.com>2021-10-28 16:02:22 -0700
commit98506c961b9e0d155c1e0d124bb95d72cbb1d8c3 (patch)
tree961656f4bb1b252de10f319b4defee1ec30864cd /pkg/domain/entities/volumes.go
parentf7ca0457378f8e640d63995965ef1b1e2f0d8eac (diff)
downloadpodman-98506c961b9e0d155c1e0d124bb95d72cbb1d8c3.tar.gz
podman-98506c961b9e0d155c1e0d124bb95d72cbb1d8c3.tar.bz2
podman-98506c961b9e0d155c1e0d124bb95d72cbb1d8c3.zip
Allow label and labels when creating volumes
JSON payload may have either key. Labels will override any values set via Label. Fixes #12102 Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/domain/entities/volumes.go')
-rw-r--r--pkg/domain/entities/volumes.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/domain/entities/volumes.go b/pkg/domain/entities/volumes.go
index 2ecfb4446..9b2a170e2 100644
--- a/pkg/domain/entities/volumes.go
+++ b/pkg/domain/entities/volumes.go
@@ -78,8 +78,10 @@ type VolumeCreateOptions struct {
Name string `schema:"name"`
// Volume driver to use
Driver string `schema:"driver"`
- // User-defined key/value metadata.
+ // User-defined key/value metadata. Provided for compatibility
Label map[string]string `schema:"label"`
+ // User-defined key/value metadata. Preferred field, will override Label
+ Labels map[string]string `schema:"labels"`
// Mapping of driver options and values.
Options map[string]string `schema:"opts"`
}