Commit Graph

44 Commits

Author SHA1 Message Date
Matthis
3eec9bbb05
feat: add stats option to analyze command for performance insights (#1237)
* feat: add stats option to analyze command for performance insights

Introduced a new feature to the analyze command that enables users to print detailed performance statistics of each analyzer. This enhancement aids in debugging and understanding the time taken by various components during analysis, providing valuable insights for performance optimization.

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

* feat: enhance analysis command with statistics option

Refactored the analysis command to support an enhanced statistics option, enabling users to opt-in for detailed performance metrics of the analysis process. This change introduces a more flexible approach to handling statistics, allowing for a clearer separation between the analysis output and performance metrics, thereby improving the usability and insights provided to the user.

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

---------

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2024-10-30 13:58:18 +00:00
JuHyung Son
eb3b81f176
feat: add label selector (#1201)
* feat: fix the custom-analysis printing (#1195)

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* feat: add label selector

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* feat: add label selector on analyzers

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* chore(deps): pin goreleaser/goreleaser-action action to 286f3b1 (#1171)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* fix(deps): update module buf.build/gen/go/k8sgpt-ai/k8sgpt/grpc/go to v1.4.0-20240715142657-3785f0a44aae.2 (#1196)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* chore(deps): update actions/upload-artifact digest to 0b2256b (#1175)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* chore: update proto pkg version

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* chore: fix typo

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* feat: add label string to LabelSelector util func

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

* feat: add test using 2 label selector

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: JuHyung-Son <sonju0427@gmail.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: JuHyung Son <sonju0427@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-18 14:31:41 +01:00
Aris Boutselis
02e754ed59
feat: add custom http headers to openai related api backends (#1174)
* feat: add custom http headers to openai related api backends

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* ci: add custom headers test

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* add error handling

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* chore(deps): update docker/setup-buildx-action digest to 4fd8129 (#1173)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* fix(deps): update module buf.build/gen/go/k8sgpt-ai/k8sgpt/grpc-ecosystem/gateway/v2 to v2.20.0-20240406062209-1cc152efbf5c.1 (#1147)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* chore(deps): update anchore/sbom-action action to v0.16.0 (#1146)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* Update README.md

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

---------

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-07-10 09:59:08 +01:00
Vaibhav Malik
aab8d77feb
fix: analyze command default backend bug (#966)
Now, the default value of the `backend` flag for the analyze command
will be an empty string. And the `NewAnalysis` function has been
modified to use the default backend set by the user if the backend flag
is not provided and the `defaultprovider` is set in the config file.
Otherwise, backend will be set to "openai".

Fixes: https://github.com/k8sgpt-ai/k8sgpt/issues/902

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: JuHyung Son <sonju0427@gmail.com>
2024-02-28 16:09:30 +00:00
Alex Jones
c8c9dbfadc
feat: enables remote custom analyzers (#906)
* feat: enables remote custom analyzers

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

* chore: fixed test that was broken

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

* chore: hiding custom analysis behind a flag

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

* chore: resolved govet issue

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

* chore: updated

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

* chore: updated

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

* chore: updated deps

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

* chore: updated deps

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2024-02-15 07:28:00 +00:00
Alex Jones
9da75e02bc
feat: interactive mode (#854)
* chore: wip interactive mode

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

* chore: tidied up a bit

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

* chore: updated go mod

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

* chore: const prompt

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

* chore: updated based on comments feedback

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

* chore: updated enum

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

* chore: updated enum

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2024-01-14 20:22:00 +00:00
Bartlomiej Plotka
e7d41496dd
feat: added Google GenAI client; simplified IAI/clients API surface. (#829)
* refactor: Simplified IAI; made caching and processing consisent.


Signed-off-by: bwplotka <bwplotka@gmail.com>

* feat: Added Google AI API e.g. for Gemini models.

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
2024-01-05 06:53:36 +01:00
Bartlomiej Plotka
035348d8a0
fix: no explain case, improved readability. (#825)
Signed-off-by: bwplotka <bwplotka@gmail.com>
2024-01-03 17:59:28 +01:00
golgoth31
f9621af7e4
feat: get official field doc (#457)
* fix(deps): update module github.com/aws/aws-sdk-go to v1.44.267 (#451)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* feat: get official field doc

Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* feat: use schema from server

Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* feat: add configuration api route (#459)

* feat: add configuration api route

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

* feat: rename cache methods

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

---------

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* fix(deps): update module github.com/aws/aws-sdk-go to v1.44.269 (#458)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* fix: updated list.go to handle k8sgpt cache list crashing issue (#455)

* Update list.go

Signed-off-by: Krishna Dutt Panchagnula <krishnadutt123@gmail.com>

* fix: updated list.go to handle k8sgpt cache list crashing issue

Signed-off-by: Krishna Dutt Panchagnula <krishnadutt123@gmail.com>

---------

Signed-off-by: Krishna Dutt Panchagnula <krishnadutt123@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* chore(main): release 0.3.5 (#452)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* chore(deps): update google-github-actions/release-please-action digest to 51ee8ae (#464)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* fix: name of sa reference in deployment (#468)

Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* fix(deps): update module github.com/aws/aws-sdk-go to v1.44.270 (#465)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* fix: typo (#463)

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* fix(deps): update module github.com/aws/aws-sdk-go to v1.44.271 (#469)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* fix(deps): update module github.com/aws/aws-sdk-go to v1.44.269 (#458)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module github.com/aws/aws-sdk-go to v1.44.270 (#465)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* fix(deps): update module github.com/aws/aws-sdk-go to v1.44.271 (#469)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* feat: Add with-doc flag to enable/disable kubernetes doc

Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* use fmt.Sprintf in apireference.go

Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

* add --with-doc to readme

Signed-off-by: David Sabatie <david.sabatie@notrenet.com>

---------

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: David Sabatie <david.sabatie@notrenet.com>
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
Signed-off-by: Krishna Dutt Panchagnula <krishnadutt123@gmail.com>
Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: golgoth31 <golgoth31@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matthis <99146727+matthisholleville@users.noreply.github.com>
Co-authored-by: Krishna Dutt Panchagnula <krishnadutt123@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Johannes Kleinlercher <johannes@kleinlercher.at>
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
2023-05-31 10:36:41 +01:00
Matthis
8b49f708f3
feat: rework output format (#368)
* feat: remove warning output

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

* feat: improves the error output to respect the format

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

* feat: rework errorsList

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

* Revert "feat: rework errorsList"

This reverts commit 1a3cfa88ae.

Signed-off-by: Matthis Holleville <matthish29@gmail.com>

---------

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-05-03 14:23:30 +01:00
Alex Jones
c3cc413e7f
feat: async calls (#311)
* feat: async calls

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

* feat: added concurrency settings

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

* feat: added in ability to set max concurrency

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Matthis <99146727+matthisholleville@users.noreply.github.com>
2023-04-24 14:04:37 +00:00
Thomas Schuetz
d0f7a1105f
chore: change license to Apache-2 (#313)
* chore: change license to Apache-2

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-04-21 19:46:31 +02:00
Matthis
fa087ff559 feat: modify error handling to return a list of errors to display to the user at the end of analysis without blocking it if an error is detected (e.g., version of an object is not available on user's cluster)
Signed-off-by: Matthis <matthish29@gmail.com>
2023-04-20 15:09:13 +02:00
Matthis Holleville
9642202ed1 feat: add output query param on serve mode & refactor output logic
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-15 21:55:46 +02:00
Thomas Schuetz
9157d4dd13
feat: unified cmd and api
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-04-13 08:11:56 +02:00
Matthis Holleville
c0afc0f5c9 feat: refactor integration to use Failure object
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-12 11:40:51 +02:00
Alex Jones
3682f5c7eb feat: integration ready for first review
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:12 +01:00
Matthis Holleville
b687473e61 feat: add more details on anonymize flag
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-11 13:41:59 +02:00
Matthis Holleville
d2a84ea2b5 feat: add anonymization flag
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-10 23:12:02 +02:00
AlexsJones
93bcc627ba fix: regression on dynamic filters
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-04-05 20:05:17 +01:00
HOLLEVILLE Matthis
7429b933c0
Merge branch 'main' into feature/configuration-new-format
Signed-off-by: HOLLEVILLE Matthis <99146727+matthisholleville@users.noreply.github.com>
2023-04-05 16:10:34 +02:00
Thomas Schuetz
2f21002899
fix: details in json output
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-04-05 15:17:06 +02:00
Thomas Schuetz
db40734a0d
chore: made json output prettier and improved output
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-04-05 13:36:30 +02:00
Matthis Holleville
9b243cdcaa feat: add support for new configuration format
This commit adds support for a new configuration format that is not backwards compatible with the previous format. This is a breaking change and requires users to update their configuration files to use the new format.

BREAKING CHANGE: The format of the configuration file has changed. Users must update their configuration files to use the new format.

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-05 09:39:21 +02:00
Thomas Schuetz
0195bfab30
chore: analyzer and ai interfacing (#200)
* chore: analyzer and ai interfacing

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

* fix: backend variable for aiProvider in cmd

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

* fix: changed folders for analyzers

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

* chore: renamed analyzers

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

* fix: fixed ingress tests after rebase

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

* fix: fixed ingress tests after rebase

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

---------

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-04-05 08:40:12 +02:00
AlexsJones
96d0d754ea chore: removes bar on normal analyze events
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-04-01 17:22:37 +01:00
Roberth Strand
3e836d81b7
refactor: merged main into branch
Merged origin/main into the branch to get the PR up to date and mergable.

Closes #101

Signed-off-by: Roberth Strand <me@robstr.dev>
2023-04-01 11:36:15 +02:00
Matthis Holleville
869ba90907 fix: analysis detail not displayed when --explain
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-31 16:39:28 +02:00
Roberth Strand
c0aebb21a0
refactor: added newline to explanation
The newline at the end of the explanation will make is so that the wall of text that you get with several issues get a bit of space. This does not effect the JSON output, only the regular output.

closes #101

Signed-off-by: Roberth Strand <me@robstr.dev>
2023-03-31 11:23:35 +02:00
Alex Jones
548039ebe6 feat: improvement to analysis speed
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-03-30 08:19:35 +01:00
Alex Jones
172c2df6c5
fix: bugfix for output (#148) 2023-03-30 08:38:11 +02:00
Alex Jones
2eab0c544f feat: bugfix for output
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-03-30 07:28:42 +01:00
Chadi Laoulaou
f4765bed1b
fix: typo in description of the filter flag in analyze command (#147)
Signed-off-by: Chadi Laoulaou <chadilaoulaou@gmail.com>
2023-03-30 05:38:47 +02:00
Alex Jones
b78ab3d9b5
feat: added namespace filter (#127)
* feat: added namespace filter

Signed-off-by: AlexsJones <alexsimonjones@gmail.com>

* chore: Moved the explain bool out

Signed-off-by: AlexsJones <alexsimonjones@gmail.com>

---------

Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-28 21:10:42 +02:00
AlexsJones
5890e3a79c fix: short term solution for exhaustion
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-28 14:00:50 +01:00
Alex Jones
a270f7c89f
feat: enables overwriting of cache (#95) 2023-03-28 11:43:12 +02:00
Roberth Strand
39c0444fac
feat: added british alias
Added an alias for analyze with the British English variant analyse.

Closes #93

Signed-off-by: Roberth Strand <me@robstr.dev>
2023-03-28 11:07:45 +02:00
AlexsJones
c3008c5e75 feat: addition of simple language support
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-27 20:15:35 +01:00
AlexsJones
009f47c8e8 chore: return success on no issues
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-27 12:55:46 +01:00
AlexsJones
a194d4a509 chore: moved code
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-27 10:59:48 +01:00
AlexsJones
0852c658de feat: wip fixing missing details
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-27 10:42:02 +01:00
AlexsJones
1bc839c48b wip fixing missing details
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-27 10:25:25 +01:00
Thomas Schuetz
14e85b08ff
feat: find parent objects and add information about them (#72)
* feat: find parent objects

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

* fix: missing parent when explain is used

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>

---------

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-03-25 23:03:34 +01:00
Alex Jones
a1093dcfe4
feat: also fixes bug if the events feed is empty (#73)
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-25 22:59:15 +01:00