Commit Graph

293 Commits

Author SHA1 Message Date
Vaibhav Malik
ebfbba98ca
test: added missing test case for events.go (#1017)
With the addition of the latest changes, the missing test case when an
event happens after the currently set latest event has been covered.

Partially Addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-03-21 11:42:12 +00:00
Vaibhav Malik
47463d4412
test: added missing tests for the Ingress analyzer (#1020)
- Added missing test cases to ensure proper testing of the Ingress
  analyzer. The addition of these missing test cases has increased the
  code coverage of this analyzer to over 97%.

Partially Addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-03-21 11:02:19 +00:00
Vaibhav Malik
a1d0d0a180
test: added tests for the Node analyzer (#1014)
* Added new tests for the `Node` analyzer defined in the `pkg/analyzer`
  package.

* The addition of these new tests has increased the code coverage of the
  node.go file to over 96%.

Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-03-20 09:32:23 +00:00
Vaibhav Malik
f60467cd4d
test: added missing tests for the Netpool analyzer (#1016)
- Added a network policy allowing traffic to all pods. Resulting in
  additional failures in the results.

Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-03-15 18:45:36 +00:00
Vaibhav Malik
20892b48d0
test: removed useless tests from pkg/kubernetes (#1015)
- This commit removes unnecessary tests defined in the pkg/kubernetes
package.

- The removed tests were found to be flaky and were causing a
  significant increase in CI time without adding much value to
  the codebase.

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-03-14 21:51:15 +00:00
Vaibhav Malik
531f0bc46d
test: added tests for the Service analyzer (#1011)
* Added new tests for the `Service` analyzer defined in the
  `pkg/analyzer` package.

* The addition of these new tests has increased the code coverage of the
  service.go file to over 97%.

* Additionally addressed some flaky tests related to the `ReplicaSet`and
  `PersisentVolumeClaim` analyzers.

Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2024-03-14 09:42:16 +00:00
Vaibhav Malik
28e19a9d4e
test: added tests for the pkg/kubernetes package (#896)
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-03-12 21:34:12 +00:00
Vaibhav Malik
3475e2de0c
test: fixed various flaky tests (#1009)
- Removed test cases which required access to `/root` from the
  `pkg/util` package.

- Fixed flaky `PodDisruptionBudget` test.

- Fixed a typo in `PersistentVolumeClaim` test.

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-03-12 07:25:03 +00:00
Mario
55ac0b2129
feat: add Google Vertex AI as provider to utilize gemini via GCP (#984)
* feat: add Google Vertex AI as provider to utilize gemini via GCP

Signed-off-by: Mario Fahlandt <mfahlandt@pixel-haufen.de>

* fix: adjust providerId description

Signed-off-by: Mario Fahlandt <mfahlandt@pixel-haufen.de>

---------

Signed-off-by: Mario Fahlandt <mfahlandt@pixel-haufen.de>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2024-03-11 07:33:29 +00:00
Vaibhav Malik
a0225d4f70
test: added tests for the PVC analyzer (#1000)
This commit introduces comprehensive tests for the
`PersistentVolumeClaim` analyzer defined in the `pkg/analyzer` package.

Adding these tests increases the code coverage of the `pvc.go` file to
>95%.

I also made minor modifications to the ReplicaSet test to ensure all
expectations were met.

Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-03-08 19:26:19 +00:00
Vaibhav Malik
1340ead860
test: added tests for the PDB analyzer (#1001)
This commit introduces comprehensive tests for the `PodDisruptionBudget`
analyzer defined in the `pkg/analyzer` package.

Adding these tests increases the code coverage of the `pdb.go` file to
>96%.

Additionally, a potential crash in case of empty or nil PDB status
conditions has been addressed.

Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-03-08 11:09:14 +00:00
Vaibhav Malik
5199dadb2a
test: added tests for mutating webhook analyzer (#995)
This commit introduces comprehensive tests for the mutating webhook
analyzer defined in the `pkg/analyzer` package.

Adding these tests increases the code coverage of the
`mutating_webhook.go` file to almost 95%.

Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-03-08 08:18:20 +00:00
Vaibhav Malik
f5c3f18d87
test: added tests for the ReplicaSet analyzer (#997)
This commit introduces comprehensive tests for the ReplicaSet analyzer
defined in the `pkg/analyzer` package.

Adding these tests increases the code coverage of the `rs.go` file to
>95%.

Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-03-05 19:39:31 +00:00
Vaibhav Malik
16a4aaab81
test: added tests for validating webhook analyzer (#996)
This commit introduces comprehensive tests for the validating webhook
analyzer defined in the `pkg/analyzer` package.

Adding these tests increases the code coverage of the
`validating_webhook.go` file to almost 95%.

Partially addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-03-05 13:36:55 +00:00
Tanuj Dwivedi
307710eddc
feat: add proxysettings for azureopenai and openai (#987)
Signed-off-by: tanujd11 <dwiveditanuj41@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-02-28 16:10:42 +00: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
a81377f72d
feat: aws integration (#967)
* chore: updated deps

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

* chore: adding aws types

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

* chore: first cut

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

* chore: first pass at aws integration with EKS

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

* chore: fixed linting

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

* chore: updated wording based on PR

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

* chore: improved the kubeconfig

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2024-02-26 10:16:32 +00:00
Vaibhav Malik
6e640e6921
test: added unit tests for the pkg/util package (#894)
This commit adds new unit tests for the `pkg/util` package bumping the
code coverage to 84%

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-02-22 16:21:33 +00:00
lili-wan
98286a965e
fix: log analyzer failed with multiple containers in the pod (#920)
* Log analyzer failed with multiple containers in the pod #884

Signed-off-by: lwan3 <lili_wan@intuit.com>

* Merge conflicts from main

Signed-off-by: lwan3 <lili_wan@intuit.com>

---------

Signed-off-by: lwan3 <lili_wan@intuit.com>
Co-authored-by: lwan3 <lili_wan@intuit.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-02-21 12:33:44 +00:00
Johannes Kleinlercher
a3cd7e6385
fix: set result name and namespace to trivy vulnreport and configaudi… (#869)
* fix: set result name and namespace to trivy vulnreport and configauditreport

Signed-off-by: Johannes Kleinlercher <johannes.kleinlercher@suxess-it.com>

* fix: increase linter timeout

Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>

---------

Signed-off-by: Johannes Kleinlercher <johannes.kleinlercher@suxess-it.com>
Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-02-18 15:47:19 +00:00
Sahil Badla
f2138c7101
feat: enable Rest api using grpc-gateway (#834)
* grpc-gateway changes

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

* feat: grpc-gateway impl

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

* feat: enable REST/http api support

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

* feat: enable rest/http support

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

* feat: enable rest/http support

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

* feat: enable rest/http support

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

* chore: resolved mod

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

* feat: fix grpc-gateway codegen path

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

* feat: merge from master

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

* feat: flag to enable rest api

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>

---------

Signed-off-by: Sahil Badla <sahil_badla@intuit.com>
Signed-off-by: Sahil Badla <146279034+sbadla1@users.noreply.github.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Sahil Badla <sahil_badla@intuit.com>
Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-02-17 15:38:15 +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
Amit Amrutiya
3f0964ad38
fix: unused variable failure warning in webhooks file (#916)
Signed-off-by: amitamrutiya2210 <amitamrutiya2210@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-02-13 20:28:11 +00:00
Amit Amrutiya
3415031006
fix: lint errors (#923)
Signed-off-by: amitamrutiya2210 <amitamrutiya2210@gmail.com>
2024-02-07 11:30:45 +00:00
simone ragonesi
d97dea2896
chore: improve codebase and doc quality (#922)
* chore(prometheus integration): fix mispelling

Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>

* docs(readme): add badges to improve doc quality

Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>

---------

Signed-off-by: r3drun3 <simone.ragonesi@sighup.io>
2024-02-07 09:12:41 +00:00
lili-wan
78126b2328
feat: added FailedMount event reason to get the failure (#883)
Signed-off-by: lwan3 <lili_wan@intuit.com>
Co-authored-by: lwan3 <lili_wan@intuit.com>
2024-02-01 18:57:20 +00:00
JuHyung Son
2fd476e126
feat: add huggingface provider (#893)
* feat: add huggingface ai provider

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

* chore: update readme

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

* fix: set huggingface maxtokens default to 500, use ptr instead of pointer

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

---------

Signed-off-by: JuHyung-Son <sonju0427@gmail.com>
2024-01-28 15:41:49 +00:00
souleb
cdbeb146a2
fix: typo in httproute files name (#877)
Signed-off-by: Soule BA <bah.soule@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-01-23 07:51:57 +00:00
Alex Jones
2effbb345a
chore: linting improvements and catching false positives (#882)
* chore: linting improvements and catching false positives

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

* chore: linting improvements and catching false positives

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

* chore: linting improvements and catching false positives

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

* chore: increase linter time out

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2024-01-23 07:46:01 +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
Daniel Clark
45fa827c04
feat: initial Prometheus analyzers (#855)
* feat: initial Prometheus analyzers

Added a prometheus integration with two analyzers:
1. PrometheusConfigValidate
2. PrometheusConfigRelabelReport

The integration does not deploy any Prometheus stack in the cluster.
Instead, it searches the provided --namespace for a Prometheus
configuration, stored in a ConfigMap or Secret. If it finds one, it
unmarshals it into memory and runs the analyzers on it.

PrometheusConfigValidate checks if the actual Prometheus configuration is valid or has
any errors.

PrometheusConfigRelabelReport tries to distill the scrape config
relabeling rules to give a concise label set per job that targets need
to have to be scraped. This analyzer is unconventional, in that it does
not necessarily mean there are issues with the config. It merely tries
to give a human-readable explanation of the relabel rules it discovers,
leaning on the LLM and prompt.

Tested on both kube-prometheus and Google Managed Prometheus
stacks.

Signed-off-by: Daniel Clark <danielclark@google.com>

* review: feedback cycle 1

Simplify ConfigValidate prompt and add comments.

Signed-off-by: Daniel Clark <danielclark@google.com>

* review: feedback cycle 2

Add Prometheus configuration discovery to integration activate command.

Also improve logging to make this more clear to users.

Signed-off-by: Daniel Clark <danielclark@google.com>

---------

Signed-off-by: Daniel Clark <danielclark@google.com>
2024-01-12 09:58:09 +00:00
Matthis
5c17c24055
feat: unify aiClientName const for all providers (#848) 2024-01-07 13:01:15 +01: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
Alex Jones
a7e9b486ba
chore: lint fixes (#833)
* chore: added basic server startup test

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

* chore: refactored wg.add move

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2024-01-04 17:03:32 +00: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
Alex Jones
3e7cea7bd3
chore: added basic server startup test (#817)
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-12-29 14:15:32 +00:00
Akhil Rane
03b63befa2
fix: lowercase logs before running regex matching in LogAnalyzer (#794)
Signed-off-by: Akhil Rane <akhil131192@gmail.com>
2023-12-21 16:59:13 +00:00
Swastik Gour
928b39a728
fix: added the ability to set the trivy variables by the user (#797)
Signed-off-by: swastik959 <Sswastik959@gmail.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-12-20 15:57:28 +00:00
Akhil Rane
ff4aaf7c32
feat: add last termination state when pod is in CrashloopBackoff (#792)
Signed-off-by: Akhil Rane <akhil131192@gmail.com>
Co-authored-by: Akhil Rane <akhil_rane@intuit.com>
2023-12-20 12:57:17 +00:00
Xiangkun Yin
1d196286b7
refactor: replace rest client with controller-runtime clientset for Trivy analyzers (#776)
* refactor: replace rest client with controller-runtime clientset for Trivy analyzers

Signed-off-by: ptyin <peteryin1604@gmail.com>

* refactor: remove rest client

Signed-off-by: ptyin <peteryin1604@gmail.com>

---------

Signed-off-by: ptyin <peteryin1604@gmail.com>
2023-11-29 15:13:38 +00:00
Aris Boutselis
ec08cac214
feat: add Gateway analysers (#764)
* feat: add GatewayClass analyser

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

* chore: add a valid GW class object

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

* feat: add gw analyzer and switch to controller-runtime client

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

* chore: add unit tests for gw analyser

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

* chore: replace constants with condition status

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

* feat: add httproute analyzer

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

* feat: add HTTPRoute individual tests.

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

* docs: add analyzers

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

---------

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2023-11-24 10:09:54 +00:00
Jesang Myung
5b27c3e352
fix: cover more error reason messages (#759)
* fix: cover more error reasons (#758)

Signed-off-by: Jesang Myung <jesang.myung@gmail.com>

* fix: refactoring for simplify conditions

Signed-off-by: Jesang Myung <jesang.myung@gmail.com>

---------

Signed-off-by: Jesang Myung <jesang.myung@gmail.com>
2023-11-20 13:01:04 +00:00
Matthis
12146bf356
feat: rework cache package - add gcs cache - add cache purge command (#750)
* feat: rework cache pkg

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

* feat: Completion of cache pkg rework. Added cache purge command.

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

* doc: add purgin command note

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

* fix: disable cache if noCache is set

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

* feat: improve GetCacheConfiguration lisibility & transform add method to addOrUpdate

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

* feat: transform server mode to work with new cache configuration

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

* fix: use 'switch' instead 'if' to evaluate Cache from grpc

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

* feat: add mutually exclusive flags for command options

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

* doc: update readme.md

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

* feat: return err on bucket creation failed

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

* feat: update dependencies

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

---------

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
Signed-off-by: Matthis <matthish29@gmail.com>
2023-11-18 22:08:38 +01:00
Johannes Kleinlercher
73682717ed
fix: show trivy as active when activated with --no-install flag (#675)
Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>
Signed-off-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-11-13 11:10:13 -05:00
Alex Jones
d365886753
feat: log analyzer (#744)
* feat: wip log analyzer

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

* chore: turns off log by default

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

* chore: turns off log by default

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
2023-11-12 16:00:43 -05:00
Tsadok Levi Firseck
1a554ae840
Update pod.go - added handling of CreateContainerConfigError (#639)
Added handling of CreateContainerConfigError error

Signed-off-by: Tsadok Levi Firseck <tsadoklf@gmail.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
Co-authored-by: Thomas Schuetz <38893055+thschue@users.noreply.github.com>
2023-11-12 21:24:41 +01:00
DKuroczko
ccef7f6170
feat: amazonsagemaker AI provider (#731)
* feat(amazonsagemaker): Add AmazonSageMaker AI provider

Co-authored-by: NAME 18630245+zaremb@users.noreply.github.com
Signed-off-by: Damian Kuroczko <7778327+dkuroczk@users.noreply.github.com>

* feat(amazonsagemaker): Add AmazonSageMaker AI provider

Co-authored-by: Mateusz Zaremba <18630245+zaremb@users.noreply.github.com>
Signed-off-by: Damian Kuroczko <7778327+dkuroczk@users.noreply.github.com>

* feat(auth): add top p and max tokens to auth and use them in sagemaker backend

Signed-off-by: Mateusz Zaremba <18630245+zaremb@users.noreply.github.com>

* feat: Updates SageMaker docs, validate topP, ident

Signed-off-by: Damian Kuroczko <7778327+dkuroczk@users.noreply.github.com>

* feat: list of passwordlessProviders

Signed-off-by: Damian Kuroczko <7778327+dkuroczk@users.noreply.github.com>

* feat: returns err

Signed-off-by: Damian Kuroczko <7778327+dkuroczk@users.noreply.github.com>

* fix: remove log.Fatal(err)

Signed-off-by: Damian Kuroczko <7778327+dkuroczk@users.noreply.github.com>

---------

Signed-off-by: Damian Kuroczko <7778327+dkuroczk@users.noreply.github.com>
Signed-off-by: Mateusz Zaremba <18630245+zaremb@users.noreply.github.com>
Co-authored-by: Mateusz Zaremba <18630245+zaremb@users.noreply.github.com>
2023-11-05 20:03:40 +00:00
Ali
37721b5dd7
fix: ensure ingress HTTP rule exists to prevent panic (#726)
Signed-off-by: Ali Harris <aliharriss1995@gmail.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-11-03 14:02:51 +00:00
StevenSu
f1a7801e9e
feat: add amazonbedrock (#718)
* add amazonbedrock AI provider

Signed-off-by: Su Wei <suwei007@gmail.com>

* add amazonbedrock, change model list to const var

Signed-off-by: Su Wei <suwei007@gmail.com>

* update iai config and auth cmd, add providerRegion

Signed-off-by: Wei Su <wsuam@amazon.com>

* fix filename wrong

Signed-off-by: Wei Su <wsuam@amazon.com>

* chore: added some doc info

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

---------

Signed-off-by: Su Wei <suwei007@gmail.com>
Signed-off-by: Wei Su <wsuam@amazon.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Wei Su <wsuam@amazon.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-10-28 11:49:09 +01:00
Aris Boutselis
23ac52d5ff
feat: add Azure remote cache (#690)
* feat: add Azure remote cache

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

* feat: add serve mode support and update buf schema

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

* fix: map structure name

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

* chore: add a new cache type to make code readable

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

* docs: update docs to reflect new remote cache type

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

* fix(deps): update module github.com/prometheus/client_golang to v1.17.0 (#687)

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/go to v1.3.0-20231002095256-194bc640518b.1 (#692)

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

* fix(deps): update module helm.sh/helm/v3 to v3.13.0 (#688)

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

* fix: security warning around printing provider details in https://github.com/k8sgpt-ai/k8sgpt/security/code-scanning/1 (#695)

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

* fix(deps): update module buf.build/gen/go/k8sgpt-ai/k8sgpt/protocolbuffers/go to v1.31.0-20231002095256-194bc640518b.1 (#693)

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

* fix(deps): update module github.com/sashabaranov/go-openai to v1.15.4 (#689)

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 github.com/aws/aws-sdk-go to v1.45.20 (#685)

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

* chore(deps): update amannn/action-semantic-pull-request action to v5.3.0 (#683)

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 github.com/aws/aws-sdk-go to v1.45.21 (#696)

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.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.45.22 (#697)

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 github.com/aws/aws-sdk-go to v1.45.23 (#699)

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 github.com/aws/aws-sdk-go to v1.45.24 (#701)

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>

---------

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-10-22 16:08:39 +01:00
Alex Jones
69fe2db8ac
feat: integration refactor (#684)
* feat: more significant refactor

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

* feat: more significant refactor

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

* feat: reworked the integration activate/deactivation

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

* chore: updated schema for list integrations

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

* fix: error with incorrect error being swallowed

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

* feat: added namespace check

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

* chore: fixed issue with namespace and skip install validation

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-09-28 07:43:05 +01:00
Alex Jones
820e4755a5
feat: added create namespace on deploy (#673)
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-09-20 12:43:18 +01:00
Alex Jones
844ff1fc78
feat: lists activate integrations (#669)
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-09-19 18:15:07 +02:00
Peter Pan
f55946d60e
feat: openAI explicit value for maxToken and temperature (#659)
* feat: openAI explicit value for maxToken and temp

Because when k8sgpt talks with vLLM, the default MaxToken is 16,
which is so small.
Given the most model supports 2048 token(like Llama1 ..etc), so
put here for a safe value.

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>

* feat: make temperature a flag

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>

---------

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
2023-09-18 13:14:43 +01:00
Alex Jones
3277b2ad4b
fix: pdb panic error guard (#664)
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-09-17 12:12:28 +01:00
Alex Jones
ab064b940c
feat: serve/integration capability (#645)
* chore: updated schema for integrations support (#616)

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

wip: enabling integration activation

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

wip: enabling integration activation

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

* wip

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

* feat: skipinstall fixed

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

* feat: fixed filters for integrations but its ugly

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

* chore: updated library

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

* chore: updated go mod

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

* chore: updated go mod

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-09-16 17:12:09 +01:00
Johannes Kleinlercher
6481590b29
fix: respect namespace scope in trivy analyzer (#661)
Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>
2023-09-15 21:30:59 +01:00
Aris Boutselis
6c5a0628e4
fix: defer to service analyser when selectors are missing (#652)
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-09-14 16:57:27 +01:00
Johannes Kleinlercher
230eace187
feat: show each ConfigAuditReport check (#646)
* feat: show each ConfigAuditReport check

Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>

* feat: mask sensitive data in configauditreport messages

Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>

---------

Signed-off-by: Johannes Kleinlercher <johannes@kleinlercher.at>
2023-09-13 09:18:03 +01:00
guangwu
c24825b810
chore: slice loop replace (#627)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-04 20:19:48 +01:00
Alex Jones
133850f984
chore: fixes a bug where filters do not deactive (#621)
Signed-off-by: Alex Jones <alex@Alexs-MacBook-Pro.local>
Co-authored-by: Alex Jones <alex@Alexs-MacBook-Pro.local>
2023-09-03 16:13:52 +01:00
Aris Boutselis
1a7f45cc55
fix: use-case while in cluster, connecting to an external (#623)
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2023-09-01 08:09:11 +00:00
Alex Jones
5e17e66665
chore: updated protobuf libs (#614)
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-08-27 16:52:56 +01:00
Alex Jones
44d3613c1f
feat: configauditreport (#609)
* feat: adding config audit report

Signed-off-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>

* feat: adding config audit report

Signed-off-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>

* feat: adding config audit report analyzer mechnics

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>

* feat: adding config audit report analyzer mechnics

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>

* chore: updated naming

Signed-off-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>

* chore: updated naming

Signed-off-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>

* chore: updated var names

Signed-off-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>

---------

Signed-off-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Alex Jones <alex@alexs-mbp.tailddc26.ts.net>
2023-08-25 17:37:53 +01:00
Alex Jones
13f63eda2a
Revert "fix: use kubeconfig file when user specify it (#605)" (#608)
This reverts commit e3b21ec5ec.
2023-08-19 20:58:34 +01:00
Clever Hu
cc665ea4f3
fix: optimize analyze service (#461)
Signed-off-by: cleverhu <shouping.hu@daocloud.io>
Signed-off-by: cleverhu <zhubai.hsp@xuelanyun.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: cleverhu <shouping.hu@daocloud.io>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-08-19 20:52:46 +01:00
Jian Zhang
e3b21ec5ec
fix: use kubeconfig file when user specify it (#605)
If user specify `--kubeconfig` when running k8sgpt, it should use the
kubeconfig file to login the corresponding cluster instead of getting auth info via SA.

Closes #604

Signed-off-by: Jian Zhang <jiazha@redhat.com>
2023-08-19 20:11:11 +01:00
Alex Jones
5bb91ff2c9
Revert "chore: upgraded cohere backend (#580)" (#581)
This reverts commit 43b0d707e7.
2023-07-26 16:59:49 +01:00
Alex Jones
43b0d707e7
chore: upgraded cohere backend (#580)
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-07-26 16:22:49 +01:00
Aris Boutselis
153d38deb0
chore: continue on absent service (#569)
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2023-07-20 13:49:06 +01:00
Maxime Brunet
781ecb7aad
feat: add Cohere backend (#563)
Signed-off-by: Maxime Brunet <max@brnt.mx>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-07-19 18:25:27 +01:00
Alex Jones
c42221512b
chore: fixing edge cases with missing wh service (#561)
* chore: fixing edge cases with missing wh service

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

* chore: fixing edge cases with missing wh service

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

* Update validating_webhook.go

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-07-19 16:28:45 +01:00
Alex Jones
06e8532f88
feat: admission webhooks (#553)
* feat: add Validating/Mutating webhook analyzer

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

* change conditions

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

* fix: use GetClient to get pods and mask pod name

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

* fix: add new cases in util.GetParent

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

* feat: implements webhooks

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

* feat: implements webhooks

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

* feat: implements webhooks

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

* feat: implements webhooks

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

---------

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-07-14 10:44:15 +01:00
Alex Jones
731e1520ec
Revert "feat: add Validating/Mutating webhook analyzer (#548)" (#551)
This reverts commit 750a10d44c.
2023-07-13 08:54:22 +01:00
Rakshit Gondwal
750a10d44c
feat: add Validating/Mutating webhook analyzer (#548)
* feat: add Validating/Mutating webhook analyzer

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

* change conditions

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

* fix: use GetClient to get pods and mask pod name

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

* fix: add new cases in util.GetParent

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>

---------

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Co-authored-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-07-12 14:20:18 +01:00
Peter Pan
1f5462c80b
fix: add --no-install for activate command (#536)
to fix #534

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
2023-07-03 11:36:02 +01:00
Alex Jones
367fe8f74c
feat: upgrading azure client impl (#526)
* feat: upgrading azure client impl

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

* feat: upgrading azure client impl

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

* fix: displaying correct yaml config location on app start (#521)

Signed-off-by: Ali Mohsin <aliofthemohsins@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>

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

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

* feat: upgrading azure client impl

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: Ali Mohsin <aliofthemohsins@gmail.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ali Mohsin <aliofthemohsins@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-29 09:47:12 +01:00
Ben Parees
64b93c9116
fix: 'intergration' typos (#508)
Signed-off-by: bparees <bparees@redhat.com>
2023-06-15 19:13:15 +01:00
Alex Jones
f6db6ce861
feat: fix for s3 cache from operator
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-06-15 13:17:43 +01:00
Peter Pan
c85203bccd
chore: customized prompt template for integration plugins (#403)
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-06-12 21:14:12 +01:00
Jian Zhang
075066dd7c
fix: use the status for pdb checking (#477)
The PDB event is a historical record, it's not a good choice to judge the pdb latest status based on it.
So, use the `stataus` instead of `event` to check it.

Closes: #476

Signed-off-by: Jian Zhang <jiazha@redhat.com>
2023-06-07 10:51:20 +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
fa4a0757b8
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>
2023-05-25 10:42:49 +01:00
Peter Pan
36995fd4ed
chore: add more filter releavent UT in analysis_test.go (#435)
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-22 06:40:36 +01:00
Matthis
b7dc384547
fix: append coreAnalyzer if active_filter is empty and integration is added (#441)
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-05-19 11:14:39 +02:00
Alex Jones
948dae5e28
feat: caching (#439)
* feat: added the ability to set a user default AI provider

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

* feat: added the ability to set a user default AI provider

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

* feat: s3 based caching

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

* feat: s3 based caching

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

* updated README.md

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

* update README.md

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

* updated README.md

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

* chore: region is a must have

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

* chore: clarified remove command

* updated remove.go

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

* chore: test fmt causing issues will open another pr

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-19 09:32:01 +01:00
Matthis
f0d3f36f6d
fix: use coreAnalyzer if there are no filters selected and no active_filters (#432)
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-05-17 09:36:47 +01:00
Camilo Giraldo
06542b4bf1
fix: improve default_prompt (#406)
* fix: improve default_prompt

Signed-off-by: Camilo Giraldo <camigira@gmail.com>

* fix: specific instructions for prompt output

Signed-off-by: Camilo Giraldo <camigira@gmail.com>

---------

Signed-off-by: Camilo Giraldo <camigira@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-16 20:03:33 +00:00
Alex Jones
cbe2fb4a4c
feat: added the ability to set a user default AI provider (#427)
* feat: added the ability to set a user default AI provider

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

* feat: added the ability to set a user default AI provider

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

* chore: added provider to json output

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-16 13:31:19 +02:00
Peter Pan
e66de8c4ce
chore: gofmt fix and enable in CI (#414)
* gofmt the files

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>

* add UT and goFMT to PR Gate (Github Action for PR)

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>

---------

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-15 06:53:59 +01:00
Matthis
e5e613acee
feat: filters api (#407)
* fix: stop execution after matching condition in RunAnalysis()

The commit fixes the issue where the RunAnalysis() function continues execution even after matching a condition. The fix ensures that the execution stops at the end of the corresponding if statement, improving the control flow and preventing unnecessary processing.

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

* feat: include filters parameter in AnalyzeRequest initialization

The commit introduces a new feature where the filters parameter is included in the initialization of the AnalyzeRequest. This enhancement allows for more specific analysis by specifying filters during the analysis process.

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

---------

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-05-14 10:07:43 +01:00
Peter Pan
ed73485d92
chore: make go-lint happy (#405)
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
2023-05-12 12:24:30 +01:00
Matthis
639aa12931
feat: add error message if analyze request fail (#393)
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-05-09 18:08:39 +02:00
Matthis
9998e7620d
feat!: migrate api to grpc (#386)
* feat: migrate api to grpc

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

* feat: use status.Code instead grpc.Code in log

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

---------

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2023-05-09 08:36:44 +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
Aris Boutselis
d8357ceb94
feat: add azure openai provider (#309)
* feat: add azure openai provider

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>

* feat: validate backend name

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>

* fix: remove BaseURL from the mandatory env variables

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

* fix: conflicts

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>

* chore: updated logo (#365)

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

* chore: added changing banners (#367)

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

* feat: add additionalLabels to Service Monitor (#366)

* feat: add additionalLabels to Service Monitor

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

* feat: update additionalLabels

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

---------

Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>

* fix: update README file's ai provider section.

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>

---------

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Signed-off-by: Brad McCoy <bradmccoydev@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Brad McCoy <bradmccoydev@gmail.com>
2023-05-02 21:28:15 +01:00
Matthis
dee423519e
fix: use a cache file name with a fixed size. (#350)
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-27 11:59:30 +02:00
Patrick Pichler
ee85d13d59
fix: take KUBECONFIG env variable into consideration (#340)
Before, the default value set for the `--kubeconfig` flag prevented the
`KUBECONFIG` env variable to be ever taken into consideration. This
behavior has now been fixed.

If `--kubeconfig` flag is set, it takes precedence over the `KUBECONFIG` env
variable.

fixes #331

Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
Co-authored-by: Patrick Pichler <git@patrickpichler.dev>
2023-04-26 12:12:56 +00:00
Patrick Pichler
c29860d418 fix: remove dead code
Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
2023-04-25 22:31:24 +02:00
Patrick Pichler
947e94f353 fix: use correct result slice for cronjob analyzer
Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
2023-04-25 22:31:24 +02:00