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

adjustments to confgenerator for Operator #251

Merged
merged 4 commits into from
Jul 13, 2022

Conversation

KalmanMeth
Copy link
Collaborator

Include only extract-aggregate and encode-prom rules in the produced config file.

@KalmanMeth KalmanMeth requested review from eranra and ronensc July 7, 2022 08:01
@KalmanMeth KalmanMeth changed the title generate truncated config file for Operator adjustments to confgenerator for Operator Jul 12, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2022

Codecov Report

Merging #251 (9785cea) into main (467e409) will decrease coverage by 1.31%.
The diff coverage is 1.03%.

@@            Coverage Diff             @@
##             main     #251      +/-   ##
==========================================
- Coverage   61.63%   60.32%   -1.32%     
==========================================
  Files          67       67              
  Lines        3915     3997      +82     
==========================================
- Hits         2413     2411       -2     
- Misses       1350     1435      +85     
+ Partials      152      151       -1     
Flag Coverage Δ
unittests 60.32% <1.03%> (-1.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/confgenerator/main.go 0.00% <0.00%> (ø)
pkg/confgen/config.go 42.85% <ø> (ø)
pkg/confgen/doc.go 0.00% <0.00%> (ø)
pkg/confgen/flowlogs2metrics_config.go 0.00% <0.00%> (ø)
pkg/confgen/confgen.go 43.47% <5.00%> (-3.40%) ⬇️
pkg/pipeline/ingest/ingest_collector.go 48.12% <0.00%> (-1.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 467e409...9785cea. Read the comment docs.

Comment on lines +109 to +118
parameters[i] = map[string]interface{}{
"name": "ingest_collector",
"ingest": map[string]interface{}{
"type": "collector",
"collector": map[string]interface{}{
"port": cg.config.Ingest.Collector.Port,
"portLegacy": cg.config.Ingest.Collector.PortLegacy,
"hostname": cg.config.Ingest.Collector.HostName,
},
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we now have all these data structures defined in https://github.com/netobserv/flowlogs-pipeline/tree/main/pkg/api
Maybe we should consider reusing them rather than having them repeated here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The high-level of StageParam is defined in a different file:

type StageParam struct {
Name string `json:"name"`
Ingest *Ingest `json:"ingest,omitempty"`
Transform *Transform `json:"transform,omitempty"`
Extract *Extract `json:"extract,omitempty"`
Encode *Encode `json:"encode,omitempty"`
Write *Write `json:"write,omitempty"`
}

And perhaps the pipeline config builder could become handy
https://github.com/netobserv/flowlogs-pipeline/blob/main/pkg/config/pipeline_builder.go

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we want to redo this, let's put it in a separate issue and PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I created an issue for this
#254

@KalmanMeth KalmanMeth merged commit a16d990 into netobserv:main Jul 13, 2022
@KalmanMeth KalmanMeth linked an issue Jul 28, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reuse API data structures in confgen
3 participants