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

Keptn plugin added #1160

Merged
merged 8 commits into from
Jul 25, 2023
Merged

Keptn plugin added #1160

merged 8 commits into from
Jul 25, 2023

Conversation

huseyinbabal
Copy link
Contributor

@huseyinbabal huseyinbabal commented Jul 20, 2023

Description

Changes proposed in this pull request:

  • Added Keptn plugin

Screenshot 2023-07-20 at 15 05 47

Testing

You can refer to this article for testing. In that article I am explaining also howto implement plugin, but you don't need to implement it at all, only test.

Related issue(s)

#1089

@huseyinbabal huseyinbabal marked this pull request as ready for review July 20, 2023 15:35
@huseyinbabal huseyinbabal requested review from a team and PrasadG193 as code owners July 20, 2023 15:35
Copy link
Member

@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.

Just a code review, testing this plugin now 👍

internal/source/keptn/source.go Outdated Show resolved Hide resolved
Comment on lines 10 to 35
// Client Keptn client
type Client struct {
// API refers to Keptn client. https://github.com/keptn/go-utils
API *api.APISet
}

type GetEventsRequest struct {
Project string
FromTime time.Time
}

type Event struct {
ID string
Source string
Type string
Data Data
}

type Data struct {
Message string
Project string
Service string
Status string
Stage string
Result string
}
Copy link
Member

Choose a reason for hiding this comment

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

Please add comments to the structures. Thanks!

data := Data{}
err := ev.DataAs(&data)
if err != nil {
return nil, err
Copy link
Member

Choose a reason for hiding this comment

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

pleasae wrap the error

log := loggerx.New(cfg.Log)
exitOnError(err, log)

for {
Copy link
Member

Choose a reason for hiding this comment

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

I think we should exit the for loop in case ctx.Done(). Please update this. Thank you!

Copy link
Member

@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, last small comments 👍

helm/botkube/values.yaml Outdated Show resolved Hide resolved
internal/source/keptn/client.go Outdated Show resolved Hide resolved
internal/source/keptn/source.go Outdated Show resolved Hide resolved
@huseyinbabal huseyinbabal merged commit 4717b30 into kubeshop:main Jul 25, 2023
13 checks passed
@huseyinbabal huseyinbabal deleted the keptn-plugin branch July 25, 2023 14:20
@mszostok mszostok added the enhancement New feature or request label Aug 2, 2023
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.

3 participants