-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow agents to have subscriptions defined as a resource #1227
Conversation
fb101c8
to
0b07244
Compare
manifests/agent/subscription.pp
Outdated
# Order of the datacat fragment | ||
# | ||
define sensu::agent::subscription ( | ||
String $subscription = $name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be String[1]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made that change
manifests/agent/subscription.pp
Outdated
# | ||
define sensu::agent::subscription ( | ||
String $subscription = $name, | ||
String $order = '50', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also be String[1]
or perhaps Integer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used String[1]
because doesn't need to be Integer and all docs for datacat use a string and the default in datacat is the string '50'
.
Had to add updates to Ubuntu and Debian docker builds because bootstrapping Puppet was failing due to lack of HTTPS support in apt. Normally apt module would handle this but needed these packages in order to bootstrap Puppet. |
Great, I'll check it out. Good ol' datacat module 😉 |
Pull Request Checklist
Description
Allow subscriptions for agents to be defined in such a way that works like old Sensu module and plays well with defining subscriptions in profile classes for various resources.
The content of
agent.yml
is generated from fragments at runtime after catalog is compiled, unit tests can only test fragment data but acceptance tests are able to verify the final agent.yml content.Related Issue
Fixes #1222 and #1183
Motivation and Context
This makes it easier to dynamically generate
agent.yml
based on profiles assigned to a given puppet host. Instead of having to hardcode subscriptions, subscriptions can be built based on profile classes assigned to a given host.