Skip to content
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

Add sensu_resources type that will handle resource purging #1158

Merged
merged 1 commit into from Oct 10, 2019

Conversation

treydock
Copy link
Collaborator

Pull Request Checklist

Description

Add sensu_resources type that behaves just like Puppet's built-in resources type that will handle purging unmanaged sensu types.

Related Issue

Fixes #1157

Motivation and Context

The resources collected for sensuctl types take the name of $name in $namespace to support resources with the same name in different name spaces. However it's not required to name resources that way and this causes issues with the Puppet built-in resources type which just looks at the name and nothing else. This new type looks at name plus namespace to determine if a resource exists in the catalog. The prefetching in providers that links catalog items to sensuctl items is already matching on name + namespace.

How Has This Been Tested?

I added acceptance tests for a type that supports namespaces and for a type that does not support namespaces to show the new sensu_resources type will work for both.

@ghoneycutt ghoneycutt merged commit 1a207c4 into master Oct 10, 2019
@ghoneycutt ghoneycutt deleted the fix-purge branch October 10, 2019 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resources { 'sensu_check': purge => true; } gives unexpected result
2 participants