Skip to content

Commit 380f5d3

Browse files
feat: Add existing secret to policies bundle (#1952)
* chore: Add existing secret to policies bundle * chore: external bundle secret docs Signed-off-by: chenk <hen.keinan@gmail.com> --------- Signed-off-by: chenk <hen.keinan@gmail.com> Co-authored-by: chenk <hen.keinan@gmail.com>
1 parent b5f6e90 commit 380f5d3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

deploy/helm/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Keeps security report resources updated
8686
| operator.webhookSendDeletedReports | bool | `false` | webhookSendDeletedReports the flag to enable sending deleted reports if webhookBroadcastURL is enabled |
8787
| podAnnotations | object | `{}` | podAnnotations annotations added to the operator's pod |
8888
| podSecurityContext | object | `{}` | |
89+
| 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". |
8990
| policiesBundle.registry | string | `"ghcr.io"` | registry of the policies bundle |
9091
| policiesBundle.registryPassword | string | `nil` | registryPassword is the password for the registry |
9192
| policiesBundle.registryUser | string | `nil` | registryUser is the user for the registry |

deploy/helm/templates/secrets/operator.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.policiesBundle.existingSecret }}
12
---
23
apiVersion: v1
34
kind: Secret
@@ -12,4 +13,4 @@ data:
1213
{{- with .Values.policiesBundle.registryPassword }}
1314
policies.bundle.oci.password: {{ . | b64enc | quote }}
1415
{{- end }}
15-
16+
{{- end }}

deploy/helm/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,11 @@ policiesBundle:
622622
registryUser: ~
623623
# -- registryPassword is the password for the registry
624624
registryPassword: ~
625+
# -- existingSecret if a secret containing registry credentials that have been created outside the chart (e.g external-secrets, sops, etc...).
626+
# Keys must be at least one of the following: policies.bundle.oci.user, policies.bundle.oci.password
627+
# Overrides policiesBundle.registryUser, policiesBundle.registryPassword values.
628+
# Note: The secret has to be named "trivy-operator".
629+
existingSecret: false
625630

626631

627632
nodeCollector:

0 commit comments

Comments
 (0)