Skip to content
Snippets Groups Projects
Commit f2621a3a authored by OZGCloud's avatar OZGCloud
Browse files

add condition userAuthentication.enable for rbac

parent 9ad60b3d
Branches
Tags
No related merge requests found
Showing with 109 additions and 10 deletions
......@@ -21,7 +21,7 @@
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
{{- if (.Values.userAuthentication).enabled }}
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
......@@ -36,6 +36,7 @@ roleRef:
kind: Role
name: ozgcloud-elster-transfer-operator-configmap-read-role
apiGroup: rbac.authorization.k8s.io
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
......@@ -46,3 +47,4 @@ rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "get", "list", "update", "patch"]
{{- end -}}
\ No newline at end of file
......@@ -21,7 +21,7 @@
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
{{- if (.Values.userAuthentication).enabled }}
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
......@@ -36,6 +36,7 @@ roleRef:
kind: Role
name: ozgcloud-elster-transfer-operator-configmap-write-role
apiGroup: rbac.authorization.k8s.io
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
......@@ -46,3 +47,4 @@ rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create", "get", "list", "update", "patch"]
{{- end -}}
\ No newline at end of file
......@@ -21,7 +21,7 @@
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
{{- if (.Values.userAuthentication).enabled }}
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
......@@ -47,3 +47,5 @@ rules:
resourceNames: ["elster-transfer"]
resources: ["deployments"]
verbs: ["get", "list"]
{{- end -}}
\ No newline at end of file
......@@ -21,7 +21,7 @@
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
{{- if (.Values.userAuthentication).enabled }}
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
......@@ -47,3 +47,4 @@ rules:
resourceNames: ["elster-transfer"]
resources: ["deployments"]
verbs: ["update", "patch"]
{{- end -}}
\ No newline at end of file
......@@ -33,6 +33,9 @@ templates:
- templates/ozgcloud_elstertransfer_operator_configmap_read_role.yaml
tests:
- it: test RoleBinding metadata
set:
userAuthentication:
enabled: true
asserts:
- isKind:
of: RoleBinding
......@@ -44,6 +47,9 @@ tests:
value: ozgcloud-elster-transfer-operator-configmap-read-role-binding
documentIndex: 0
- it: test RoleBinding subject
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: subjects
......@@ -53,6 +59,9 @@ tests:
namespace: etr-operator
documentIndex: 0
- it: test RoleBinding roleRef
set:
userAuthentication:
enabled: true
asserts:
- equal:
path: roleRef
......@@ -63,6 +72,9 @@ tests:
documentIndex: 0
- it: test Role metadata
set:
userAuthentication:
enabled: true
asserts:
- isKind:
of: Role
......@@ -74,6 +86,9 @@ tests:
value: ozgcloud-elster-transfer-operator-configmap-read-role
documentIndex: 1
- it: test RoleBinding rules
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: rules
......@@ -89,3 +104,11 @@ tests:
- update
- patch
documentIndex: 1
- it: RBAC not created by default
asserts:
- hasDocuments:
count: 0
documentIndex: 1
- hasDocuments:
count: 0
documentIndex: 0
......@@ -33,6 +33,9 @@ templates:
- templates/ozgcloud_elstertransfer_operator_configmap_write_role.yaml
tests:
- it: test RoleBinding metadata
set:
userAuthentication:
enabled: true
asserts:
- isKind:
of: RoleBinding
......@@ -44,6 +47,9 @@ tests:
value: ozgcloud-elster-transfer-operator-configmap-write-role-binding
documentIndex: 0
- it: test RoleBinding subject
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: subjects
......@@ -53,6 +59,9 @@ tests:
namespace: etr-operator
documentIndex: 0
- it: test RoleBinding roleRef
set:
userAuthentication:
enabled: true
asserts:
- equal:
path: roleRef
......@@ -63,6 +72,9 @@ tests:
documentIndex: 0
- it: test Role metadata
set:
userAuthentication:
enabled: true
asserts:
- isKind:
of: Role
......@@ -74,6 +86,9 @@ tests:
value: ozgcloud-elster-transfer-operator-configmap-write-role
documentIndex: 1
- it: test RoleBinding rules
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: rules
......@@ -89,3 +104,11 @@ tests:
- update
- patch
documentIndex: 1
- it: RBAC not created by default
asserts:
- hasDocuments:
count: 0
documentIndex: 1
- hasDocuments:
count: 0
documentIndex: 0
\ No newline at end of file
......@@ -33,6 +33,9 @@ templates:
- templates/ozgcloud_elstertransfer_operator_deployment_read_role.yaml
tests:
- it: test RoleBinding metadata
set:
userAuthentication:
enabled: true
asserts:
- isKind:
of: RoleBinding
......@@ -44,6 +47,9 @@ tests:
value: ozgcloud-elster-transfer-operator-deployment-read-role-binding
documentIndex: 0
- it: test RoleBinding subject
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: subjects
......@@ -53,6 +59,9 @@ tests:
namespace: etr-operator
documentIndex: 0
- it: test RoleBinding roleRef
set:
userAuthentication:
enabled: true
asserts:
- equal:
path: roleRef
......@@ -63,6 +72,9 @@ tests:
documentIndex: 0
- it: test Role metadata
set:
userAuthentication:
enabled: true
asserts:
- isKind:
of: Role
......@@ -74,6 +86,9 @@ tests:
value: ozgcloud-elster-transfer-operator-deployment-read-role
documentIndex: 1
- it: test RoleBinding rules
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: rules
......@@ -88,3 +103,11 @@ tests:
- get
- list
documentIndex: 1
- it: RBAC not created by default
asserts:
- hasDocuments:
count: 0
documentIndex: 1
- hasDocuments:
count: 0
documentIndex: 0
\ No newline at end of file
......@@ -33,6 +33,9 @@ templates:
- templates/ozgcloud_elstertransfer_operator_deployment_write_role.yaml
tests:
- it: test RoleBinding metadata
set:
userAuthentication:
enabled: true
asserts:
- isKind:
of: RoleBinding
......@@ -44,6 +47,9 @@ tests:
value: ozgcloud-elster-transfer-operator-deployment-write-role-binding
documentIndex: 0
- it: test RoleBinding subject
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: subjects
......@@ -53,6 +59,9 @@ tests:
namespace: etr-operator
documentIndex: 0
- it: test RoleBinding roleRef
set:
userAuthentication:
enabled: true
asserts:
- equal:
path: roleRef
......@@ -63,6 +72,9 @@ tests:
documentIndex: 0
- it: test Role metadata
set:
userAuthentication:
enabled: true
asserts:
- isKind:
of: Role
......@@ -74,6 +86,9 @@ tests:
value: ozgcloud-elster-transfer-operator-deployment-write-role
documentIndex: 1
- it: test RoleBinding rules
set:
userAuthentication:
enabled: true
asserts:
- contains:
path: rules
......@@ -88,3 +103,11 @@ tests:
- update
- patch
documentIndex: 1
- it: RBAC not created by default
asserts:
- hasDocuments:
count: 0
documentIndex: 1
- hasDocuments:
count: 0
documentIndex: 0
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment