Commit Graph

293 Commits

Author SHA1 Message Date
Alex Jones
ced0de6448
Merge branch 'main' into feat/integrate
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:24:30 +01:00
Alex Jones
4d20f70fb4 chore: fixing filters
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:12 +01:00
Alex Jones
1b7f4ce44a chore: updated link output
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:12 +01: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
Alex Jones
c809af3f47 chore: Fixing broken tests
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:12 +01:00
Thomas Stadler
428c348586 chore: fix mistake introduced by ab55f157 (#240)
Signed-off-by: Thomas Stadler <thomas@thomasst.xyz>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:12 +01:00
Thomas Stadler
fe261b375f fix: exit progressbar on error (#99)
Signed-off-by: Thomas Stadler <thomas@thomasst.xyz>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:12 +01:00
Alex Jones
4984840de1 wip
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:06 +01:00
Alex Jones
80ac51c804 chore: compiling successfully
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:06 +01:00
AlexsJones
b0e517006e feat: initial impl of integration
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:06 +01:00
AlexsJones
61d6e52465 feat: initial impl of integration
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-04-11 19:22:06 +01:00
HOLLEVILLE Matthis
45c7ecf98b
Merge branch 'main' into feature/add-anonymize-option 2023-04-11 20:19:12 +02:00
Matthis Holleville
dd5824f436 feat: return errors if filter specified by flag does not exist.
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-11 19:21:15 +02:00
Matthis Holleville
08f2a89e54 feat: improve security of the MaskString function
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-11 19:12:59 +02: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
11326c1c5f feat: improve documentation & update hpa message
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-11 13:28:05 +02:00
Thomas Schuetz
fe502e1135
Merge branch 'main' into feature/add-anonymize-option 2023-04-11 07:47:06 +02:00
Matthis Holleville
705d2a0dce fix: pdb test
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-10 23:44:16 +02:00
Matthis Holleville
fd936ceaf7 fix: improve ReplaceIfMatch regex
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-10 23:36:43 +02:00
Matthis Holleville
30e33495e0 Merge branch 'main' into feature/add-anonymize-option 2023-04-10 23:12:30 +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
Thomas Stadler
3845d4747f
chore: fix mistake introduced by ab55f157 (#240)
Signed-off-by: Thomas Stadler <thomas@thomasst.xyz>
2023-04-10 22:30:10 +02:00
Thomas Stadler
ab55f157ef
fix: exit progressbar on error (#99)
Signed-off-by: Thomas Stadler <thomas@thomasst.xyz>
2023-04-10 20:01:55 +02:00
HOLLEVILLE Matthis
a582d444c5
fix: use hpa namespace instead analyzer namespace (#230)
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-10 07:49:22 +02:00
Aris Boutselis
c8ba7d62d2
feat: add storage class names' check.
Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-04-07 21:39:14 +01:00
Thomas Schuetz
e449cb6023
chore: add fakeai provider (#218)
* 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>
2023-04-06 21:10:01 +02:00
Aris Boutselis
c041ce2bbb
feat: introduce StatefulSet analyser.
Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-04-06 13:31:58 +01:00
AlexsJones
93bcc627ba fix: regression on dynamic filters
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-04-05 20:05:17 +01:00
Alex Jones
cff69a3926
Merge branch 'main' into feature/configuration-new-format 2023-04-05 19:15:35 +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
HOLLEVILLE Matthis
337c4a616b
Merge branch 'main' into feature/add-tests-to-hpa-analyzer 2023-04-05 16:07:28 +02:00
Matthis Holleville
ba4d701681 fix: Spelling
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-05 16:06:35 +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
22e31661bf
chore: added initial tests for json output
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-04-05 14:08:23 +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
Matthis Holleville
a24d1f1b30 fix: fixed hpa tests after rebase
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-05 08:53:49 +02:00
Thomas Schuetz
8958a45b9b
Merge branch 'main' into feature/add-tests-to-hpa-analyzer 2023-04-05 08:40:35 +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
Matthis Holleville
5a59abb55d feat: add tests for hpa analyzer
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-04 22:59:26 +02:00
Matthis Holleville
e27e9409dc feat: add tests for ingress analyzer && Use t.Fatalf to report a fatal error if RunAnalysis returns an unexpected error
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-04-04 01:08:53 +02:00
AlexsJones
44cc8f7ad6 feat: service test
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-04-02 21:24:04 +01:00
AlexsJones
35b838bfaf feat: adding unit testing and example
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-04-02 21:17:05 +01:00
AlexsJones
426f562be8 feat: analyzer ifacing
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-04-02 20:32:44 +01:00
Alex Jones
ea1ca44dba
Merge branch 'main' into feature/pdb-analyzer 2023-04-02 14:11:46 +01:00
Dominik Augustin
1190fe60fd fix: hpaAnalyzer analysis result is using wrong parent
Signed-off-by: Dominik Augustin <dom.augustin@gmx.at>
2023-04-02 15:05:07 +02:00
Dominik Augustin
ceff0084df fix: spelling of PodDisruptionBudget
Signed-off-by: Dominik Augustin <dom.augustin@gmx.at>
2023-04-02 14:57:24 +02:00
Dominik Augustin
532a5ce033 feat: add pda analyzer
Adds a PodDisruptionBudget analyzer, that checks if PDBs have matching
pods with their defined selector.

Signed-off-by: Dominik Augustin <dom.augustin@gmx.at>
2023-04-02 14:38:39 +02:00
Matthis Holleville
5dad75fbe9 feat: check if ScaleTargetRef is possible option
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-31 19:47:10 +02:00
HOLLEVILLE Matthis
4916fef9d6 fix: update client API call to use StatefulSet instead of Deployment
Co-authored-by: Dominik Augustin <yeahservice@users.noreply.github.com>
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-31 19:39:17 +02:00
Matthis Holleville
360387249f feat: add hpa analyzer and init additionalAnalyzers
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-31 18:22:01 +02:00
Matthis Holleville
3ed545f33f feat: rework filters
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-31 15:46:20 +02:00
Matthis Holleville
32ddf6691c feat: add & remove default filter(s) to analyze.
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-30 23:18:43 +02:00
HOLLEVILLE Matthis
6e17c9e285
feat: add filter command add "list" subcommand (#159)
* feat: add filter command add "list" subcommand to display available filters

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

* feat: create specific file to filterList

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

* feat: rename ListAnalyzers to ListFilters

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

---------

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-30 20:58:41 +02:00
Thomas Schuetz
53a19bb04d
Merge branch 'main' into fix/kubectx 2023-03-30 14:27:56 +02:00
Alex Jones
c8f3c946b0 fix: now supports different kubeconfig and kubectx
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-03-30 12:49:02 +01:00
HOLLEVILLE Matthis
b061566404
feat: add Ingress class validation (#154)
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-30 13:48:53 +02:00
Alex Jones
ab63bd0dd1
Merge branch 'main' into fix/ingress-object-meta-value 2023-03-30 08:49:48 +01: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
Matthis Holleville
14ba8d5550 fix: add Ingress in GetParent switch case
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-30 01:35:09 +02:00
Aris Boutselis
bf49a51c62
fix: Change ObjectMeta value in Ingress analyser.
Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>
2023-03-30 00:10:19 +01:00
HOLLEVILLE Matthis
86c7e81e18
feat: add secret validation to ingress analyzer (#141)
This commit adds a check to the ingress analyzer that verifies whether the secret declared in the ingress exists on the cluster. This helps to ensure that only valid secrets are used in the ingress configuration.

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-29 20:36:50 +00:00
HOLLEVILLE Matthis
fe683b71b8
feat: init ingress analyzer (#138)
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
2023-03-29 18:27:05 +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
AlexsJones
6f90386fc9 feat: this stops service exiting the program
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-28 12:56:28 +01:00
Alex Jones
a270f7c89f
feat: enables overwriting of cache (#95) 2023-03-28 11:43:12 +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
a194d4a509 chore: moved code
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-27 10:59:48 +01:00
AlexsJones
1bc839c48b wip fixing missing details
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-27 10:25:25 +01:00
Alex Jones
aa8203261f
Merge branch 'main' into feat/pvc 2023-03-26 16:22:13 +01:00
Thomas Schuetz
88d49ae21c
feat: added analysis for pvcs
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-03-25 23:25:21 +01:00
Thomas Schuetz
deebec629e Merge branch 'main' of github.com:k8sgpt-ai/k8sgpt into feat/endpoint_missing 2023-03-25 23:05:16 +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
Thomas Schuetz
961fb6c555
feat: add service analysis
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-03-25 22:53:14 +01:00
Thomas Schuetz
9c7d55955b
fix: missing parent when explain is used
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-03-25 15:57:48 +01:00
Thomas Schuetz
b29c6e4582
feat: find parent objects
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-03-25 14:25:22 +01:00
Alex Jones
979f13f043
feat: initial json implementation (#68)
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-24 23:10:30 +01:00
AlexsJones
80a99757f9 fixes a nasty bug
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-24 14:19:16 +00:00
Alex Jones
bdb2e739d4 interfaced out ai clients
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2023-03-24 12:01:36 +00:00
Thomas Schuetz
8e6b9886ea Merge branch 'main' of github.com:k8sgpt-ai/k8sgpt into feat/rs_fail 2023-03-23 11:56:26 +01:00
Thomas Schuetz
8ac56e062b
feat: find replicaset errors
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-03-22 19:05:04 +01:00
AlexsJones
ca534b337a updated the guard on the event
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-22 15:17:59 +00:00
AlexsJones
f873cf317f reads the event stream to correlate against OOMKill events
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-22 15:13:34 +00:00
AlexsJones
e4f138dc00 adding performance optimisation through local caching
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-22 11:19:26 +00:00
AlexsJones
9409998884 merged main
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-22 09:38:45 +00:00
Thomas Schuetz
a307c132b3
chore: change module repo
Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
2023-03-22 07:40:21 +01:00
AlexsJones
144617e20d first
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-21 21:23:59 +00:00
AlexsJones
365a5674ba restructure
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-21 21:00:18 +00:00
AlexsJones
2a6404b94f adding workflow
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-21 20:09:18 +00:00
AlexsJones
a14cde2c1f updated copy on readme
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-21 19:58:32 +00:00
AlexsJones
59a0507e37 first
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2023-03-21 11:56:05 +00:00