Skip to content

Commit

Permalink
Add deprecation warnings for --extra-volume-tags flag
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishenzie committed Oct 2, 2020
1 parent 9b99308 commit 7a33d85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/options/controller_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type ControllerOptions struct {
ExtraTags map[string]string
// ExtraVolumeTags is a map of tags that will be attached to each dynamically provisioned
// volume.
// DEPRECATED: Use ExtraTags instead.
ExtraVolumeTags map[string]string
// ID of the kubernetes cluster.
KubernetesClusterID string
Expand Down
3 changes: 2 additions & 1 deletion pkg/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ func WithExtraTags(extraTags map[string]string) func(*DriverOptions) {

func WithExtraVolumeTags(extraVolumeTags map[string]string) func(*DriverOptions) {
return func(o *DriverOptions) {
if o.extraTags == nil {
if o.extraTags == nil && extraVolumeTags != nil {
klog.Warning("DEPRECATION WARNING: --extra-volume-tags is deprecated, please use --extra-tags instead")
o.extraTags = extraVolumeTags
}
}
Expand Down

0 comments on commit 7a33d85

Please sign in to comment.