This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
tutorial-web-app.yml
150 lines (150 loc) · 5.04 KB
/
tutorial-web-app.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
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
146
147
148
149
150
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: tutorial-web-app
parameters:
- name: OPENSHIFT_VERSION
description: The version of OpenShift that it will run in
displayName: OpenShift Version
value: '3'
required: true
- name: OPENSHIFT_API
description: The OpenShift clusters API URL (Required in OpenShift 4)
displayName: OpenShift API Host
value: openshift.default.svc
required: false
- name: OPENSHIFT_OAUTHCLIENT_ID
description: The OAuthClient id in OpenShift to use for auth
displayName: OAuthClient ID
value: tutorial-web-app
required: true
- name: OPENSHIFT_HOST
description: The OpenShift master/api host e.g. openshift.example.com:8443. If blank, mock data (and mock service URL params) will be used.
displayName: OpenShift Host
required: false
- name: OPENSHIFT_OAUTH_HOST
description: The OpenShift OAuth host. OpenShift 4 example - https://oauth-openshift.apps.openshift.example.com. On OpenShift it's the same as OPENSHIFT_HOST. If blank, mock data (and mock service URL params) will be used.
displayName: OpenShift Host
required: false
- name: FUSE_URL
description: Mock URL for Fuse. Only used if OPENSHIFT_HOST is empty
required: false
- name: LAUNCHER_URL
description: Mock URL for Launcher. Only used if OPENSHIFT_HOST is empty
required: false
- name: CHE_URL
description: Mock URL for Che. Only used if OPENSHIFT_HOST is empty
required: false
- name: ENMASSE_URL
description: Mock URL for EnMasse. Only used if OPENSHIFT_HOST is empty
required: false
- name: SSO_ROUTE
description: Openshift SSO URL
required: false
- name: WALKTHROUGH_LOCATIONS
description: A comma separated list of git repositories or paths to walkthrough directories
value: https://github.com/integr8ly/tutorial-web-app-walkthroughs.git#v1.12.3
required: true
- name: DATABASE_LOCATION
description: The location of the user walkthroughs database in the filesystem
value: /opt/user-walkthroughs
required: true
- name: INSTALLED_SERVICES
description: Object which contains information on the services installed by Integreatly. Only used for OpenShift V4
required: false
- name: INSTALLATION_TYPE
description: Type of cluster
required: false
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: tutorial-web-app
name: tutorial-web-app
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
app: tutorial-web-app
strategy:
activeDeadlineSeconds: 21600
recreateParams:
timeoutSeconds: 600
resources: {}
type: Recreate
template:
metadata:
labels:
app: tutorial-web-app
spec:
volumes:
- name: user-walkthroughs
persistentVolumeClaim:
claimName: user-walkthroughs
containers:
- env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPENSHIFT_OAUTHCLIENT_ID
value: ${OPENSHIFT_OAUTHCLIENT_ID}
- name: OPENSHIFT_HOST
value: ${OPENSHIFT_HOST}
- name: OPENSHIFT_VERSION
value: ${OPENSHIFT_VERSION}
- name: OPENSHIFT_API
value: ${OPENSHIFT_API}
- name: OPENSHIFT_OAUTH_HOST
value: ${OPENSHIFT_OAUTH_HOST}
- name: NODE_ENV
value: production
- name: SSO_ROUTE
value: ${SSO_ROUTE}
- name: WALKTHROUGH_LOCATIONS
value: ${WALKTHROUGH_LOCATIONS}
- name: INTEGREATLY_VERSION
value: ${INTEGREATLY_VERSION}
- name: CLUSTER_TYPE
value: ${CLUSTER_TYPE}
- name: DATABASE_LOCATION
value: ${DATABASE_LOCATION}
- name: INSTALLED_SERVICES
value: ${INSTALLED_SERVICES}
- name: INSTALLATION_TYPE
value: ${INSTALLATION_TYPE}
image: quay.io/integreatly/tutorial-web-app:2.28.1
imagePullPolicy: Always
name: tutorial-web-app
ports:
- containerPort: 5001
name: http
protocol: TCP
volumeMounts:
- mountPath: ${DATABASE_LOCATION}
name: user-walkthroughs
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
labels:
app: tutorial-web-app
name: tutorial-web-app
spec:
ports:
- name: http
port: 5001
selector:
app: tutorial-web-app
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: user-walkthroughs
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: "100Mi"