Skip to content

Commit

Permalink
fix(Traefik Hub): AIServices are available in API Gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
juliens authored Feb 7, 2025
1 parent cb40c04 commit e18b8ad
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
11 changes: 8 additions & 3 deletions traefik/templates/rbac/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,14 @@ rules:
- update
- patch
- delete
{{- end }}
{{- if .Values.hub.token }}
- apiGroups:
- hub.traefik.io
resources:
- aiservices
verbs:
- list
- watch
- get
{{- if or (semverCompare ">=v3.1.0-0" $version) .Values.hub.apimanagement.enabled }}
- apiGroups:
- ""
Expand Down Expand Up @@ -238,7 +244,6 @@ rules:
- apiplans
- apicatalogitems
- managedsubscriptions
- aiservices
verbs:
- list
- watch
Expand Down
14 changes: 13 additions & 1 deletion traefik/tests/rbac-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,19 @@ tests:
hub:
token: xxx
asserts:
- template: rbac/clusterrole.yaml
contains:
path: rules
content:
apiGroups:
- hub.traefik.io
resources:
- aiservices
verbs:
- list
- watch
- get

- template: rbac/clusterrole.yaml
contains:
path: rules
Expand Down Expand Up @@ -952,7 +965,6 @@ tests:
- apiplans
- apicatalogitems
- managedsubscriptions
- aiservices
verbs:
- list
- watch
Expand Down

0 comments on commit e18b8ad

Please sign in to comment.