-
Notifications
You must be signed in to change notification settings - Fork 4
/
openshift-gitea-template.yaml
171 lines (171 loc) · 4.16 KB
/
openshift-gitea-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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
kind: Template
apiVersion: v1
labels:
version: "0.1"
group: infrastructure
metadata:
annotations:
description: The Gitea git server (https://gitea.io/)
tags: gitea,git,instant-app
version: "0.1"
name: gitea
objects:
- kind: ServiceAccount
apiVersion: v1
metadata:
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
- kind: ImageStream
apiVersion: v1
metadata:
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
tags:
- name: ${DOCKER_IMAGE_VERSION}
from:
kind: DockerImage
name: ${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_VERSION}
- kind: DeploymentConfig
apiVersion: v1
metadata:
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
replicas: 1
selector:
app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME}
strategy:
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Recreate
template:
metadata:
labels:
app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME}
spec:
serviceAccountName: ${APPLICATION_NAME}
containers:
- image: ' '
imagePullPolicy: IfNotPresent
name: ${APPLICATION_NAME}
ports:
- containerPort: 2222
protocol: TCP
- containerPort: 3000
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
volumeMounts:
- mountPath: /data
name: gitea-data
livenessProbe:
httpGet:
path: /
port: 3000
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-data
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}
from:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:${DOCKER_IMAGE_VERSION}
lastTriggeredImage: ""
type: ImageChange
- kind: Service
apiVersion: v1
metadata:
annotations:
description: The Gitea server's http port
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
ports:
- name: 3000-http
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME}
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- kind: Route
apiVersion: v1
metadata:
annotations:
description: Route for application's http service.
name: ${APPLICATION_NAME}
labels:
app: ${APPLICATION_NAME}
spec:
host: ${HOSTNAME}
to:
kind: Service
name: ${APPLICATION_NAME}
weight: 100
port:
targetPort: 3000-http
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
- kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: gitea-data
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: ${GITEA_DATA_VOLUME_CAPACITY}
parameters:
- description: The name for the application.
name: APPLICATION_NAME
required: true
value: gitea
- description: Docker image name
name: DOCKER_IMAGE_NAME
required: true
value: willemvd/gitea-unprivileged-docker
- description: Docker image version
name: DOCKER_IMAGE_VERSION
required: true
value: latest
- description: 'Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>'
name: HOSTNAME
value: ""
- description: Volume space available for Gitea repository data, e.g. 512Mi, 2Gi
name: GITEA_DATA_VOLUME_CAPACITY
required: true
value: 2Gi