File tree Expand file tree Collapse file tree 2 files changed +130
-5
lines changed
Expand file tree Collapse file tree 2 files changed +130
-5
lines changed Original file line number Diff line number Diff line change 1- {{- if and .Values.rbac.enabled (or .Values.providers.kubernetesIngress.enabled (not .Values.rbac.namespaced)) - }}
2- {{- if not (and .Values.rbac.namespaced .Values.providers.kubernetesIngress.disableIngressClassLookup) - }}
1+ {{- if and .Values.rbac.enabled (or .Values.providers.kubernetesIngress.enabled (not .Values.rbac.namespaced)) }}
2+ {{- if not (and .Values.rbac.namespaced .Values.providers.kubernetesIngress.disableIngressClassLookup) }}
33---
44kind : ClusterRole
55apiVersion : rbac.authorization.k8s.io/v1
@@ -115,8 +115,6 @@ rules:
115115 - update
116116{{- end -}}
117117{{- end -}}
118- {{- end -}}
119- {{- end -}}
120118{{- if .Values.hub.token }}
121119 - apiGroups :
122120 - hub.traefik.io
@@ -208,4 +206,6 @@ rules:
208206 - get
209207 - list
210208 - watch
211- {{- end -}}
209+ {{- end }}
210+ {{- end }}
211+ {{- end }}
Original file line number Diff line number Diff line change @@ -906,3 +906,128 @@ tests:
906906 - get
907907 - list
908908 - watch
909+ - it : should provide namespace'd RBACS for hub
910+ set :
911+ hub :
912+ token : xxx
913+ rbac :
914+ namespaced : true
915+ providers :
916+ kubernetesIngress :
917+ enabled : false
918+ asserts :
919+ - template : rbac/role.yaml
920+ contains :
921+ path : rules
922+ content :
923+ apiGroups :
924+ - hub.traefik.io
925+ resources :
926+ - accesscontrolpolicies
927+ - apiaccesses
928+ - apiportals
929+ - apiratelimits
930+ - apis
931+ - apiversions
932+ verbs :
933+ - list
934+ - watch
935+ - create
936+ - update
937+ - patch
938+ - delete
939+ - get
940+ - template : rbac/role.yaml
941+ contains :
942+ path : rules
943+ content :
944+ apiGroups :
945+ - " "
946+ resources :
947+ - namespaces
948+ - pods
949+ - nodes
950+ verbs :
951+ - get
952+ - list
953+ - watch
954+ - template : rbac/role.yaml
955+ contains :
956+ path : rules
957+ content :
958+ apiGroups :
959+ - " "
960+ resources :
961+ - events
962+ verbs :
963+ - create
964+ - patch
965+ - template : rbac/role.yaml
966+ contains :
967+ path : rules
968+ content :
969+ apiGroups :
970+ - discovery.k8s.io
971+ resources :
972+ - endpointslices
973+ verbs :
974+ - list
975+ - get
976+ - watch
977+ - template : rbac/role.yaml
978+ contains :
979+ path : rules
980+ content :
981+ apiGroups :
982+ - coordination.k8s.io
983+ resources :
984+ - leases
985+ verbs :
986+ - get
987+ - list
988+ - watch
989+ - create
990+ - update
991+ - patch
992+ - delete
993+ - template : rbac/role.yaml
994+ contains :
995+ path : rules
996+ content :
997+ apiGroups :
998+ - " "
999+ resources :
1000+ - secrets
1001+ verbs :
1002+ - get
1003+ - list
1004+ - watch
1005+ - update
1006+ - create
1007+ - delete
1008+ - deletecollection
1009+ - template : rbac/role.yaml
1010+ contains :
1011+ path : rules
1012+ content :
1013+ apiGroups :
1014+ - apps
1015+ resources :
1016+ - replicasets
1017+ verbs :
1018+ - get
1019+ - list
1020+ - watch
1021+ - template : rbac/role.yaml
1022+ contains :
1023+ path : rules
1024+ content :
1025+ apiGroups :
1026+ - extensions
1027+ - networking.k8s.io
1028+ resources :
1029+ - ingresses
1030+ verbs :
1031+ - get
1032+ - list
1033+ - watch
You can’t perform that action at this time.
0 commit comments