Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Adding support for glob matching of policies #17

Merged
merged 2 commits into from
Oct 13, 2016

Conversation

sdwr98
Copy link

@sdwr98 sdwr98 commented Oct 13, 2016

Hi all,

We have a large number of Chronos jobs that all need Vault tokens. Specifying each name individually is unsupportable, so I've added functionality to support glob patterns in policy names. I've updated the README to show an example.

// Order the keys in descending order of length
// so that "foobar*" takes precedence over "foo*"
// Now organize the keys by length
policyKeys := make(policyKeyList, 0, )
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this line compile? I'm not familiar with this syntax.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently it does, although I didn't mean to leave that comma in. I took it out.

@nemosupremo
Copy link
Owner

I had a single comment - an initial review of the code looks good, but it doesn't look like you've tried to compile it.

Could you also make sure to go fmt the edited go files?

@sdwr98
Copy link
Author

sdwr98 commented Oct 13, 2016

It does compile and work, although I didn't mean to leave that comma in there. I formatted the file and updated the PR. Thanks!

@nemosupremo
Copy link
Owner

Thanks for your contribution! I really see how this could help, especially because I don't think Chronos uses easy to guess task names.

@nemosupremo nemosupremo merged commit b6954b8 into nemosupremo:master Oct 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants