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

feat: fix grpc client creation slightly #73

Merged
merged 2 commits into from
May 9, 2023
Merged

Conversation

AlexsJones
Copy link
Member

Closes #

πŸ“‘ Description

βœ… Checks

  • [x ] My pull request adheres to the code style of this project
  • [x ] My code requires changes to the documentation
  • [x ] I have updated the documentation as required
  • [x ] All the tests have passed

β„Ή Additional Information

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
@AlexsJones AlexsJones requested review from a team as code owners May 9, 2023 08:40
if os.Getenv("LOCAL_MODE") != "" {
address = "localhost:8080"
} else {
address = os.Getenv("K8SGPT_API_HOST")
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if this variable is not set?

Copy link
Member Author

Choose a reason for hiding this comment

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

What should the new slug be:

	address = fmt.Sprintf("http://%s.%s:8080/analyze", deployment.Name, deployment.Namespace)

?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, or something like this :

address = fmt.Sprintf("http://%s.%s:8080/analyze", "k8sgpt", deployment.Namespace)

What do you think ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is that the right API for the grpc impl? I thought usually it would be v1/analyze etc?

Copy link
Contributor

Choose a reason for hiding this comment

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

No good spot ! Let me check

Copy link
Contributor

Choose a reason for hiding this comment

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

We only need something like this : address = fmt.Sprintf("%s.%s:8080", "k8sgpt", deployment.Namespace)

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Copy link
Contributor

@matthisholleville matthisholleville left a comment

Choose a reason for hiding this comment

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

lgtm

@AlexsJones AlexsJones merged commit 98b39a9 into main May 9, 2023
6 checks passed
@AlexsJones AlexsJones deleted the fix/grpc-client branch May 9, 2023 09: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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants