Skip to content

Commit

Permalink
Add scopes to the config ds
Browse files Browse the repository at this point in the history
  • Loading branch information
chashikajw committed Oct 12, 2023
1 parent e59b9f8 commit 7024a8e
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ spec:
- group: "dp.wso2.com"
kind: "Backend"
name: "{{ template "apk-helm.resource.prefix" . }}-config-deployer-ds-backend"
filters:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-config-ds-scope-1
type: ExtensionRef
- matches:
- path:
type: "RegularExpression"
Expand All @@ -43,6 +49,12 @@ spec:
- group: "dp.wso2.com"
kind: "Backend"
name: "{{ template "apk-helm.resource.prefix" . }}-config-deployer-ds-backend"
filters:
- extensionRef:
group: dp.wso2.com
kind: Scope
name: {{ template "apk-helm.resource.prefix" . }}-config-ds-scope-1
type: ExtensionRef
parentRefs:
- group: "gateway.networking.k8s.io"
kind: "Gateway"
Expand Down
Original file line number Diff line number Diff line change
@@ -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 and .Values.wso2.apk.dp.enabled .Values.wso2.apk.dp.configdeployer.enabled }}
apiVersion: dp.wso2.com/v1alpha1
kind: Scope
metadata:
labels:
managed-by: "apk"
name: {{ template "apk-helm.resource.prefix" . }}-config-ds-scope-1
namespace: {{ .Release.Namespace }}
uid: {{ template "apk-helm.resource.prefix" . }}-admin-ds-scope-1-uid
spec:
names:
- apk:api_create
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ paths:
tags:
- APIs
summary: Deploy API
security:
- OAuth2Security:
- apk:api_create
description: |
operationId: deployAPI
requestBody:
Expand Down Expand Up @@ -54,6 +57,9 @@ paths:
tags:
- APIs
summary: Undeploy API
security:
- OAuth2Security:
- apk:api_create
description: |
operationId: undeployAPI
parameters:
Expand Down Expand Up @@ -132,3 +138,12 @@ components:
schema:
type: string
default: application/json
securitySchemes:
OAuth2Security:
type: oauth2
flows:
password:
tokenUrl: https://localhost:9095/oauth2/token
scopes:
openid: Authorize access to user details
apk:api_create: Deploy and Undeploy APIs

0 comments on commit 7024a8e

Please sign in to comment.