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

(SUP-3709) - Indicator Exclusion using code manager and Hiera lookup #205

Conversation

Aaronoftheages
Copy link
Contributor

@Aaronoftheages Aaronoftheages commented Oct 16, 2023

Work done and tested within PE_Status_Check, lookup added to pe_status_check::infra_summary and pe_status_check::agent_summary plans and tested within PE_Console

@Aaronoftheages Aaronoftheages requested a review from a team as a code owner October 16, 2023 18:11
@MartyEwings MartyEwings linked an issue Oct 17, 2023 that may be closed by this pull request
@MartyEwings MartyEwings changed the title SUP-3709 - W.I.P Initial test of lookup functionality (SUP-3709) - W.I.P Initial test of lookup functionality Oct 17, 2023
@Aaronoftheages Aaronoftheages changed the title (SUP-3709) - W.I.P Initial test of lookup functionality (SUP-3709) - Indicator Exclusion using code manager and Hiera lookup Oct 17, 2023
@Aaronoftheages Aaronoftheages added enhancement New feature or request and removed do not merge labels Oct 17, 2023
Copy link
Collaborator

@MartyEwings MartyEwings left a comment

Choose a reason for hiding this comment

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

the readme needs some work

@@ -6,8 +6,9 @@
# Defaults to using a PuppetDB query to identify nodes
# @param indicator_exclusions
# List of disabled indicators, place any indicator ids you do not wish to report on in this list
# Can be used with a code manager/control repo to exclude test by ID using a static.yaml file
Copy link
Collaborator

Choose a reason for hiding this comment

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

The Phrasing here is not quite right.

You would need something along the lines of "Static Hiera data can be used to set indicator_exclusions see https://www.puppet.com/docs/pe/latest/writing_plans_in_puppet_language_pe.html#using_hiera_with_plans"

@@ -6,8 +6,9 @@
# Defaults to using a PuppetDB query to identify nodes
# @param indicator_exclusions
# List of disabled indicators, place any indicator ids you do not wish to report on in this list
# Can be used with a code manager/control repo to exclude test by ID using a static.yaml file
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

The Phrasing here is not quite right.

You would need something along the lines of "Static Hiera data can be used to set indicator_exclusions see https://www.puppet.com/docs/pe/latest/writing_plans_in_puppet_language_pe.html#using_hiera_with_plans"

README.md Outdated
See the following [documentation](https://puppet.com/docs/bolt/latest/hiera.html#outside-apply-blocks) for further explanation.

#### Using indictor_exclusion with a code manager and hiera.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using Static Hiera data to populate indictor_exclusions when executing the plans

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replacing the title now

README.md Outdated
See the following [documentation](https://puppet.com/docs/bolt/latest/hiera.html#outside-apply-blocks) for further explanation.

#### Using indictor_exclusion with a code manager and hiera.yaml

To utilize the indicator_exclusions with a code manager, place the plan_hierarchy listed in the step above, placing it in the root level [hiera.yaml](https://puppet.com/docs/puppet/latest/hiera_config_yaml_5.html) file.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Phrasing change needed
You are not using it with code manager you are using hiera within the plan, its the environment layer of hiera not root, and you should link to https://www.puppet.com/docs/pe/2023.4/writing_plans_in_puppet_language_pe.html#using_hiera_with_plans

README.md Outdated

To utilize the indicator_exclusions with a code manager, place the plan_hierarchy listed in the step above, placing it in the root level [hiera.yaml](https://puppet.com/docs/puppet/latest/hiera_config_yaml_5.html) file.

Following this create a [static.yaml] file within the code manager data folder `CODE_MANAGER/data/static.yaml`
Copy link
Collaborator

Choose a reason for hiding this comment

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

dont specify the folder, people can place their data structures anywhere

README.md Outdated
- '<TEST ID>'
```

This will allow you to exclude tests from `pe_status_check::infra_summary` and `pe_status_check::agent_summary` within the PE Console planning
Copy link
Collaborator

Choose a reason for hiding this comment

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

This sentence needs some work,

indicator ids in this array will be excluded when running the plans pe_status_check::infra_summary and pe_status_check::agent_summary

something like that

README.md Outdated Show resolved Hide resolved
README.md Outdated
See the following [documentation](https://puppet.com/docs/bolt/latest/hiera.html#outside-apply-blocks) for further explanation.

#### Using Static Hiera data to populate indicator_exclusions when executing plans

To utilize the indicator_exclusions using hiera within the plan, place the plan_hierarchy listed in the step above the environment layer (https://www.puppet.com/docs/pe/2023.4/writing_plans_in_puppet_language_pe.html#using_hiera_with_plans)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
To utilize the indicator_exclusions using hiera within the plan, place the plan_hierarchy listed in the step above the environment layer (https://www.puppet.com/docs/pe/2023.4/writing_plans_in_puppet_language_pe.html#using_hiera_with_plans)
Place the plan_hierarchy listed in the step above, in the environment layer (https://www.puppet.com/docs/pe/latest/writing_plans_in_puppet_language_pe.html#using_hiera_with_plans)

README.md Outdated

To utilize the indicator_exclusions using hiera within the plan, place the plan_hierarchy listed in the step above the environment layer (https://www.puppet.com/docs/pe/2023.4/writing_plans_in_puppet_language_pe.html#using_hiera_with_plans)

Following this create a [static.yaml] file within the code manager
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Following this create a [static.yaml] file within the code manager
Create a [static.yaml] file in the environment layer hiera data directory```

README.md Outdated
- '<TEST ID>'
```

Following this, Indicator ID's within lookup array will be excluded when `running pe_status_check::infra_summary` and `pe_status_check::agent_summary` p
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Following this, Indicator ID's within lookup array will be excluded when `running pe_status_check::infra_summary` and `pe_status_check::agent_summary` p
Indicator ID's within array will be excluded when `running pe_status_check::infra_summary` and `pe_status_check::agent_summary` p

@MartyEwings
Copy link
Collaborator

Ok looks good @Aaronoftheages can you rebase down to one commit and ill merge

@Aaronoftheages
Copy link
Contributor Author

Ok looks good @Aaronoftheages can you rebase down to one commit and ill merge

Will do!

@Aaronoftheages Aaronoftheages force-pushed the SUP_3709_Indicator_Exclusions_from_Hiera_pe_status_check branch from 33a3361 to c5a77d5 Compare October 18, 2023 13:55
@MartyEwings MartyEwings merged commit d787913 into puppetlabs:main Oct 18, 2023
24 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lookup indicator_exclusions from hiera
2 participants