-
Notifications
You must be signed in to change notification settings - Fork 0
/
tanger.yaml
178 lines (170 loc) · 4.07 KB
/
tanger.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
apiVersion: template.openshift.io/v1
kind: Template
labels:
app: tanger-ephemeral
template: tanger-ephemeral-template
message: Ephemeral Tang Instance
metadata:
annotations:
openshift.io/display-name: Tanger (Ephemeral)
tags: tanger
name: tanger-ephemeral
objects:
- apiVersion: v1
kind: Route
metadata:
annotations:
haproxy.router.openshift.io/timeout: 4m
template.openshift.io/expose-uri: http://{.spec.host}{.spec.path}
name: ${TANGER_SERVICE_NAME}
spec:
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
to:
kind: Service
name: ${TANGER_SERVICE_NAME}
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
template.alpha.openshift.io/wait-for-ready: "true"
name: ${TANGER_SERVICE_NAME}
spec:
replicas: 1
selector:
name: ${TANGER_SERVICE_NAME}
strategy:
type: Recreate
template:
metadata:
labels:
name: ${TANGER_SERVICE_NAME}
spec:
containers:
- capabilities: {}
env:
- name: PORT
value: "8180"
image: tanger:latest
imagePullPolicy: IfNotPresent
name: tanger
resources:
limits:
memory: "2Gi"
cpu: "1000m"
securityContext:
capabilities: {}
privileged: false
volumeMounts:
- mountPath: /var/db/tang
name: db-data
- mountPath: /var/cache/tang
name: cache-data
dnsPolicy: ClusterFirst
restartPolicy: Always
volumes:
- name: db-data
emptyDir:
medium: ""
- name: cache-data
emptyDir:
medium: ""
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
annotations:
service.alpha.openshift.io/dependencies: '[{"name": "${TANGER_SERVICE_NAME}", "namespace": "", "kind": "Service"}]'
service.openshift.io/infrastructure: "true"
name: ${TANGER_SERVICE_NAME}
spec:
ports:
- name: web
nodePort: 0
port: 80
protocol: TCP
targetPort: 8180
selector:
name: ${TANGER_SERVICE_NAME}
sessionAffinity: None
type: ClusterIP
# Import tanger's image
- apiVersion: "image.openshift.io/v1"
kind: ImageStream
metadata:
name: fedora-min
label:
app: tanger
template: tanger-template
spec:
failedBuildHistoryLimit: 1
successfulBuildsHistoryLimit: 1
lookupPolicy:
local: true
tags:
- name: "32"
from:
kind: DockerImage
name: registry.fedoraproject.org/fedora-minimal:32
importPolicy:
scheduled: true
# Import tanger's image
- apiVersion: "image.openshift.io/v1"
kind: ImageStream
metadata:
name: tanger
label:
app: tanger
template: tanger-template
spec:
failedBuildHistoryLimit: 1
successfulBuildsHistoryLimit: 1
lookupPolicy:
local: true
tags:
- name: import
from:
kind: DockerImage
name: quay.io/behoward/tanger
importPolicy:
scheduled: true
# Build Tanger locally
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
labels:
app: tanger-ephemeral
name: tanger
spec:
lookupPolicy:
local: true
output:
to:
kind: ImageStreamTag
name: tanger:latest
postCommit: {}
runPolicy: Serial
source:
git:
ref: "master"
uri: "https://github.com/darkmuggle/tanger"
type: Git
strategy:
dockerStrategy:
noCache: true
from:
kind: ImageStreamTag
name: fedora-min:32
type: Docker
dockerfilePath: Dockerfile
parameters:
- description: The name of the OpenShift Service exposed for the tanger container.
displayName: tanger Service Name
name: TANGER_SERVICE_NAME
value: tanger
- description: Name of the ImageStreamTag to be used for the tanger image.
displayName: tanger ImageStreamTag
name: TANGER_IMAGE_STREAM_TAG
value: tanger:latest