* chore: allows an environmental override of the default AWS region and using it for bedrock
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
* chore: missing provider region
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
---------
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
* test: added missing tests for the CronJob analyzer
- Fixed a small bug where pre-analysis was incorrectly appended to the
results every time at the end of the for loop. This caused the result
for a single cronjob failure to be appended multiple times in the
final results.
- Added missing test cases to ensure proper testing of the CronJob
analyzer. The addition of these missing test cases has increased the
code coverage of this analyzer to over 96%.
Partially Addresses: https://github.com/k8sgpt-ai/k8sgpt/issues/889
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
* test: removed failure strings matching from tests
It is possible that the error or failure strings might change in the
future, causing the tests to fail. This commit addresses that issue by
removing the matching of failure text from various analyzer tests.
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
---------
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
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>
- 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>
* chore: missing schedule on auto merge
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
* feat: adding codecoverage back in
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
---------
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
* 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>
- 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>
- 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>
* 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>
- 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>
* 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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
* 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>