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

Validate cloud connection #5

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Validate cloud connection #5

merged 2 commits into from
Feb 22, 2024

Conversation

madebyrogal
Copy link
Contributor

@madebyrogal madebyrogal commented Feb 21, 2024

Description

Changes proposed in this pull request:

  • validate if cloud plugins are working in botkube-agent connected to cloud

Related issue(s)

Resolve https://github.com/kubeshop/botkube-cloud/issues/881

@madebyrogal madebyrogal requested review from a team and vaijab February 21, 2024 10:27
@madebyrogal madebyrogal marked this pull request as draft February 21, 2024 10:27
@mszostok mszostok requested review from mszostok and removed request for vaijab February 21, 2024 10:32
@mszostok mszostok self-assigned this Feb 21, 2024
@mszostok mszostok requested a review from pkosiec February 21, 2024 21:34
@mszostok mszostok added the enhancement New feature or request label Feb 21, 2024
@mszostok mszostok marked this pull request as ready for review February 21, 2024 21:34
@mszostok mszostok force-pushed the validate-cloud-connection branch from 464467e to a8f6f2e Compare February 21, 2024 21:47
Event: make(chan source.Event, 1),
}
out.Event <- source.Event{
Message: unauthorizedMessage(s.openSourceBlockage),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I just learned during e2e demo that for source we need to add also a plugin name as otherwise you won't know which one reported that. I will fix that tomorrow.

@vaijab
Copy link
Contributor

vaijab commented Feb 22, 2024

If I understand this correctly - the agent always forwards messages over to plugins, right? If that's the case, shouldn't we have something similar in the agent code instead?

@pkosiec
Copy link
Collaborator

pkosiec commented Feb 22, 2024

@vaijab In theory we could build the check in agent, but the agent is fully OS, so it would be easy to avoid by running modified agent. It's harder to workaround this check if it's on the closed-source plugin side. Hope that makes sense 🙂

Copy link
Collaborator

@pkosiec pkosiec left a comment

Choose a reason for hiding this comment

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

LGTM, small comments

(didn't test it)

internal/remote/deploy_client.go Outdated Show resolved Hide resolved
internal/remote/conn_checker.go Outdated Show resolved Hide resolved
internal/remote/conn_checker.go Outdated Show resolved Hide resolved
@mszostok mszostok force-pushed the validate-cloud-connection branch from a8f6f2e to 12dfce7 Compare February 22, 2024 09:28
madebyrogal and others added 2 commits February 22, 2024 10:28
MOD handle / display errors

ADD authorized executor
ADD with retry connection to cloud

MOD init auth executor for doctor and flux plugin

ADD auth source for source plugins

FIX prometheus
1. Call cloud endpoints only if cloud envs are present (speeds up indexing)
2. Introduce a goroutine to supervise active cloud connections:
3. Replace panic with user-facing messages

minor:
1. Log connection errors instead of ignoring them
2. Simplify QGL client logic
3. Fix lint issues
4. Fix helm unit-tests
@mszostok mszostok force-pushed the validate-cloud-connection branch from 12dfce7 to ff9c7ad Compare February 22, 2024 09:29
@mszostok mszostok merged commit 4c72653 into main Feb 22, 2024
4 checks passed
@mszostok mszostok deleted the validate-cloud-connection branch February 22, 2024 09:50
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.

4 participants