-
Notifications
You must be signed in to change notification settings - Fork 152
/
Copy pathonvif.yaml
93 lines (93 loc) · 3.13 KB
/
onvif.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
{{- if .Values.onvif.enabled }}
apiVersion: akri.sh/v0
kind: Configuration
metadata:
name: {{ .Values.onvif.name }}
spec:
protocol:
onvif:
ipAddresses:
action: {{ .Values.onvif.ipAddresses.action }}
{{- if .Values.onvif.ipAddresses.items}}
items:
{{- toYaml .Values.onvif.ipAddresses.items | nindent 8 }}
{{- else }}
items: []
{{- end }}
macAddresses:
action: {{ .Values.onvif.macAddresses.action }}
{{- if .Values.onvif.macAddresses.items}}
items:
{{- toYaml .Values.onvif.macAddresses.items | nindent 8 }}
{{- else }}
items: []
{{- end }}
scopes:
action: {{ .Values.onvif.scopes.action }}
{{- if .Values.onvif.scopes.items}}
items:
{{- toYaml .Values.onvif.scopes.items | nindent 8 }}
{{- else }}
items: []
{{- end }}
discoveryTimeoutSeconds: {{ .Values.onvif.discoveryTimeoutSeconds }}
{{- if .Values.onvif.brokerPod.image.repository }}
# Only add broker pod spec if a broker image is provided
brokerPodSpec:
containers:
- name: {{ .Values.onvif.name }}-broker
image: {{ .Values.onvif.brokerPod.image.repository | quote }}
imagePullPolicy: {{ .Values.onvif.brokerPod.image.pullPolicy }}
{{- if .Values.onvif.brokerPod.env }}
# Optionally set environment variables in the broker pods.
# Add the environment variable keys and values into an env.yaml
# file and apply to your Helm install command with `-f env.yaml`.
# Example env.yaml file:
# # onvif:
# # brokerPod:
# # env:
# # ENV_KEY1: VALUE_1
env:
{{- range $key, $val := .Values.onvif.brokerPod.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
limits:
{{`"{{PLACEHOLDER}}"`}} : "1"
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
# Only add service specs if a broker image was specified and service
# creation was not disabled
{{- if .Values.onvif.brokerPod.image.repository }}
{{- if .Values.onvif.createInstanceServices }}
instanceServiceSpec:
type: {{ .Values.onvif.instanceService.type }}
ports:
- name: {{ .Values.onvif.instanceService.portName }}
port: {{ .Values.onvif.instanceService.port }}
protocol: {{ .Values.onvif.instanceService.protocol }}
targetPort: {{ .Values.onvif.instanceService.targetPort }}
{{- end }}
{{- if .Values.onvif.createConfigurationService }}
configurationServiceSpec:
type: {{ .Values.onvif.configurationService.type }}
ports:
- name: {{ .Values.onvif.configurationService.portName }}
port: {{ .Values.onvif.configurationService.port }}
protocol: {{ .Values.onvif.configurationService.protocol }}
targetPort: {{ .Values.onvif.configurationService.targetPort }}
{{- end }}
{{- end }}
{{- if .Values.onvif.properties }}
properties:
{{- toYaml . | nindent 4 }}
{{- else }}
properties: {}
{{- end }}
capacity: {{ .Values.onvif.capacity }}
{{- end }}