Skip to content

Commit 75e9909

Browse files
authored
Merge pull request #4 from FIWARE/feat/route-ns
Add property to deploy ApisixRoutes in a different namespace
2 parents ce1997e + 3241044 commit 75e9909

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

charts/odrl-authorization/templates/catchall-route.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{{- if .Values.apisix.catchAllRoute.enabled }}
1+
{{ $ingressConfig := (index .Values.apisix "ingress-controller") }}
2+
{{- if and .Values.apisix.catchAllRoute.enabled $ingressConfig.enabled }}
23
{{- $url := include "odrl-auth.parseURL" .Values.apisix.catchAllRoute.upstream.url | fromYaml -}}
34
{{- if not $url.isService }}
45
apiVersion: apisix.apache.org/v2

charts/odrl-authorization/templates/routes.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ apiVersion: apisix.apache.org/v2
88
kind: ApisixRoute
99
metadata:
1010
name: {{ printf "%s-%s" $routeName "route" }}
11+
namespace: {{ default $.Release.Namespace $route.namespace | quote }}
1112
spec:
1213
ingressClassName: {{ $ingressClassName }}
1314
http:

charts/odrl-authorization/values.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,26 @@ apisix:
7878
host: 'http://localhost:8181'
7979
policy: policy/main
8080
with_body: true
81-
# -- configuration of routes for apisix
81+
# -- configuration of routes for apisix. E.g.
82+
# uri: /*
83+
# host: host-name-test
84+
# type: Service
85+
# namespace: super-ns # release namespace by default
86+
# upstream:
87+
# nodes:
88+
# data-service-test:9090: 1
89+
# type: roundrobin
90+
# plugins:
91+
# openid-connect:
92+
# bearer_only: true
93+
# use_jwks: true
94+
# client_id: data-service
95+
# client_secret: unused
96+
# discovery: https://verifier:8080/services/data-service/.well-known/openid-configuration
97+
# opa:
98+
# host: "http://localhost:8181"
99+
# policy: policy/main
100+
# with_body: true
82101
routes: []
83102
etcd:
84103
enabled: true

0 commit comments

Comments
 (0)