-
Notifications
You must be signed in to change notification settings - Fork 0
/
webhook-proxy-template.yaml
132 lines (131 loc) · 3.8 KB
/
webhook-proxy-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
---
kind: Template
apiVersion: v1
labels:
app: webhook-proxy
template: webhook-proxy-template
metadata:
name: webhook-proxy
annotations:
openshift.io/display-name: webhook proxy
tags: webhook,proxy,webhook-proxy
objects:
- kind: ImageStream
apiVersion: v1
metadata:
labels:
app: ${WEBHOOK_PROXY_NAME}
name: ${WEBHOOK_PROXY_NAME}
- kind: BuildConfig
apiVersion: v1
metadata:
labels:
app: ${WEBHOOK_PROXY_NAME}
name: ${WEBHOOK_PROXY_NAME}
spec:
output:
to:
kind: ImageStreamTag
name: ${WEBHOOK_PROXY_IMAGE_STREAM_TAG}
resources: {}
source:
type: Git
git:
uri: ${REPO_URL}
ref: ${REPO_REF}
strategy:
type: Docker
dockerStrategy:
noCache: true
forcePull: true
triggers:
- type: ConfigChange
successfulBuildsHistoryLimit: 2
failedBuildsHistoryLimit: 2
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: ${WEBHOOK_PROXY_NAME}
spec:
replicas: 1
selector:
name: ${WEBHOOK_PROXY_NAME}
strategy:
type: Recreate
template:
metadata:
labels:
name: ${WEBHOOK_PROXY_NAME}
spec:
containers:
- name: ${WEBHOOK_PROXY_NAME}
image: ${WEBHOOK_PROXY_IMAGE_STREAM_TAG}
imagePullPolicy: IfNotPresent
resources:
limits:
memory: "1Gi"
cpu: "1000m"
requests:
memory: "500Mi"
cpu: "512m"
securityContext:
capabilities: {}
privileged: false
terminationMessagePath: /dev/termination-log
env:
- name: JENKINS_URL
valueFrom:
secretKeyRef:
name: github-jenkins-trigger-url
key: jenkins_url
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: webhook-aws-access-key-id
key: id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: webhook-aws-secret-access-key
key: secret
- name: SQS_QUEUE
valueFrom:
secretKeyRef:
name: webhook-sqs-queue-name
key: queue_name
- name: SQS_REGION
valueFrom:
secretKeyRef:
name: webhook-sqs-queue-region
key: queue_region
dnsPolicy: ClusterFirst
restartPolicy: Always
triggers:
- type: "ConfigChange"
- type: "ImageChange"
imageChangeParams:
automatic: true
containerNames:
- ${WEBHOOK_PROXY_NAME}
from:
kind: "ImageStreamTag"
name: ${WEBHOOK_PROXY_IMAGE_STREAM_TAG}
# global parameters
parameters:
- description: Git repository with Dockerfile and master entrypoint.
displayName: Repository URL
name: REPO_URL
value: https://github.com/virt-s1/webhook-proxy.git
required: true
- description: The git ref or tag to use for customization.
displayName: Git Reference
name: REPO_REF
value: main
- name: WEBHOOK_PROXY_NAME
displayName: webhook proxy APP name
description: The name of the webhook proxy application.
value: webhook-proxy
- name: WEBHOOK_PROXY_IMAGE_STREAM_TAG
displayName: webhook proxy ImageStreamTag
description: Name of the ImageStreamTag to be used for the webhook proxy image.
value: webhook-proxy:latest