-
Notifications
You must be signed in to change notification settings - Fork 130
Expand file tree
/
Copy pathdeployment.yml
More file actions
137 lines (136 loc) · 2.94 KB
/
deployment.yml
File metadata and controls
137 lines (136 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
### SERVICE INSTANCE CONFIGURATION ###
# Xsuaa instance
apiVersion: services.cloud.sap.com/v1
kind: ServiceInstance
metadata:
name: xsuaa
spec:
serviceOfferingName: xsuaa
servicePlanName: application
parameters:
xsappname: xsuaa-java-security
tenant-mode: dedicated
scopes:
- name: "$XSAPPNAME.Read"
description: "Read Permissions."
role-templates:
- name: Viewer
description: View Data
scope-references:
- "$XSAPPNAME.Read"
role-collections:
- name: JAVA_SECURITY_SAMPLE_Viewer
description: Viewer (read)
role-template-references:
- "$XSAPPNAME.Viewer"
---
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
name: xsuaa-service-binding
spec:
serviceInstanceName: xsuaa
---
# Xsuaa broker instance
apiVersion: services.cloud.sap.com/v1
kind: ServiceInstance
metadata:
name: xsuaa-broker
spec:
serviceOfferingName: xsuaa
servicePlanName: broker
parameters:
xsappname: xsuaa-broker
tenant-mode: dedicated
---
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
name: xsuaa-broker-binding
spec:
serviceInstanceName: xsuaa-broker
---
### APPLICATION CONFIGURATION ###
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: java-security-usage
name: java-security-usage
spec:
replicas: 1
selector:
matchLabels:
app: java-security-usage
template:
metadata:
labels:
app: java-security-usage
spec:
imagePullSecrets:
- name: sap-repo-registry
containers:
- image: <YOUR IMAGE REPOSITORY>
env:
- name: SERVICE_BINDING_ROOT
value: "/bindings"
imagePullPolicy: Always
name: java-security-usage
ports:
- name: http
containerPort: 8080
volumeMounts:
- name: xsuaa
mountPath: "/bindings/xsuaa"
readOnly: true
- name: xsuaa-broker
mountPath: "/bindings/xsuaa-broker"
readOnly: true
volumes:
- name: xsuaa
secret:
secretName: xsuaa-service-binding
- name: xsuaa-broker
secret:
secretName: xsuaa-broker-binding
---
apiVersion: v1
kind: Service
metadata:
labels:
app: java-security-usage
name: java-security-usage
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app: java-security-usage
---
apiVersion: gateway.kyma-project.io/v1beta1
kind: APIRule
metadata:
name: java-security-api
labels:
app: java-security-usage
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
host: java-security-api
rules:
- accessStrategies:
- config: {}
handler: allow
methods:
- GET
- POST
- PUT
- PATCH
- DELETE
- HEAD
path: /.*
service:
name: java-security-usage
port: 80