-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfrontend-backend-template-ocp4-service-mesh.yaml
145 lines (145 loc) · 3.53 KB
/
frontend-backend-template-ocp4-service-mesh.yaml
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
138
139
140
141
142
143
144
145
apiVersion: template.openshift.io/v1
kind: Template
labels:
template: frontend-backend
metadata:
annotations:
description: Template for deploying Apache and MariaDB on RHEL
iconClass: icon-mysql-database
tags: quickstart,oracle
name: frontend-backend
objects:
- apiVersion: v1
kind: Service
metadata:
annotations:
description: Exposes and load balances the application pods
name: ${NAME}-frontend
spec:
ports:
- name: web
port: 8080
targetPort: 8080
selector:
name: ${NAME}-frontend
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: Route
metadata:
name: ${NAME}-frontend
spec:
host: ${APPLICATION_DOMAIN}
port:
targetPort: 8080
to:
kind: Service
name: ${NAME}-frontend
- apiVersion: v1
kind: ImageStream
metadata:
annotations:
description: Keeps track of changes in the application image
name: ${NAME}-frontend
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
description: Defines how to deploy the application server
sidecar.istio.io/inject: "true"
name: ${NAME}-frontend
spec:
replicas: 1
selector:
name: ${NAME}-frontend
strategy:
type: Rolling
template:
metadata:
labels:
name: ${NAME}-frontend
name: ${NAME}-frontend
spec:
containers:
- env:
- name: SERVICE_NAME
value: ${SERVICE_NAME}-frontend
image: image-registry.openshift-image-registry.svc:5000/openshift/frontend
imagePullPolicy: IfNotPresent
name: frontend
ports:
- containerPort: 8080
name: web
resources:
limits:
memory: ${MEMORY_LIMIT}
- apiVersion: v1
kind: Service
metadata:
annotations:
description: Exposes and load balances the application pods
name: backend
spec:
ports:
- name: mysql
port: 3306
targetPort: 3306
selector:
name: ${NAME}-backend
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: ImageStream
metadata:
annotations:
description: Keeps track of changes in the application image
name: ${NAME}-backend
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
description: Defines how to deploy the application server
sidecar.istio.io/inject: "true"
name: ${NAME}-backend
spec:
replicas: 1
selector:
name: ${NAME}-backend
strategy:
type: Rolling
template:
metadata:
labels:
name: ${NAME}-backend
name: ${NAME}-backend
spec:
containers:
- env:
- name: SERVICE_NAME
value: ${SERVICE_NAME}-backend
image: image-registry.openshift-image-registry.svc:5000/openshift/backend
imagePullPolicy: IfNotPresent
name: backend
ports:
- containerPort: 3306
name: web
resources:
limits:
memory: ${MEMORY_LIMIT}
parameters:
- description: The name assigned to all of the frontend objects defined in this template.
displayName: Name
name: NAME
value: aci
- description: Maximum amount of memory the container can use.
displayName: Memory Limit
name: MEMORY_LIMIT
value: 1024Mi
- description: The exposed hostname that will route to the Application service, if
left blank a value will be defaulted.
displayName: Application Hostname
name: APPLICATION_DOMAIN