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

Feature/insights remote lib #28

Merged
merged 10 commits into from
Nov 6, 2023
Merged

Feature/insights remote lib #28

merged 10 commits into from
Nov 6, 2023

Conversation

bomoko
Copy link
Collaborator

@bomoko bomoko commented Jul 20, 2023

This PR will add an "in cluster" gatherer for the new insights remote webservice

@bomoko
Copy link
Collaborator Author

bomoko commented Jul 20, 2023

Do not merge until uselagoon/lagoon-charts#578 is released

@bomoko bomoko requested a review from timclifford July 20, 2023 02:07
Copy link
Contributor

@timclifford timclifford left a comment

Choose a reason for hiding this comment

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

Looks good

cmd/gatherInCluster.go Show resolved Hide resolved
//get the basic env vars
if argStatic && argDynamic {
log.Fatalf("Cannot use both 'static' and 'dynamic' only gatherers - exiting")
os.Exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for a os.Exit with the log.FatalF right?

gatherers/FilledFileGatherer.go Outdated Show resolved Hide resolved
insightsRemoteFacts.Facts = append(insightsRemoteFacts.Facts, f)
}

bodyString, _ := json.Marshal(insightsRemoteFacts)
Copy link
Contributor

Choose a reason for hiding this comment

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

might want to have some error handling to this in a few places below to

bodyString, err := json.Marshal(insightsRemoteFacts)
if err != nil {
   return fmt.Errorf("failed to marshal insights remote facts: %w", err)
}

gatherers/insights-remote-writer.go Show resolved Hide resolved
@bomoko bomoko merged commit 6264463 into main Nov 6, 2023
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.

3 participants