Skip to content

Commit

Permalink
Merge pull request #2117 from facchettos/eso-integration-config
Browse files Browse the repository at this point in the history
added options to sync the secret stores in eso integration
  • Loading branch information
FabianKramm authored Sep 5, 2024
2 parents 39c1444 + 90c40cf commit f854283
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
9 changes: 8 additions & 1 deletion chart/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,18 @@ rules:
resources: ["virtualmachines", "virtualmachines/status", "virtualmachineinstances", "virtualmachineinstances/status", "virtualmachineinstancemigrations", "virtualmachineinstancemigrations/status"]
verbs: ["create", "delete", "patch", "update", "get", "list", "watch"]
{{- end }}
{{- if (and .Values.integrations.externalSecrets.enabled .Values.integrations.externalSecrets.sync.externalSecrets.enabled) }}
{{- if .Values.integrations.externalSecrets.enabled }}
{{- if .Values.integrations.externalSecrets.sync.externalSecrets.enabled }}
- apiGroups: ["external-secrets.io"]
resources: ["externalsecrets"]
verbs: ["create", "delete", "patch", "update", "get", "list", "watch"]
{{- end }}
{{- if .Values.integrations.externalSecrets.sync.stores.enabled }}
- apiGroups: ["external-secrets.io"]
resources: ["secretstores"]
verbs: ["create", "delete", "patch", "update", "get", "list", "watch"]
{{- end }}
{{- end }}
{{- include "vcluster.customResourceDefinitions.roleExtraRules" . | indent 2 }}
{{- include "vcluster.plugin.roleExtraRules" . | indent 2 }}
{{- include "vcluster.generic.roleExtraRules" . | indent 2 }}
Expand Down
25 changes: 25 additions & 0 deletions chart/tests/role_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,31 @@ tests:
apiGroups: ["external-secrets.io"]
resources: ["externalsecrets"]
verbs: ["create", "delete", "patch", "update", "get", "list", "watch"]
- it: external secret test store sync
set:
integrations:
externalSecrets:
enabled: true
sync:
externalSecrets:
enabled: true
stores:
enabled: true
release:
name: my-release
namespace: my-namespace
asserts:
- hasDocuments:
count: 1
- equal:
path: kind
value: Role
- contains:
path: rules
content:
apiGroups: ["external-secrets.io"]
resources: ["secretstores"]
verbs: ["create", "delete", "patch", "update", "get", "list", "watch"]
- it: kubeVirt test
set:
integrations:
Expand Down

0 comments on commit f854283

Please sign in to comment.