Velero: Support wildcards for --include-resources and --exclude-resources

Created on 9 Mar 2018  路  8Comments  路  Source: vmware-tanzu/velero

EnhancemenUser Help wanted P2 - Long-term important

Most helpful comment

I think basic * wildcard matching will be a lot easier for users to use

All 8 comments

ark backup create test --include-resources *.acme.com

This wildcard support for resources is not supported right now and would be helpful to open a feature request in regards to this.

Thanks @sands6 for the feature request! I'll add a bit more detail on how it could be implemented

To do this, we'd probably need to create a new struct that's a bit broader than just collections.IncludesExcludes. Probably something like this:

type ResourceMatcher struct {
  groupWildcards sets.String
  resources *collections.IncludesExcludes
}

And then in the constructor, it would evaluate the user input and split wildcards from regular resources as needed.

If we're going to support wildcards, should we go so far as to support proper Regex?

I think basic * wildcard matching will be a lot easier for users to use

To clarify a bit further, are you thinking of a single wildcard (*) and not wild card completion? (mynames*)?

EDIT: Ah, I see, it would be wild card completion based on the earlier comments.

Right, *.acme.com, foo*bar, foo*bar*baz.acme.com, etc.

This also can be useful to ignore *.ark.heptio.com to do backup/restore between clusters.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Chams91 picture Chams91  路  4Comments

MeghanaSrinath picture MeghanaSrinath  路  4Comments

concaf picture concaf  路  3Comments

totemcaf picture totemcaf  路  4Comments

vitobotta picture vitobotta  路  3Comments