forked from 3scale-demos/apicast-example-policy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenshift.yml
99 lines (93 loc) · 2.2 KB
/
openshift.yml
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
apiVersion: v1
kind: Template
metadata:
name: "apicast-example-policy"
message: "APIcast Example Policy"
objects:
- apiVersion: v1
kind: ImageStream
metadata:
annotations:
labels:
app: apicast-custom-policy
name: apicast-policy
- apiVersion: v1
kind: ImageStream
metadata:
annotations:
labels:
app: apicast-custom-policy
name: amp-apicast-custom-policy
- apiVersion: v1
kind: BuildConfig
metadata:
annotations:
labels:
app: apicast-custom-policy
name: apicast-example-policy
spec:
output:
to:
kind: ImageStreamTag
name: apicast-policy:example
source:
git:
uri: https://github.com/mganisin/apicast-example-policy
ref: 'master'
type: Git
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
name: 'amp-apicast:${AMP_RELEASE}'
- apiVersion: v1
kind: BuildConfig
metadata:
annotations:
labels:
app: apicast-custom-policy
name: apicast-custom-policies
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: 'amp-apicast-custom-policy:latest'
postCommit:
args:
- '--test'
- '--lazy'
command:
- bin/apicast
resources: {}
runPolicy: Serial
source:
images:
- from:
kind: ImageStreamTag
name: 'apicast-policy:example'
paths:
# copy policy source code into the new image
- destinationDir: policies
sourcePath: /opt/app-root/policies/example
# copy also installed dependencies to the policy folder, so they are vendored
# - destinationDir: policies/example/0.1/resty/
# sourcePath: /opt/app-root/src/lua_modules/share/lua/5.1/resty/iputils.lua
type: Dockerfile
dockerfile: |
FROM scratch
COPY . src
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: 'amp-apicast:${AMP_RELEASE}'
type: Docker
triggers:
- type: ConfigChange
- type: ImageChange
parameters:
- name: AMP_RELEASE
required: true
description: AMP Version (eg. 2.2.0-GA)