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

feat: Add existing secret to policies bundle #1952

Merged
merged 2 commits into from
Mar 27, 2024
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
1 change: 1 addition & 0 deletions deploy/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Keeps security report resources updated
| operator.webhookSendDeletedReports | bool | `false` | webhookSendDeletedReports the flag to enable sending deleted reports if webhookBroadcastURL is enabled |
| podAnnotations | object | `{}` | podAnnotations annotations added to the operator's pod |
| podSecurityContext | object | `{}` | |
| policiesBundle.existingSecret | bool | `false` | existingSecret if a secret containing registry credentials that have been created outside the chart (e.g external-secrets, sops, etc...). Keys must be at least one of the following: policies.bundle.oci.user, policies.bundle.oci.password Overrides policiesBundle.registryUser, policiesBundle.registryPassword values. Note: The secret has to be named "trivy-operator". |
| policiesBundle.registry | string | `"ghcr.io"` | registry of the policies bundle |
| policiesBundle.registryPassword | string | `nil` | registryPassword is the password for the registry |
| policiesBundle.registryUser | string | `nil` | registryUser is the user for the registry |
Expand Down
3 changes: 2 additions & 1 deletion deploy/helm/templates/secrets/operator.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.policiesBundle.existingSecret }}
---
apiVersion: v1
kind: Secret
Expand All @@ -12,4 +13,4 @@ data:
{{- with .Values.policiesBundle.registryPassword }}
policies.bundle.oci.password: {{ . | b64enc | quote }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,11 @@ policiesBundle:
registryUser: ~
# -- registryPassword is the password for the registry
registryPassword: ~
# -- existingSecret if a secret containing registry credentials that have been created outside the chart (e.g external-secrets, sops, etc...).
# Keys must be at least one of the following: policies.bundle.oci.user, policies.bundle.oci.password
# Overrides policiesBundle.registryUser, policiesBundle.registryPassword values.
# Note: The secret has to be named "trivy-operator".
existingSecret: false


nodeCollector:
Expand Down
Loading