Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable/insights-agent]: Add trivy.env to pass environment variables to the trivy container #1023

Merged
merged 3 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions stable/insights-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
## 2.9.0
* Update Goldilocks to version 4.4.0

## 2.9.1
* Add a `trivy.env` chart value to allow passing environment variables to the trivy container, as a map of `name: value`.

## 2.8.3
* Update pluto to 5.11

Expand Down
2 changes: 1 addition & 1 deletion stable/insights-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart to run the Fairwinds Insights agent
name: insights-agent
version: 2.9.0
version: 2.9.1
appVersion: 9.2.1
icon: https://raw.githubusercontent.com/FairwindsOps/charts/master/stable/insights-agent/icon.png
maintainers:
Expand Down
1 change: 1 addition & 0 deletions stable/insights-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Parameter | Description | Default
`trivy.maxScansPerRun` | Maximum number of images to scan on a single run | 20
`trivy.namespaceBlacklist` | Specifies which namespaces to not scan, takes an array of namespaces for example: `--set trivy.namespaceBlacklist="{kube-system,default}"` | nil
`trivy.serviceAccount.annotations` | Annotations to add to the Trivy service account, e.g. `eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT_ID:role/IAM_ROLE_NAME` for accessing private images | nil
`trivy.env` | A map of environment variables that will be set for the trivy container. | `nil`
`opa.role` | Specifies which ClusterRole to grant the OPA agent access to | view
`opa.additionalAccess` | Specifies additional access to grant the OPA agent. This should contain an array of objects with each having an array of apiGroups, an array of resources, and an array of verbs. Just like a RoleBinding. | null
`insights-agent` chart twice you will want to set this flag to `false` on *one* of the installs, doesn't matter which. | true
Expand Down
4 changes: 4 additions & 0 deletions stable/insights-agent/templates/trivy/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ spec:
- "./report.sh"
env:
{{ include "proxy-env-spec" . | indent 12 | trim }}
{{- range $key, $value := .Values.trivy.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
- name: FAIRWINDS_INSIGHTS_HOST
value: {{ .Values.insights.host | quote }}
- name: FAIRWINDS_ORG
Expand Down
2 changes: 2 additions & 0 deletions stable/insights-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ trivy:
maxScansPerRun: 20
timeout: 2400
insecureSSL: false
# trivy.env -- A map of environment variables that will be set for the trivy container.
env:
image:
repository: quay.io/fairwinds/fw-trivy
tag: "0.22"
Expand Down