Skip to content

Lagoon Insights component, runs in core, and communicates with the lagoon-remote controller

License

Notifications You must be signed in to change notification settings

uselagoon/insights-handler

Folders and files

NameName
Last commit message
Last commit date
Dec 4, 2023
Nov 21, 2023
Jun 5, 2023
Sep 17, 2023
Nov 19, 2023
Jun 20, 2022
Nov 19, 2023
Aug 21, 2023
Sep 17, 2023
Nov 19, 2023
Aug 23, 2023
Nov 21, 2023
Nov 28, 2023

Repository files navigation

Lagoon Insights Handler

This service will listen for messages and handle the requirements of the payload.

Facts

Currently, the main purpose is to consume a Software Bill of Materials (SBOM) of facts from the logs queue, process and push to the api and s3 bucket.

Local development

go run main.go \
    -rabbitmq-username guest \
    -rabbitmq-password guest \
    -lagoon-api-host http://localhost:8888/graphql \
    --jwt-token-signing-key secret  \
    --access-key-id minio \
    --secret-access-key minio123

To compile GraphQL schema, type-safe structs and response data with genqlient we just add a query/mutation inside of lagoonclient/genqlient.graphql and run this:

go generate

Configmap labels

  "labels": {
    "lagoon.sh/project": "lagoon",
    "lagoon.sh/environment": "main",
    "lagoon.sh/service": "cli",
    "lagoon.sh/insightsType": ["sbom", "image"],
    "lagoon.sh/insightsOutputCompressed": ["true", "false" (default)] (optional),
    "lagoon.sh/insightsOutputFileExt": ["json (default)", "txt", "csv", "html", "jpg"] (optional),
    "lagoon.sh/insightsOutputFileMIMEType": ["text/html", "image/svg+xml"]  (optional)
  }