blob: 2144418fbb847076a38636fb64e7a085fb94bde7 [file] [log] [blame]
Jack Lucas7723ffe2020-02-13 17:19:01 -05001#============LICENSE_START========================================================
2# ================================================================================
3# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
4# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# ============LICENSE_END=========================================================
17
18apiVersion: apps/v1
19kind: Deployment
20metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
21spec:
22 replicas: 1
23 selector: {{- include "common.selectors" . | nindent 4 }}
24 template:
25 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
26 spec:
27 initContainers:
28 - name: {{ include "common.name" . }}-readiness
29 image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
30 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
31 command:
32 - /root/ready.py
33 args:
34 - --container-name
35 - dcaemod-genprocessor-http
36 - --container-name
37 - dcaemod-nifi-registry
38 - --container-name
39 - dcaemod-distributor-api
40 - "-t"
41 - "15"
42 env:
43 - name: NAMESPACE
44 valueFrom:
45 fieldRef:
46 apiVersion: v1
47 fieldPath: metadata.namespace
48 - name: {{ include "common.name" . }}-create-bucket
49 image: {{ .Values.config.curlImage }}
50 args:
51 - -kv
52 - -X
53 - POST
54 - -H
55 - "Content-Type: application/json"
56 - --data-binary
57 - '{"name": "dcaemod-flows"}'
58 - http://dcaemod-nifi-registry:18080/nifi-registry-api/buckets
59
60 containers:
61 - name: {{ include "common.name" . }}
62 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
63 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64 ports: {{ include "common.containerPorts" . | nindent 12 }}
65 {{- if eq .Values.liveness.enabled true }}
66 livenessProbe:
67 tcpSocket:
68 port: {{ .Values.liveness.port }}
69 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
70 periodSeconds: {{ .Values.liveness.periodSeconds }}
71 {{ end }}
72 readinessProbe:
73 httpGet:
74 path: {{ .Values.readiness.path }}
75 port: {{ .Values.readiness.port }}
76 scheme: {{ .Values.readiness.scheme }}
77 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
78 periodSeconds: {{ .Values.readiness.periodSeconds }}
79 resources: {{ include "common.resources" . | nindent 12 }}
80 env:
81 - name: NIFI_DCAE_JARS_INDEX_URL
82 value: {{ .Values.config.nifiJarsIndexURL }}
83 - name: NIFI_DCAE_DISTRIBUTOR_API_URL
84 value: {{ .Values.config.distributorAPIURL }}
85 imagePullSecrets:
86 - name: "{{ include "common.namespace" . }}-docker-registry-key"