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 source_types config arg to replace source_type #167

Merged
merged 7 commits into from
Sep 29, 2023

Conversation

cbruno10
Copy link
Contributor

@cbruno10 cbruno10 commented Sep 19, 2023

This PR proposes deprecating the source_type config arg in favor of source_types, which includes a list of source types and eliminates the use of an all values. The main advantage is being able to include a specific combination, e.g., only load helm and manifest resources, but not deployed, which is not possible with just the source_type config arg.

The source_type arg will continue work, including source_type = 'all' translating to source_types = ['deployed', 'helm', 'manifest'].

@@ -11,6 +11,7 @@ type kubernetesConfig struct {
CustomResourceTables []string `hcl:"custom_resource_tables,optional"`
ManifestFilePaths []string `hcl:"manifest_file_paths,optional" steampipe:"watch"`
SourceType *string `hcl:"source_type,optional"`
SourceTypes []string `hcl:"source_types,optional"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For expected behaviours:

  • The default for source_types should include all current values and should be commented out
  • If source_types is not set/null, then we should attempt to load all source types
  • If source_types = [], then we should not error and load no data (like we do when paths = [] in this plugin and others)
  • If source_type and source_types are both set, source_types should win
  • Documentation should only mention source_types now

@graza-io graza-io self-assigned this Sep 28, 2023
@cbruno10 cbruno10 merged commit 50928a4 into main Sep 29, 2023
1 check passed
@cbruno10 cbruno10 deleted the update-source-types-config-arg branch September 29, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants