This commit adds new tests for the `pkg/integration` package. As a
result, the code the code coverage of the package has increased from 0%
to 100%
This also includes a minor adjustment in the error statements of the
`Activate` and `Deactive` functions to ensure better understanding of
the cause of the error.
Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@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>
* 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>
* 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>
* 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>
Signed-off-by: swastik959 <Sswastik959@gmail.com>
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
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>
* 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>
* 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>