Commit Graph

132 Commits

Author SHA1 Message Date
Alex Jones
da266b3c82
feat: dump (#1322)
* feat: reverting the cncf runners

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

* feat: creating a dump file for debugging

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

* chore: ran the linter

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

* chore: updated

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

* chore: updated

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

* chore: improved the function readme

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

* feat: added k8sgpt version info

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

* feat: added k8sgpt version info

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

* chore: added additional command

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

---------

Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
2024-11-12 12:04:01 +00:00
Naveen Thangaraj
d8fad956f4
feat: error from events for STS analyzer (#1256)
* error from events for sts analyzer

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

* Signedoff this commit

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

---------

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2024-10-03 18:33:50 +01:00
Aris Boutselis
e02c0ddd2d
fix: typo (#1244)
Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-09-17 08:39:39 +01:00
Xuetao Song
a4e44d59e3
feat: add event failure handling in service analyzer (#1132)
Signed-off-by: magicsong <songxuetao@bytedance.com>

Co-authored-by: magicsong <songxuetao@bytedance.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
2024-08-13 06:36:15 +01:00
Naveen Thangaraj
a068310731
feat: getting the error from status field for HPA analyzer (#1164)
* getting the error from status field for hpa analyzer

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

* Signed-off

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

* Updated the hpaAnalyzer_test.go

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

* Updated hpa_test.go

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

* Updated the hpa

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

* Updated the Conflicts

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

* Resolved all the conflicts

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

* Updated the test case

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>

---------

Signed-off-by: naveenthangaraj03 <tnaveen3402@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Matthis <matthish29@gmail.com>
2024-07-22 09:25:38 +02: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
Kay Yan
4366ad97b8
feat: skip k3s node type EtcdIsVoter (#1167)
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2024-07-12 16:17:45 +01:00
Alex Jones
728555c0ef
fix: advisory k8sgpt ghsa 85rg 8m6h 825p (#1139)
* chore: updated helmclient and helmv3

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

* chore: fixing tests

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

---------

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
2024-06-13 09:30:09 +01:00
Vaibhav Malik
2c7c74472c
test: added tests for the log analyzer (#1010)
* Added new tests for `LogAnalyzer` defined in the `pkg/analyzer`
  package. Increased the code coverage of the `log.go` file to >90%

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

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-05-09 07:18:22 +01:00
Peter Pan
b2ab94375e
fix: invalid ParentObj in output (#1068)
* Fix invalid ParentObj in output

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

* fix UT as well for ParentObj changes

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

* remove meta.Name in false output

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

* fix UT as well

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

---------

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
2024-04-26 07:26:06 +01:00
DragonAlex98
9a73d1923f
feat: add keda integration (#1058)
* refactor: move FetchLatestEvent inside util package

Signed-off-by: DragonAlex98 <a.antinori@reply.it>

* feat: add Keda integration and ScaledObject analyzer

Signed-off-by: DragonAlex98 <a.antinori@reply.it>

---------

Signed-off-by: DragonAlex98 <a.antinori@reply.it>
2024-04-25 11:41:01 +01:00
Vaibhav Malik
9dfcce842e
test: added missing tests for the Pod analyzer (#1021)
- Fixed a small bug where failures were being appended multiple times
  for CrashLoopBackOff and ContainerCreating container status reasons.

- Added missing test cases to ensure proper testing of the Pod analyzer.
  The addition of these missing test cases has increased the code
  coverage of this analyzer to 98%.

- Added checks for init containers in a pod.

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

Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
2024-04-13 21:08:33 +01:00
Vaibhav Malik
3c1c055ac7
test: added missing tests for the CronJob analyzer (#1019)
* 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>
2024-03-21 18:13:32 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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