Skip to content

Commit a16c2f0

Browse files
committed
feat: allow to deploy sidecars in the operator pod
1 parent 20a5a7b commit a16c2f0

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

deploy/helm/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Keeps security report resources updated
5555
| operator.configAuditScannerScanOnlyCurrentRevisions | bool | `true` | configAuditScannerScanOnlyCurrentRevisions the flag to only create config audit scans on the current revision of a deployment. |
5656
| operator.controllerCacheSyncTimeout | string | `"5m"` | controllerCacheSyncTimeout the duration to wait for controller resources cache sync (default: 5m). |
5757
| operator.exposedSecretScannerEnabled | bool | `true` | exposedSecretScannerEnabled the flag to enable exposed secret scanner |
58+
| operator.extraContainers | list | `[]` | Additional containers to be added to the operator pod. See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example. |
5859
| operator.httpProxy | string | `nil` | httpProxy is the HTTP proxy used by Trivy operator to download the default policies from GitHub. |
5960
| operator.httpsProxy | string | `nil` | httpsProxy is the HTTPS proxy used by Trivy operator to download the default policies from GitHub. |
6061
| operator.infraAssessmentScannerEnabled | bool | `true` | infraAssessmentScannerEnabled the flag to enable infra assessment scanner |

deploy/helm/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ spec:
111111
- name: {{ .Values.alternateReportStorage.volumeName }}
112112
mountPath: {{ .Values.alternateReportStorage.mountPath }}
113113
{{- end }}
114+
{{- if .Values.operator.extraContainers }}
115+
{{- toYaml .Values.operator.extraContainers | nindent 8 }}
116+
{{- end }}
114117
{{- with .Values.image.pullSecrets }}
115118
imagePullSecrets: {{- toYaml . | nindent 8 }}
116119
{{- end }}

deploy/helm/values.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,30 @@ operator:
6464
# -- additional labels for the operator pod
6565
podLabels: {}
6666

67+
# -- Additional containers to be added to the operator pod.
68+
# See https://github.com/lemonldap-ng-controller/lemonldap-ng-controller as example.
69+
extraContainers: []
70+
# - name: my-sidecar
71+
# image: nginx:latest
72+
# - name: lemonldap-ng-controller
73+
# image: lemonldapng/lemonldap-ng-controller:0.2.0
74+
# args:
75+
# - /lemonldap-ng-controller
76+
# - --alsologtostderr
77+
# - --configmap=$(POD_NAMESPACE)/lemonldap-ng-configuration
78+
# env:
79+
# - name: POD_NAME
80+
# valueFrom:
81+
# fieldRef:
82+
# fieldPath: metadata.name
83+
# - name: POD_NAMESPACE
84+
# valueFrom:
85+
# fieldRef:
86+
# fieldPath: metadata.namespace
87+
# volumeMounts:
88+
# - name: copy-portal-skins
89+
# mountPath: /srv/var/lib/lemonldap-ng/portal/skins
90+
6791
# -- leaderElectionId determines the name of the resource that leader election
6892
# will use for holding the leader lock.
6993
leaderElectionId: "trivyoperator-lock"

0 commit comments

Comments
 (0)