* 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>
* 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>
* 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>
* 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>
* 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>
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>
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>
* 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>
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>
* 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>
* 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>
* 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>
* 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>
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>
Before, there was no failure reported by the netpol analyzer, if the
matcher on the policy doesn't match any pods.
Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
Having a pointer to a range variable will always yield the latest value
the loop sees. This leads to subtle bugs. To prevent this from
happening, the range variable was assigned to a temp variable, which is
then referenced as a pointer.
Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
Co-authored-by: Patrick Pichler <git@patrickpichler.dev>
Before the filter inside the func literal was capturing the value from
the outer loop. This is a subtle mistake, since in combination with
running the function literal as go routine, the value of filter could
have already changed at invocation time.
To fix this, the filter is now passed in as an argument to the func
literal.
Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
Co-authored-by: Patrick Pichler <git@patrickpichler.dev>
Instead of storing cached values in the config yaml, they are now stored
under these OS specific locations:
* Linux: `~/.cache/k8sgpt`
* MacOS: `~/Library/Caches`
* Windows: `%LocalAppData%\cache`
Additionally a `Cache` package and interface has been introduced.
Currently there are two implementations:
* Noop - Doesn't do anything
* FileBased - Stores data in files under the locations listed above
fixes#323
Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
* 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>
* feat: allow to set a baseURL for OpenAI providers
This allows to run local models that have a compatible OpenAI API, or
for instance use a proxy.
Signed-off-by: mudler <mudler@mocaccino.org>
* feat: allow to set baseURL in the auth subcommand
Signed-off-by: mudler <mudler@mocaccino.org>
---------
Signed-off-by: mudler <mudler@mocaccino.org>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Matthis <99146727+matthisholleville@users.noreply.github.com>
* feat: expose metrics path & init analyzer errors metrics
This commit add metrics path & the analyzer error metrics in the codebase. The changes have been made across all analyzers and include the addition of a new metric with label values for the analyzer's name, analyzed object's name, and namespace. The metric's value is set to the length of the analyzer objects failures.
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
* feat: add metric to cronjob & deployment & netpol
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
* feat: expose metric to NodeAnalyzer
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
---------
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
The config file is now located in an folder according to the XDG
specification (`XDG_CONFIG_HOME`).
Migration is performed automatically.
This fixes#235.
Signed-off-by: Patrick Pichler <git@patrickpichler.dev>
* chore: add fakeai provider
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* chore: add fakeai provider
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* fix: name of openai provider
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* fix: renamed fakeai backend to noopai
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
* fix: renamed fakeai backend to noopai
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
---------
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
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>
* 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>
Adds a PodDisruptionBudget analyzer, that checks if PDBs have matching
pods with their defined selector.
Signed-off-by: Dominik Augustin <dom.augustin@gmx.at>