-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathdeployment.yml
113 lines (113 loc) · 2.66 KB
/
deployment.yml
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
---
### SERVICE INSTANCE CONFIGURATION ###
# Xsuaa instance
apiVersion: services.cloud.sap.com/v1
kind: ServiceInstance
metadata:
name: xsuaa-basic
spec:
serviceOfferingName: xsuaa
servicePlanName: application
parameters:
xsappname: spring-security-basic-auth
tenant-mode: dedicated
oauth2-configuration:
credential-types:
- x509
scopes:
- name: "$XSAPPNAME.Read"
description: Scope for spring-security-basic-auth sample application
role-templates:
- name: Viewer
description: Role for spring-security-basic-auth sample application
scope-references:
- "$XSAPPNAME.Read"
role-collections:
- name: "Sample Viewer (spring-security-basic-auth)"
description: Role collection for spring-security-basic-auth sample application
role-template-references:
- "$XSAPPNAME.Viewer"
---
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
name: xsuaa-basic-binding
spec:
serviceInstanceName: xsuaa-basic
---
### APPLICATION CONFIGURATION ###
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: spring-security-basic-auth
name: spring-security-basic-auth
spec:
replicas: 1
selector:
matchLabels:
app: spring-security-basic-auth
template:
metadata:
labels:
app: spring-security-basic-auth
kyma-grafana: enabled
spec:
containers:
- image: <YOUR IMAGE TAG>
env:
- name: SERVICE_BINDING_ROOT
value: "/bindings"
imagePullPolicy: Always
name: spring-security-basic-auth
ports:
- name: http
containerPort: 8080
volumeMounts:
- name: xsuaa-basic
mountPath: "/bindings/xsuaa-basic"
readOnly: true
volumes:
- name: xsuaa-basic
secret:
secretName: xsuaa-basic-binding
---
apiVersion: v1
kind: Service
metadata:
labels:
app: spring-security-basic-auth
name: spring-security-basic-auth
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app: spring-security-basic-auth
---
apiVersion: gateway.kyma-project.io/v1beta1
kind: APIRule
metadata:
name: spring-security-basic-auth-api
labels:
app: spring-security-basic-auth
spec:
gateway: kyma-gateway.kyma-system.svc.cluster.local
host: spring-security-basic-auth-api
rules:
- accessStrategies:
- config: {}
handler: allow
methods:
- GET
- POST
- PUT
- PATCH
- DELETE
- HEAD
path: /.*
service:
name: spring-security-basic-auth
port: 80