Add configmap target check (#203)

* Implement configmap target check

Only include permissions to configmaps if target includes configmap. This reduces permissions.

* Bump version

* change envVars to empty list

* use coalesce

* use git

---------

Co-authored-by: Christian Hopf <git@ckotzbauer.de>
This commit is contained in:
hardwarefresser 2024-08-17 10:01:42 +02:00 committed by GitHub
parent e227e27071
commit 30a0a4a838
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
apiVersion: v2 apiVersion: v2
description: Catalogue all images of a Kubernetes cluster to multiple targets with Syft description: Catalogue all images of a Kubernetes cluster to multiple targets with Syft
name: sbom-operator name: sbom-operator
version: 0.37.0 version: 0.37.1
appVersion: 0.36.0 appVersion: 0.36.0
home: https://github.com/ckotzbauer/sbom-operator home: https://github.com/ckotzbauer/sbom-operator
sources: sources:

View File

@ -18,6 +18,7 @@ rules:
- secrets - secrets
verbs: verbs:
- get - get
{{- if and .Values.args (hasKey .Values.args "targets") .Values.args.targets (contains "configmap" (coalesce .Values.args.targets "git")) }}
- apiGroups: - apiGroups:
- "" - ""
resources: resources:
@ -27,6 +28,7 @@ rules:
- create - create
- list - list
- delete - delete
{{- end }}
- apiGroups: - apiGroups:
- "" - ""
resources: resources:

View File

@ -10,7 +10,7 @@ image:
args: {} args: {}
envVars: {} envVars: []
jobImageMode: false jobImageMode: false