diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-21 13:15:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 13:15:28 +0200 |
commit | ffa73c58a52b470d9708a8ae38536fa0dc443d8b (patch) | |
tree | 5f946382c70e75a60595966442c2ce48924816b8 /pkg/bindings/secrets | |
parent | fea325327106aebc08fd6b11bc77c434e614c3e9 (diff) | |
parent | 9bb51e8e96f98ab74d416a9af9bd708c7c503bdf (diff) | |
download | podman-ffa73c58a52b470d9708a8ae38536fa0dc443d8b.tar.gz podman-ffa73c58a52b470d9708a8ae38536fa0dc443d8b.tar.bz2 podman-ffa73c58a52b470d9708a8ae38536fa0dc443d8b.zip |
Merge pull request #15842 from ashley-cui/seclabels
Add labels to secrets
Diffstat (limited to 'pkg/bindings/secrets')
-rw-r--r-- | pkg/bindings/secrets/types.go | 1 | ||||
-rw-r--r-- | pkg/bindings/secrets/types_create_options.go | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pkg/bindings/secrets/types.go b/pkg/bindings/secrets/types.go index 01c3c248d..d2f449556 100644 --- a/pkg/bindings/secrets/types.go +++ b/pkg/bindings/secrets/types.go @@ -22,4 +22,5 @@ type CreateOptions struct { Name *string Driver *string DriverOpts map[string]string + Labels map[string]string } diff --git a/pkg/bindings/secrets/types_create_options.go b/pkg/bindings/secrets/types_create_options.go index 6b1666a42..c9c88e1f3 100644 --- a/pkg/bindings/secrets/types_create_options.go +++ b/pkg/bindings/secrets/types_create_options.go @@ -61,3 +61,18 @@ func (o *CreateOptions) GetDriverOpts() map[string]string { } return o.DriverOpts } + +// WithLabels set field Labels to given value +func (o *CreateOptions) WithLabels(value map[string]string) *CreateOptions { + o.Labels = value + return o +} + +// GetLabels returns value of field Labels +func (o *CreateOptions) GetLabels() map[string]string { + if o.Labels == nil { + var z map[string]string + return z + } + return o.Labels +} |