-
Notifications
You must be signed in to change notification settings - Fork 15
/
deploy-no-console-template.yaml
147 lines (140 loc) · 3.38 KB
/
deploy-no-console-template.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
146
147
---
apiVersion: template.openshift.io/v1
kind: Template
message: |
Created ${NAME} Deployment, Service, and Route
metadata:
annotations:
openshift.io/display-name: Bookbag
tags: gpte
template.openshift.io/bindable: "false"
name: bookbag
parameters:
- name: NAME
required: true
value: bookbag
- name: IMAGE_STREAM_NAME
required: true
value: bookbag
- name: IMAGE_STREAM_NAMESPACE
- name: IMAGE
value: set-by-trigger
- name: WORKSHOP_VARS
required: true
value: '{}'
- name: AUTH_USERNAME
required: true
value: '*'
- name: AUTH_PASSWORD
value: ''
- name: ROLE
description: >-
Role to assign to bookbag service account. Default, 'basic-user'.
Ex: admin, edit, view
required: true
value: basic-user
objects:
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
labels:
app: ${NAME}
name: ${NAME}
spec:
replicas: 1
selector:
name: ${NAME}
strategy:
type: Recreate
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- terminal
from:
kind: ImageStreamTag
name: ${IMAGE_STREAM_NAME}:latest
namespace: ${IMAGE_STREAM_NAMESPACE}
template:
metadata:
labels:
app: ${NAME}
name: ${NAME}
spec:
dnsPolicy: ClusterFirst
restartPolicy: Always
serviceAccountName: ${NAME}
containers:
- name: terminal
env:
- name: APPLICATION_NAME
value: ${NAME}
- name: AUTH_USERNAME
value: ${AUTH_USERNAME}
- name: AUTH_PASSWORD
value: ${AUTH_PASSWORD}
- name: CLUSTER_SUBDOMAIN
- name: OAUTH_SERVICE_ACCOUNT
value: ${NAME}
- name: DOWNLOAD_URL
- name: WORKSHOP_FILE
- name: OC_VERSION
- name: ODO_VERSION
- name: KUBECTL_VERSION
- name: WORKSHOP_VARS
value: ${WORKSHOP_VARS}
image: ${IMAGE}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 10080
protocol: TCP
resources: {}
- apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: ${NAME}
name: ${NAME}
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ${NAME}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ${ROLE}
subjects:
- kind: ServiceAccount
name: ${NAME}
- apiVersion: v1
kind: Service
metadata:
labels:
app: ${NAME}
name: ${NAME}
spec:
ports:
- name: 10080-tcp
port: 10080
protocol: TCP
targetPort: 10080
selector:
name: ${NAME}
type: ClusterIP
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: ${NAME}
name: ${NAME}
spec:
port:
targetPort: 10080-tcp
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
to:
kind: Service
name: ${NAME}