diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-backend.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-backend.yaml index d006c7e3b..54cd6b377 100644 --- a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-backend.yaml +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-backend.yaml @@ -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 diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-1.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-1.yaml index aa1176eff..230fe45b0 100644 --- a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-1.yaml +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-1.yaml @@ -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 -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-2.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-2.yaml index a6b1c1400..0b3cadd49 100644 --- a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-2.yaml +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-2.yaml @@ -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/throttling/policies/export" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/throttling/policies/export" - backendRefs: + - 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/import" - method: "POST" + weight: 1 filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/environments/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/admin/throttling/policies/import" - 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-4 + type: "ExtensionRef" + matches: + - method: "PUT" + path: type: "RegularExpression" - value: "/api/admin/policies/search" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/policies/search" - backendRefs: + value: "/environments/(.*)" + - 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: "/environments/\\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-4 + type: "ExtensionRef" + matches: + - method: "DELETE" + 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: "/environments/(.*)" + - 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: - 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-4 + type: "ExtensionRef" + matches: + - method: "GET" + 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: "/environments" + - 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: - 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-4 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/admin/business-plans" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/business-plans" - backendRefs: + value: "/environments" + - 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: + replaceFullPath: "/applications/\\1/change-owner" 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-3 + type: "ExtensionRef" + matches: + - method: "POST" + 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: "/applications/(.*)/change-owner" + - 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: + replaceFullPath: "/api-categories/\\1" 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-5 + type: "ExtensionRef" + matches: + - method: "PUT" + 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: "/api-categories/(.*)" + - 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: - 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-5 + 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: "/api-categories" + - 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: - 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-5 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/api-categories" {{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-3.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-3.yaml index f4578a112..3214a12e4 100644 --- a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-3.yaml +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-3.yaml @@ -25,250 +25,180 @@ 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/throttling/policies/advanced/(.*)" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/throttling/policies/advanced/\\1" - backendRefs: + - 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 - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-7 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/admin/throttling/policies/export" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/throttling/policies/export" - backendRefs: + value: "/organizations" + - 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/import" - method: "POST" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/throttling/policies/import" - 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-7 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/admin/deny-policies" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/deny-policies" - backendRefs: + value: "/organizations" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/deny-policies" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/key-managers/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/admin/deny-policies" - 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-6 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/admin/deny-policies/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/deny-policies/\\1" - backendRefs: + value: "/key-managers/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/deny-policies/(.*)" - method: "DELETE" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/key-managers/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/admin/deny-policies/\\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-6 + type: "ExtensionRef" + matches: + - method: "PUT" + path: type: "RegularExpression" - value: "/api/admin/deny-policies/(.*)" - method: "PATCH" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/deny-policies/\\1" - backendRefs: + value: "/key-managers/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/applications" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/key-managers/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/admin/applications" - 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-6 + type: "ExtensionRef" + matches: + - method: "DELETE" + path: type: "RegularExpression" - value: "/api/admin/applications/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/applications/\\1" - backendRefs: + value: "/key-managers/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/applications/(.*)" - method: "DELETE" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/applications/\\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-6 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/admin/applications/(.*)/change-owner" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/applications/\\1/change-owner" - backendRefs: + value: "/key-managers" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/environments" - method: "GET" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/environments" - 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-6 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/admin/environments" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/environments" - backendRefs: + value: "/key-managers" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/environments/(.*)" - method: "PUT" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/api-categories/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/admin/environments/\\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-5 + type: "ExtensionRef" + matches: + - method: "DELETE" + path: + type: "RegularExpression" + value: "/api-categories/(.*)" {{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-4.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-4.yaml index 84d4fea43..1175bb7ae 100644 --- a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-4.yaml +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-4.yaml @@ -25,250 +25,125 @@ 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/environments/(.*)" - method: "DELETE" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/environments/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/bot-detection-data" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/bot-detection-data" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/monetization/publish-usage" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/monetization/publish-usage" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/monetization/publish-usage/status" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/monetization/publish-usage/status" - backendRefs: + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/workflows" - method: "GET" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/workflows" - 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-8 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/admin/workflows/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/workflows/\\1" - backendRefs: + value: "/workflows/update-workflow-status" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/workflows/update-workflow-status" - method: "POST" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/workflows/update-workflow-status" - 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-8 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/admin/tenant-info/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/tenant-info/\\1" - backendRefs: + value: "/workflows" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/custom-urls/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/organizations/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/admin/custom-urls/\\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-7 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/admin/api-categories" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/api-categories" - backendRefs: + value: "/organizations/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/api-categories" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/organizations/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/admin/api-categories" - 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-7 + type: "ExtensionRef" + matches: + - method: "PUT" + path: type: "RegularExpression" - value: "/api/admin/api-categories/(.*)" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/api-categories/\\1" - backendRefs: + value: "/organizations/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/api-categories/(.*)" - method: "DELETE" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/organizations/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/admin/api-categories/\\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-7 + type: "ExtensionRef" + matches: + - method: "DELETE" + path: type: "RegularExpression" - value: "/api/admin/settings" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/settings" - backendRefs: + value: "/organizations/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/system-scopes/(.*)" - method: "GET" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/system-scopes/\\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-7 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/admin/system-scopes" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/system-scopes" - 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" + value: "/organization-info" {{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-5.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-5.yaml deleted file mode 100644 index c0bd4acf1..000000000 --- a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-5.yaml +++ /dev/null @@ -1,259 +0,0 @@ -# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. -# -# WSO2 LLC. licenses this file to you under the Apache License, -# Version 2.0 (the "License"); you may not use this file except -# in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -{{- if .Values.wso2.apk.cp.enabled }} -apiVersion: "gateway.networking.k8s.io/v1beta1" -kind: "HTTPRoute" -metadata: - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-httproute-5 - namespace: {{ .Release.Namespace }} - labels: - api-name: "admin-domain-service" - api-version: "1.0.0" -spec: - hostnames: - - "{{ .Values.wso2.apk.listener.hostname | default "api.am.wso2.com"}}" - rules: - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/system-scopes" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/system-scopes" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/system-scopes/role-aliases" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/system-scopes/role-aliases" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/system-scopes/role-aliases" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/system-scopes/role-aliases" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/roles/(.*)" - method: "HEAD" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/roles/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/tenant-theme" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/tenant-theme" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/tenant-theme" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/tenant-theme" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/tenant-config" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/tenant-config" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/tenant-config" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/tenant-config" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/tenant-config-schema" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/tenant-config-schema" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/key-managers" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/key-managers" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/key-managers" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/key-managers" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/key-managers/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/key-managers/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/key-managers/(.*)" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/key-managers/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/key-managers/(.*)" - method: "DELETE" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/key-managers/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/admin/key-managers/discover" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/admin/key-managers/discover" - 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" -{{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-6.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-1.yaml similarity index 50% rename from helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-6.yaml rename to helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-1.yaml index f51bdec15..a22f99f84 100644 --- a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-httproute-6.yaml +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-1.yaml @@ -14,37 +14,16 @@ # specific language governing permissions and limitations # under the License. {{- if .Values.wso2.apk.cp.enabled }} -apiVersion: "gateway.networking.k8s.io/v1beta1" -kind: "HTTPRoute" +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope metadata: - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-httproute-6 - namespace: {{ .Release.Namespace }} labels: api-name: "admin-domain-service" api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1-uid spec: - hostnames: - - "{{ .Values.wso2.apk.listener.hostname | default "api.am.wso2.com"}}" - rules: - - matches: - - path: - type: "PathPrefix" - value: "/api/admin/organizations" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-backend - - matches: - - path: - type: "Exact" - value: "/api/admin/organization-info" - 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" + names: + - apk:admin {{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-2.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-2.yaml new file mode 100644 index 000000000..899f5479b --- /dev/null +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-2.yaml @@ -0,0 +1,30 @@ + +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "admin-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-2 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-2-uid +spec: + names: + - apk:deny_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-3.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-3.yaml new file mode 100644 index 000000000..f7a451a0d --- /dev/null +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-3.yaml @@ -0,0 +1,30 @@ + +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "admin-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-3 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-3-uid +spec: + names: + - apk:application_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-4.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-4.yaml new file mode 100644 index 000000000..e119e9f05 --- /dev/null +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-4.yaml @@ -0,0 +1,30 @@ + +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "admin-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-4 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-4-uid +spec: + names: + - apk:environment_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-5.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-5.yaml new file mode 100644 index 000000000..334a65312 --- /dev/null +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-5.yaml @@ -0,0 +1,30 @@ + +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "admin-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-5 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-5-uid +spec: + names: + - apk:category_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-6.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-6.yaml new file mode 100644 index 000000000..4471308a1 --- /dev/null +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-6.yaml @@ -0,0 +1,30 @@ + +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "admin-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-6 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-6-uid +spec: + names: + - apk:keymanager_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-7.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-7.yaml new file mode 100644 index 000000000..0e46c97d4 --- /dev/null +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-7.yaml @@ -0,0 +1,30 @@ + +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "admin-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-7 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-7-uid +spec: + names: + - apk:organization_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-8.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-8.yaml new file mode 100644 index 000000000..352059478 --- /dev/null +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api-scope-8.yaml @@ -0,0 +1,30 @@ + +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "admin-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-8 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-8-uid +spec: + names: + - apk:workflow_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/admin-ds/admin-domain-api.yaml b/helm-charts/templates/control-plane/admin-ds/admin-domain-api.yaml index f4389a4b5..ea704186f 100644 --- a/helm-charts/templates/control-plane/admin-ds/admin-domain-api.yaml +++ b/helm-charts/templates/control-plane/admin-ds/admin-domain-api.yaml @@ -22,6 +22,7 @@ metadata: labels: api-name: "admin-domain-service" api-version: "1.0.0" + uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-api-uid spec: apiName: "admin-domain-service" apiType: "REST" @@ -34,7 +35,5 @@ spec: - {{ template "apk-helm.resource.prefix" . }}-admin-ds-httproute-2 - {{ template "apk-helm.resource.prefix" . }}-admin-ds-httproute-3 - {{ template "apk-helm.resource.prefix" . }}-admin-ds-httproute-4 - - {{ template "apk-helm.resource.prefix" . }}-admin-ds-httproute-5 - - {{ template "apk-helm.resource.prefix" . }}-admin-ds-httproute-6 systemAPI: true {{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-backend.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-backend.yaml index 553a45313..e0128eb7e 100644 --- a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-backend.yaml +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-backend.yaml @@ -20,6 +20,7 @@ metadata: name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend namespace: {{ .Release.Namespace }} spec: + basePath: "/api/backoffice" services: - host: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-service.{{ .Release.Namespace }} port: 9443 diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-1.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-1.yaml index 80fad600a..5fb15b29f 100644 --- a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-1.yaml +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-1.yaml @@ -25,220 +25,210 @@ 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/backoffice/apis" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis" - backendRefs: + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/thumbnail" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/backoffice/apis/(.*)" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1" - backendRefs: + value: "/apis/(.*)/thumbnail" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/definition" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/thumbnail" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/definition" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + matches: + - method: "PUT" + path: type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/resource-paths" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/resource-paths" - backendRefs: + value: "/apis/(.*)/thumbnail" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/thumbnail" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/thumbnail" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/thumbnail" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/thumbnail" - backendRefs: + value: "/apis/(.*)/documents" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/documents" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/documents" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-4 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/documents" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/documents" - backendRefs: + value: "/apis/(.*)/documents" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/documents/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/definition" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/documents/\\2" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/documents/(.*)" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/documents/\\2" - backendRefs: + value: "/apis/(.*)/definition" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/documents/(.*)" - method: "DELETE" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/documents/\\2" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/documents/(.*)/content" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/documents/\\2/content" - backendRefs: + value: "/apis/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/documents/(.*)/content" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/documents/\\2/content" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + matches: + - method: "PUT" + path: + type: "RegularExpression" + value: "/apis/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - parentRefs: - - group: "gateway.networking.k8s.io" - kind: "Gateway" - name: "default" - sectionName: "httpslistener" + filters: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis" {{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-2.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-2.yaml index 6e15e4203..7f3ef64d8 100644 --- a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-2.yaml +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-2.yaml @@ -25,100 +25,230 @@ 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/backoffice/apis/(.*)/comments" - method: "GET" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents/\\2/content" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/comments" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/documents/(.*)/content" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/comments" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents/\\2/content" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/comments" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-4 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/apis/(.*)/documents/(.*)/content" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/comments/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/comments/\\2" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/documents/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/comments/(.*)" - method: "DELETE" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/comments/\\2" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-4 + type: "ExtensionRef" + matches: + - method: "PUT" + path: + type: "RegularExpression" + value: "/apis/(.*)/documents/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/comments/(.*)" - method: "PATCH" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/comments/\\2" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-4 + type: "ExtensionRef" + matches: + - method: "DELETE" + path: + type: "RegularExpression" + value: "/apis/(.*)/documents/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + filters: + - type: "URLRewrite" + urlRewrite: + path: + replaceFullPath: "/apis/\\1/comments/\\2" + type: "ReplaceFullPath" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/comments/(.*)/replies" - method: "GET" + value: "/apis/(.*)/comments/(.*)" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/comments/\\2/replies" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - parentRefs: - - group: "gateway.networking.k8s.io" - kind: "Gateway" - name: "default" - sectionName: "httpslistener" + filters: + - type: "URLRewrite" + urlRewrite: + path: + replaceFullPath: "/apis/\\1/comments" + type: "ReplaceFullPath" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-5 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments" {{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-3.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-3.yaml index 27b1e8974..0291b7417 100644 --- a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-3.yaml +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-3.yaml @@ -25,175 +25,211 @@ 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/backoffice/subscriptions" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/subscriptions" - backendRefs: + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/subscriptions/(.*)/subscriber-info" - method: "GET" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/subscriptions/\\1/subscriber-info" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-6 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/backoffice/subscriptions/block-subscription" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/subscriptions/block-subscription" - backendRefs: + value: "/subscriptions/unblock-subscription" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/subscriptions/unblock-subscription" - method: "POST" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/subscriptions/unblock-subscription" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-6 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/backoffice/usage-plans" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/usage-plans" - backendRefs: + value: "/subscriptions/block-subscription" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/search" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/subscriptions/\\1/subscriber-info" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/search" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/subscriptions/(.*)/subscriber-info" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/settings" - method: "GET" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/settings" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/subscriptions" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/api-categories" - method: "GET" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/api-categories" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/search" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/change-lifecycle" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments/\\2/replies" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/change-lifecycle" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments/(.*)/replies" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/lifecycle-history" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/lifecycle-history" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-5 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + matches: + - method: "PUT" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/backoffice/apis/(.*)/lifecycle-state" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/backoffice/apis/\\1/lifecycle-state" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-backoffice-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" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-5 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + matches: + - method: "DELETE" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments/(.*)" {{- end -}} + diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-4.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-4.yaml new file mode 100644 index 000000000..daa53fe4e --- /dev/null +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-httproute-4.yaml @@ -0,0 +1,124 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: "gateway.networking.k8s.io/v1beta1" +kind: "HTTPRoute" +metadata: + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-httproute-4 + namespace: {{ .Release.Namespace }} + labels: + api-name: "backoffice-domain-service" + api-version: "1.0.0" +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: + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend + filters: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/apis/change-lifecycle" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend + filters: + - type: "URLRewrite" + urlRewrite: + path: + replaceFullPath: "/apis/\\1/lifecycle-state" + type: "ReplaceFullPath" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/lifecycle-state" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend + filters: + - type: "URLRewrite" + urlRewrite: + path: + replaceFullPath: "/apis/\\1/lifecycle-history" + type: "ReplaceFullPath" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/lifecycle-history" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-backend + filters: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + type: "ExtensionRef" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/api-categories" +{{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-1.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-1.yaml new file mode 100644 index 000000000..b02cc1f9a --- /dev/null +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-1.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "backoffice-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-1-uid +spec: + names: + - apk:backoffice_admin +{{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-2.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-2.yaml new file mode 100644 index 000000000..7b52d4ea5 --- /dev/null +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-2.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "backoffice-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-2-uid +spec: + names: + - apk:api_view +{{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-3.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-3.yaml new file mode 100644 index 000000000..446c24857 --- /dev/null +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-3.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "backoffice-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-3-uid +spec: + names: + - apk:api_publish +{{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-4.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-4.yaml new file mode 100644 index 000000000..9253a6314 --- /dev/null +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-4.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "backoffice-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-4 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-4-uid +spec: + names: + - apk:document_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-5.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-5.yaml new file mode 100644 index 000000000..141fa5845 --- /dev/null +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-5.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "backoffice-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-5 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-5-uid +spec: + names: + - apk:comment_write +{{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-6.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-6.yaml new file mode 100644 index 000000000..a181edde9 --- /dev/null +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api-scope-6.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "backoffice-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-6 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-scope-6-uid +spec: + names: + - apk:subscription_manage +{{- end -}} diff --git a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api.yaml b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api.yaml index c9a380c0f..63d949994 100644 --- a/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api.yaml +++ b/helm-charts/templates/control-plane/backoffice-ds/backoffice-domain-api.yaml @@ -23,6 +23,7 @@ metadata: labels: api-name: "backoffice-domain-service" api-version: "1.0.0" + uid: {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-api-uid spec: apiName: "Backoffice Domain API" apiType: "REST" @@ -34,5 +35,6 @@ spec: - {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-httproute-1 - {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-httproute-2 - {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-httproute-3 + - {{ template "apk-helm.resource.prefix" . }}-backoffice-ds-httproute-4 systemAPI: true {{- end -}} diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-backend.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-backend.yaml index ee1cc538f..a875486fb 100644 --- a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-backend.yaml +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-backend.yaml @@ -20,6 +20,7 @@ metadata: name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend namespace: {{ .Release.Namespace }} spec: + basePath: "/api/devportal" services: - host: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-service.{{ .Release.Namespace }} port: 9443 diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-1.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-1.yaml index b6df5ced3..1334210a2 100644 --- a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-1.yaml +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-1.yaml @@ -25,190 +25,124 @@ 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/devportal/apis" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis" - backendRefs: + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/thumbnail" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/apis/(.*)/definition" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/definition" - backendRefs: + value: "/apis/(.*)/thumbnail" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/sdks/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/sdks/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/sdks/\\2" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/apis/(.*)/documents" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/documents" - backendRefs: + value: "/apis/(.*)/sdks/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/documents/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents/\\2/content" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/documents/\\2" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/apis/(.*)/documents/(.*)/content" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/documents/\\2/content" - backendRefs: + value: "/apis/(.*)/documents/(.*)/content" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/thumbnail" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/thumbnail" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/apis/(.*)/ratings" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/ratings" - backendRefs: + value: "/apis/(.*)/documents/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/user-rating" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/documents" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/user-rating" - backendRefs: + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/documents" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/user-rating" - method: "PUT" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/definition" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/user-rating" - backendRefs: + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/definition" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/user-rating" - method: "DELETE" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/user-rating" - backendRefs: + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - parentRefs: - - group: "gateway.networking.k8s.io" - kind: "Gateway" - name: "default" - sectionName: "httpslistener" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis" {{- end -}} diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-2.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-2.yaml index 6c2b054cf..c4e94af4e 100644 --- a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-2.yaml +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-2.yaml @@ -25,235 +25,140 @@ 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/devportal/apis/(.*)/comments" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/comments" - backendRefs: + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/comments" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/user-rating" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/comments" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/apis/(.*)/comments/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/comments/\\2" - backendRefs: + value: "/apis/(.*)/user-rating" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/comments/(.*)" - method: "DELETE" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/user-rating" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/comments/\\2" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "PUT" + path: type: "RegularExpression" - value: "/api/devportal/apis/(.*)/comments/(.*)" - method: "PATCH" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/comments/\\2" - backendRefs: + value: "/apis/(.*)/user-rating" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/comments/(.*)/replies" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/user-rating" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/comments/\\2/replies" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "DELETE" + path: type: "RegularExpression" - value: "/api/devportal/apis/(.*)/topics" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/topics" - backendRefs: + value: "/apis/(.*)/user-rating" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/subscription-policies" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/ratings" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/subscription-policies" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/tenants" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/tenants" - backendRefs: + value: "/apis/(.*)/ratings" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/recommendations" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/recommendations" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/api-categories" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/api-categories" - backendRefs: + value: "/apis/(.*)/comments/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/key-managers" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/key-managers" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "DELETE" + path: type: "RegularExpression" - value: "/api/devportal/apis/(.*)/graphql-policies/complexity" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/graphql-policies/complexity" - backendRefs: + value: "/apis/(.*)/comments/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/apis/(.*)/graphql-policies/complexity/types" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/apis/\\1/graphql-policies/complexity/types" - backendRefs: + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/me/change-password" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/me/change-password" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - parentRefs: - - group: "gateway.networking.k8s.io" - kind: "Gateway" - name: "default" - sectionName: "httpslistener" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments" {{- end -}} diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-3.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-3.yaml index b3c6520a9..e567f72c0 100644 --- a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-3.yaml +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-3.yaml @@ -25,205 +25,155 @@ 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/devportal/applications" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications" - backendRefs: + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/generate-keys" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/devportal/applications/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1" - backendRefs: + value: "/applications/(.*)/generate-keys" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)" - method: "PUT" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/applications/(.*)" - method: "DELETE" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1" - backendRefs: + value: "/applications/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/generate-keys" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/generate-keys" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "PUT" + path: type: "RegularExpression" - value: "/api/devportal/applications/(.*)/map-keys" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/map-keys" - backendRefs: + value: "/applications/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/keys" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/keys" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "DELETE" + path: type: "RegularExpression" - value: "/api/devportal/applications/(.*)/keys/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/keys/\\2" - backendRefs: + value: "/applications/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/keys/(.*)" - method: "PUT" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/keys/\\2" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/applications" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/keys/(.*)/regenerate-secret" - method: "POST" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/keys/\\2/regenerate-secret" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/applications" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/keys/(.*)/clean-up" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments/\\2/replies" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/keys/\\2/clean-up" - backendRefs: + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments/(.*)/replies" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/keys/(.*)/generate-token" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/apis/\\1/comments/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/keys/\\2/generate-token" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-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" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "PATCH" + path: + type: "RegularExpression" + value: "/apis/(.*)/comments/(.*)" {{- end -}} diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-4.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-4.yaml index 581e50e63..e94aca1e1 100644 --- a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-4.yaml +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-4.yaml @@ -25,160 +25,170 @@ 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/devportal/applications/(.*)/oauth-keys" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/oauth-keys" - backendRefs: + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/oauth-keys/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/oauth-keys/\\2/regenerate-secret" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/oauth-keys/\\2" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/devportal/applications/(.*)/oauth-keys/(.*)" - method: "PUT" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/oauth-keys/\\2" - backendRefs: + value: "/applications/(.*)/oauth-keys/(.*)/regenerate-secret" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/oauth-keys/(.*)/regenerate-secret" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/oauth-keys/\\2/generate-token" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/oauth-keys/\\2/regenerate-secret" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/applications/(.*)/oauth-keys/(.*)/generate-token" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/oauth-keys/(.*)/clean-up" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/oauth-keys/\\2/clean-up" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/oauth-keys/\\2/clean-up" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/applications/(.*)/oauth-keys/(.*)/clean-up" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/oauth-keys/(.*)/generate-token" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/oauth-keys/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/oauth-keys/\\2/generate-token" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/applications/(.*)/oauth-keys/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/api-keys/(.*)/generate" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/oauth-keys/\\2" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/api-keys/\\2/generate" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "PUT" + path: + type: "RegularExpression" + value: "/applications/(.*)/oauth-keys/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/(.*)/api-keys/(.*)/revoke" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/oauth-keys" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/\\1/api-keys/\\2/revoke" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/applications/(.*)/oauth-keys" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/export" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/map-keys" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/export" - backendRefs: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/applications/(.*)/map-keys" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/applications/import" - method: "POST" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/api-keys/\\2/generate" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/applications/import" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-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" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/applications/(.*)/api-keys/(.*)/generate" {{- end -}} diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-5.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-5.yaml index c644bdfe8..0e7a0af21 100644 --- a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-5.yaml +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-5.yaml @@ -25,250 +25,150 @@ 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/devportal/subscriptions" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/subscriptions" - backendRefs: + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/subscriptions" - method: "POST" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/subscriptions" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/devportal/subscriptions/multiple" - method: "POST" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/subscriptions/multiple" - backendRefs: + value: "/subscriptions/multiple" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/subscriptions/(.*)/additionalInfo" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/subscriptions/\\1/additionalInfo" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/subscriptions/\\1/additionalInfo" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/subscriptions/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/subscriptions/\\1" - backendRefs: + value: "/subscriptions/(.*)/additionalInfo" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/subscriptions/(.*)" - method: "PUT" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/subscriptions/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/subscriptions/\\1" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/subscriptions/(.*)" - method: "DELETE" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/subscriptions/\\1" - backendRefs: + value: "/subscriptions/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/subscriptions/(.*)/usage" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/subscriptions/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/subscriptions/\\1/usage" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "PUT" + path: type: "RegularExpression" - value: "/api/devportal/throttling-policies/(.*)" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/throttling-policies/\\1" - backendRefs: + value: "/subscriptions/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/throttling-policies/(.*)/(.*)" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/subscriptions/\\1" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/throttling-policies/\\1/\\2" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: DELETE + path: type: "RegularExpression" - value: "/api/devportal/tags" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/tags" - backendRefs: + value: "/subscriptions/(.*)" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/search" - method: "GET" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/search" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: type: "RegularExpression" - value: "/api/devportal/sdk-gen/languages" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/sdk-gen/languages" - backendRefs: + value: "/subscriptions" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/webhooks/subscriptions" - method: "GET" filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/webhooks/subscriptions" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: type: "RegularExpression" - value: "/api/devportal/settings" - method: "GET" - filters: - - type: "URLRewrite" - urlRewrite: - path: - type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/settings" - backendRefs: + value: "/subscriptions" + - backendRefs: - group: dp.wso2.com kind: Backend name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend - - matches: - - path: - type: "RegularExpression" - value: "/api/devportal/settings/application-attributes" - method: "GET" filters: - type: "URLRewrite" urlRewrite: path: + replaceFullPath: "/applications/\\1/api-keys/\\2/revoke" type: "ReplaceFullPath" - replaceFullPath: "/api/devportal/settings/application-attributes" - backendRefs: - - group: dp.wso2.com - kind: Backend - name: {{ template "apk-helm.resource.prefix" . }}-devportal-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" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "POST" + path: + type: "RegularExpression" + value: "/applications/(.*)/api-keys/(.*)/revoke" {{- end -}} diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-6.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-6.yaml new file mode 100644 index 000000000..931b8dd5f --- /dev/null +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-httproute-6.yaml @@ -0,0 +1,102 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: "gateway.networking.k8s.io/v1beta1" +kind: "HTTPRoute" +metadata: + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-httproute-6 + namespace: {{ .Release.Namespace }} + labels: + api-name: "devportal-domain-service" + api-version: "1.0.0" +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: + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend + filters: + - type: "URLRewrite" + urlRewrite: + path: + replaceFullPath: "/subscriptions/\\1/usage" + type: "ReplaceFullPath" + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/subscriptions/(.*)/usage" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/search" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend + filters: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/sdk-gen/languages" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend + filters: + - extensionRef: + group: dp.wso2.com + kind: Scope + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + type: "ExtensionRef" + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/key-managers" + - backendRefs: + - group: dp.wso2.com + kind: Backend + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-backend + matches: + - method: "GET" + path: + type: "RegularExpression" + value: "/api-categories" +{{- end -}} diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-scope-1.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-scope-1.yaml new file mode 100644 index 000000000..26814ba9a --- /dev/null +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api-scope-1.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved. +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +{{- if .Values.wso2.apk.cp.enabled }} +apiVersion: dp.wso2.com/v1alpha1 +kind: Scope +metadata: + labels: + api-name: "devportal-domain-service" + api-version: "1.0.0" + name: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1 + namespace: {{ .Release.Namespace }} + uid: {{ template "apk-helm.resource.prefix" . }}-devportal-ds-scope-1-uid +spec: + names: + - apk:subscribe +{{- end -}} diff --git a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api.yaml b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api.yaml index 7b9c994e3..e3eedfd25 100644 --- a/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api.yaml +++ b/helm-charts/templates/control-plane/devportal-ds/devportal-domain-api.yaml @@ -35,5 +35,6 @@ spec: - {{ template "apk-helm.resource.prefix" . }}-devportal-ds-httproute-3 - {{ template "apk-helm.resource.prefix" . }}-devportal-ds-httproute-4 - {{ template "apk-helm.resource.prefix" . }}-devportal-ds-httproute-5 + - {{ template "apk-helm.resource.prefix" . }}-devportal-ds-httproute-6 systemAPI: true {{- end -}}