Skip to content

Commit

Permalink
Added all required files
Browse files Browse the repository at this point in the history
  • Loading branch information
TN340BK authored and TN340BK committed Jul 14, 2022
1 parent 3a94a5a commit bed5045
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 3scale/base/backends/customer-order.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: capabilities.3scale.net/v1beta1
kind: Backend
metadata:
name: customer-order
spec:
name: "customer-order"
systemName: "customer-order"
mappingRules:
- httpMethod: POST
pattern: "/customers/{id}/orders/{orderid}"
increment: 1
metricMethodRef: hits
- httpMethod: GET
pattern: "/customers/{id}/orders/{orderid}"
increment: 1
metricMethodRef: hits
- httpMethod: PUT
pattern: "/customers/{id}/orders/{orderid}"
increment: 1
metricMethodRef: hits
7 changes: 7 additions & 0 deletions 3scale/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
metadata:
name: 3scale
resources:
- products/customer.yaml
- backends/customer-order.yaml
40 changes: 40 additions & 0 deletions 3scale/base/products/customer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: capabilities.3scale.net/v1beta1
kind: Product
metadata:
name: customer
spec:
name: "customer"
deployment:
apicastSelfManaged:
stagingPublicBaseURL: "https://apis-3scale-base-staging.apps.cluster-2q76v.2q76v.sandbox955.opentlc.com:443"
productionPublicBaseURL: "https://apis-3scale-base.apps.cluster-2q76v.2q76v.sandbox955.opentlc.com:443"
authentication:
oidc:
issuerType: "keycloak"
authenticationFlow:
standardFlowEnabled: false
implicitFlowEnabled: false
serviceAccountsEnabled: true
directAccessGrantsEnabled: false
jwtClaimWithClientID: "azp"
jwtClaimWithClientIDType: "plain"
applicationPlans:
portal:
name: "customer"
published: true
appsRequireApproval: true
policies:
- name: apicast
version: builtin
enabled: true
configuration: {}
- name: headers
version: builtin
enabled: true
configuration:
request:
- value_type": "plain"
op: "set"
header": "Authorization"
value: "Basic dXNlcjpwYXNzd29yZA==
8 changes: 8 additions & 0 deletions 3scale/overlays/dev/backends/customer-order.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: capabilities.3scale.net/v1beta1
kind: Backend
metadata:
name: customer-order
spec:
name: "customer-order"
systemName: "customer-order"
privateBaseURL: "http://customer-order.dev.svc.cluster.local:808080
9 changes: 9 additions & 0 deletions 3scale/overlays/dev/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
metadata:
name: 3scale
resources:
- ../../base
patchesStrategicMerge:
- products/customer.yaml
- backends/customer-order.yaml
15 changes: 15 additions & 0 deletions 3scale/overlays/dev/products/customer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: capabilities.3scale.net/v1beta1
kind: Product
metadata:
name: customer
spec:
deployment:
apicastSelfManaged:
stagingPublicBaseURL: "https://apis-3scale-dev-staging.apps.cluster-2q76v.2q76v.sandbox955.opentlc.com:443"
productionPublicBaseURL: "https://apis-3scale-dev.apps.cluster-2q76v.2q76v.sandbox955.opentlc.com:443"
authentication:
oidc:
issuerEndpoint: "https://zync-sso:b361ca5f-1646-4377-90dc-3f77dca10f40@sso-dev.apps.cluster-2q76v.2q76v.sandbox955.opentlc.com/auth/realms/dev"
backendUsages:
gav:
path: /customer/order
16 changes: 16 additions & 0 deletions gitops/Application_threescale-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: threescale-dev
spec:
destination:
namespace: 3scale-dev
server: https://kubernetes.default.svc
project: default
source:
path: 3scale/overlays/dev
repoURL: https://gitlab.consulting.redhat.com/jugar_zone/3scale-gitops.git
targetRevision: HEAD
syncPolicy:
syncOptions:
- ApplyOutOfSyncOnly=true
13 changes: 13 additions & 0 deletions rbac/ClusterRole_gitops-threescale-access.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: gitops-threescale-access
labels:
app.kubernetes.io/part-of: openshift-gitops
rules:
- apiGroups: [""]
resources: ["pods", "pods/log"]
verbs: ["get","list", "watch"]
- apiGroups: ["capabilities.3scale.net"]
resources: ["activedocs", "backends", "custompolicydefinitions","developeraccounts", "developerusers", "openapis", "products"]
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]

0 comments on commit bed5045

Please sign in to comment.