-
Notifications
You must be signed in to change notification settings - Fork 3
/
application.yaml
159 lines (159 loc) · 4.12 KB
/
application.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
148
149
150
151
152
153
154
155
156
157
158
159
apiVersion: v1
kind: Template
metadata:
name: launchpad-builder
annotations:
description: This template creates a Build Configuration using an S2I builder.
tags: instant-app
parameters:
- name: SOURCE_REPOSITORY_URL
description: The source URL for the application
displayName: Source URL
required: true
- name: SOURCE_REPOSITORY_REF
description: The branch name for the application
displayName: Source Branch
value: master
required: true
- name: SOURCE_REPOSITORY_DIR
description: The location within the source repo of the application
displayName: Source Directory
value: .
required: true
- name: RELEASE_VERSION
description: The location within the source repo of the application
displayName: release version
value: 0.0.1
- name: SUFFIX_NAME
description: The location within the source repo of the application
displayName: suffix name
value: ''
objects:
- apiVersion: v1
kind: ImageStream
metadata:
name: golang-http-crud
spec: {}
- apiVersion: v1
kind: ImageStream
metadata:
name: runtime
spec:
tags:
- name: latest
from:
kind: DockerImage
name: 'centos/go-toolset-7-centos7:latest'
- apiVersion: v1
kind: BuildConfig
metadata:
name: golang-http-crud
spec:
output:
to:
kind: ImageStreamTag
name: 'golang-http-crud:${RELEASE_VERSION}'
postCommit: {}
resources: {}
source:
git:
uri: '${SOURCE_REPOSITORY_URL}'
ref: '${SOURCE_REPOSITORY_REF}'
type: Git
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
name: 'runtime:latest'
status:
lastVersion: 0
- apiVersion: v1
kind: Service
spec:
ports:
- protocol: TCP
port: 8080
targetPort: 8080
type: ClusterIP
selector:
project: golang-http-crud
metadata:
name: golang-http-crud
labels:
expose: 'true'
project: golang-http-crud
version: '${RELEASE_VERSION}'
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: golang-http-crud
labels:
app: golang-http-crud
project: golang-http-crud
version: '${RELEASE_VERSION}'
spec:
template:
spec:
containers:
- env:
readinessProbe:
httpGet:
path: /api/fruits
port: 8080
scheme: HTTP
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
httpGet:
path: /api/fruits
port: 8080
scheme: HTTP
failureThreshold: 2
initialDelaySeconds: 60
periodSeconds: 3
successThreshold: 1
timeoutSeconds: 1
image: 'golang-http-crud:${RELEASE_VERSION}'
name: golang-http-crud
securityContext:
privileged: false
ports:
- containerPort: 8080
name: http
protocol: TCP
metadata:
labels:
app: golang-http-crud
project: golang-http-crud
version: '${RELEASE_VERSION}'
replicas: 1
selector:
app: golang-http-crud
project: golang-http-crud
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- golang-http-crud
from:
kind: ImageStreamTag
name: 'golang-http-crud:${RELEASE_VERSION}'
- apiVersion: v1
kind: Route
spec:
to:
kind: Service
name: golang-http-crud
port:
targetPort: 8080
metadata:
name: golang-http-crud
labels:
project: golang-http-crud
version: '${RELEASE_VERSION}'