Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scopes CRs for control plane and revamp routes #1817

Merged
merged 7 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metadata:
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
namespace: {{ .Release.Namespace }}
spec:
basePath: "/api/admin"
services:
- host: {{ template "apk-helm.resource.prefix" . }}-admin-ds-service.{{ .Release.Namespace }}
port: 9443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,250 +25,191 @@ metadata:
spec:
hostnames:
- "{{ .Values.wso2.apk.listener.hostname | default "api.am.wso2.com"}}"
parentRefs:
- group: "gateway.networking.k8s.io"
kind: "Gateway"
name: "default"
sectionName: "httpslistener"
rules:
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/policies/search"
method: "GET"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/policies/search"
backendRefs:
- backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/application-rate-plans"
method: "GET"
filters:
- type: "URLRewrite"
urlRewrite:
path:
replaceFullPath: "/deny-policies/\\1"
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/application-rate-plans"
backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1
type: "ExtensionRef"
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-2
type: "ExtensionRef"
matches:
- method: "GET"
path:
type: "RegularExpression"
value: "/api/admin/application-rate-plans"
method: "POST"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/application-rate-plans"
backendRefs:
value: "/deny-policies/(.*)"
- backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/application-rate-plans/(.*)"
method: "GET"
weight: 1
filters:
- type: "URLRewrite"
urlRewrite:
path:
replaceFullPath: "/deny-policies/\\1"
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/application-rate-plans/\\1"
backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-2
type: "ExtensionRef"
matches:
- method: "DELETE"
path:
type: "RegularExpression"
value: "/api/admin/application-rate-plans/(.*)"
method: "PUT"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/application-rate-plans/\\1"
backendRefs:
value: "/deny-policies/(.*)"
- backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/application-rate-plans/(.*)"
method: "DELETE"
filters:
- type: "URLRewrite"
urlRewrite:
path:
replaceFullPath: "/deny-policies/\\1"
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/application-rate-plans/\\1"
backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1
type: "ExtensionRef"
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-2
type: "ExtensionRef"
matches:
- method: "PATCH"
path:
type: "RegularExpression"
value: "/api/admin/business-plans"
method: "GET"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/business-plans"
backendRefs:
value: "/deny-policies/(.*)"
- backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/business-plans"
method: "POST"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/business-plans"
backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1
type: "ExtensionRef"
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-2
type: "ExtensionRef"
matches:
- method: "GET"
path:
type: "RegularExpression"
value: "/api/admin/business-plans/(.*)"
method: "GET"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/business-plans/\\1"
backendRefs:
value: "/deny-policies"
- backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/business-plans/(.*)"
method: "PUT"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/business-plans/\\1"
backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1
type: "ExtensionRef"
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-2
type: "ExtensionRef"
matches:
- method: "POST"
path:
type: "RegularExpression"
value: "/api/admin/business-plans/(.*)"
method: "DELETE"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/business-plans/\\1"
backendRefs:
value: "/deny-policies"
- backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/throttling/policies/advanced"
method: "GET"
filters:
- type: "URLRewrite"
urlRewrite:
path:
replaceFullPath: "/applications/\\1"
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/throttling/policies/advanced"
backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1
type: "ExtensionRef"
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-3
type: "ExtensionRef"
matches:
- method: "GET"
path:
type: "RegularExpression"
value: "/api/admin/throttling/policies/advanced"
method: "POST"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/throttling/policies/advanced"
backendRefs:
value: "/applications/(.*)"
- backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/throttling/policies/advanced/(.*)"
method: "GET"
filters:
- type: "URLRewrite"
urlRewrite:
path:
replaceFullPath: "/applications/\\1"
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/throttling/policies/advanced/\\1"
backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1
type: "ExtensionRef"
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-3
type: "ExtensionRef"
matches:
- method: "DELETE"
path:
type: "RegularExpression"
value: "/api/admin/throttling/policies/advanced/(.*)"
method: "PUT"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/throttling/policies/advanced/\\1"
backendRefs:
value: "/applications/(.*)"
- backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
- matches:
- path:
type: "RegularExpression"
value: "/api/admin/throttling/policies/advanced/(.*)"
method: "DELETE"
filters:
- type: "URLRewrite"
urlRewrite:
path:
type: "ReplaceFullPath"
replaceFullPath: "/api/admin/throttling/policies/advanced/\\1"
backendRefs:
- group: dp.wso2.com
kind: Backend
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend
parentRefs:
- group: "gateway.networking.k8s.io"
kind: "Gateway"
name: "default"
sectionName: "httpslistener"
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1
type: "ExtensionRef"
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-3
type: "ExtensionRef"
matches:
- method: "GET"
path:
type: "RegularExpression"
value: "/applications"
{{- end -}}
Loading
Loading