forked from rromannissen/nifi-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nifi-flow.yml
174 lines (174 loc) · 4.52 KB
/
nifi-flow.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
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
kind: Template
apiVersion: v1
metadata:
name: nifi-flow
annotations:
description: Template for Apache NiFi flows
tags: app,nifi
iconClass: icon-apache
objects:
- kind: Service
apiVersion: v1
spec:
ports:
- name: web
port: 8080
targetPort: 8080
selector:
deploymentConfig: ${APPLICATION_NAME}
metadata:
name: ${APPLICATION_NAME}
labels:
app: ${APPLICATION_NAME}
annotations:
description: The web server's http port.
- kind: Route
apiVersion: v1
id: "${APPLICATION_NAME}-http"
metadata:
name: ${APPLICATION_NAME}
labels:
app: ${APPLICATION_NAME}
annotations:
description: Route for application's http service.
spec:
host: "${APPLICATION_DOMAIN}"
to:
name: ${APPLICATION_NAME}
- kind: ImageStream
apiVersion: v1
metadata:
name: ${APPLICATION_NAME}
labels:
app: ${APPLICATION_NAME}
- apiVersion: v1
kind: BuildConfig
metadata:
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
nodeSelector:
output:
to:
kind: ImageStreamTag
name: "${APPLICATION_NAME}:latest"
postCommit: {}
resources: {}
runPolicy: Serial
source:
binary: {}
type: Binary
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: ${NIFI_BASE_IMAGE}
namespace: ${IMAGE_STREAM_NAMESPACE}
triggers: {}
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: ${APPLICATION_NAME}
labels:
app: ${APPLICATION_NAME}
spec:
strategy:
type: Recreate
triggers:
- type: ImageChange
imageChangeParams:
automatic: false
containerNames:
- ${APPLICATION_NAME}
from:
kind: ImageStream
name: ${APPLICATION_NAME}:${TARGET_ENVIRONMENT}
- type: ConfigChange
replicas: 1
selector:
deploymentConfig: ${APPLICATION_NAME}
template:
metadata:
name: ${APPLICATION_NAME}
labels:
deploymentConfig: ${APPLICATION_NAME}
app: ${APPLICATION_NAME}
spec:
terminationGracePeriodSeconds: 60
containers:
- name: ${APPLICATION_NAME}
image: ${APPLICATION_NAME}:${TARGET_ENVIRONMENT}
imagePullPolicy: Always
ports:
- name: http
containerPort: 8080
protocol: TCP
env:
- name: "NIFI_JAVA_XMS"
value: ${NIFI_JAVA_XMS}
- name: "NIFI_JAVA_XMX"
value: ${NIFI_JAVA_XMX}
- name: "NIFI_TIMEZONE"
value: ${NIFI_TIMEZONE}
- name: "ENVIRONMENT"
value: ${TARGET_ENVIRONMENT}
- name: "HOME"
value: /tmp
resources:
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
volumeMounts: {}
volumes: {}
parameters:
- name: APPLICATION_NAME
description: "The name for the application."
required: true
- name: APPLICATION_DOMAIN
description: "Custom hostname for service routes."
- name: TARGET_ENVIRONMENT
description: "Environment in which the application is to be deployed (DEV, SIT, UAT, PRO)."
value: "dev"
required: true
- name: NIFI_BASE_IMAGE
description: "Base image to use"
value: "nifi-ocp:latest"
required: true
- name: IMAGE_STREAM_NAMESPACE
description: "Namespace in which the ImageStreams are installed."
value: "openshift"
required: true
- name: CPU_REQUEST
description: "Minimum amount of CPU that the container may consume. Unit (m) has to be included."
value: "600m"
required: true
- name: CPU_LIMIT
description: "Maximum amount of CPU that the container may consume. Unit (m) has to be included."
value: "1000m"
required: true
- name: MEMORY_REQUEST
description: "Minimum amount of memory that the container may consume. Unit (Mi, Gi) has to be included."
value: "900Mi"
required: true
- name: MEMORY_LIMIT
description: "Maximum amount of memory that the container may consume. Unit (Mi, Gi) has to be included."
value: "1300Mi"
required: true
- name: NIFI_JAVA_XMS
description: "Startup heap to be requested by the JVM."
value: "-Xms512m"
required: true
- name: NIFI_JAVA_XMX
description: "Maximum heap to be requested by the JVM."
value: "-Xms512m"
required: true
- name: NIFI_TIMEZONE
description: "Timezone to be used by the JVM."
value: "-Duser.timezone=Europe/Berlin"
required: true
labels:
template: nifi-flow