-
Notifications
You must be signed in to change notification settings - Fork 146
/
onvif-configuration.yaml
95 lines (95 loc) · 4.12 KB
/
onvif-configuration.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
{{- if .Values.onvif.configuration.enabled }}
apiVersion: {{ printf "%s/%s" .Values.crds.group .Values.crds.version }}
kind: Configuration
metadata:
name: {{ .Values.onvif.configuration.name }}
spec:
discoveryHandler:
name: onvif
discoveryDetails: |+
ipAddresses:
action: {{ .Values.onvif.configuration.discoveryDetails.ipAddresses.action }}
{{- if .Values.onvif.configuration.discoveryDetails.ipAddresses.items}}
items:
{{- toYaml .Values.onvif.configuration.discoveryDetails.ipAddresses.items | nindent 8 }}
{{- else }}
items: []
{{- end }}
macAddresses:
action: {{ .Values.onvif.configuration.discoveryDetails.macAddresses.action }}
{{- if .Values.onvif.configuration.discoveryDetails.macAddresses.items}}
items:
{{- toYaml .Values.onvif.configuration.discoveryDetails.macAddresses.items | nindent 8 }}
{{- else }}
items: []
{{- end }}
scopes:
action: {{ .Values.onvif.configuration.discoveryDetails.scopes.action }}
{{- if .Values.onvif.configuration.discoveryDetails.scopes.items}}
items:
{{- toYaml .Values.onvif.configuration.discoveryDetails.scopes.items | nindent 8 }}
{{- else }}
items: []
{{- end }}
discoveryTimeoutSeconds: {{ .Values.onvif.configuration.discoveryDetails.discoveryTimeoutSeconds }}
{{- if .Values.onvif.configuration.brokerPod.image.repository }}
{{- /* Only add broker pod spec if a broker image is provided */}}
brokerPodSpec:
containers:
- name: {{ .Values.onvif.configuration.name }}-broker
image: {{ printf "%s:%s" .Values.onvif.configuration.brokerPod.image.repository .Values.onvif.configuration.brokerPod.image.tag | quote }}
{{- with .Values.onvif.configuration.brokerPod.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- if .Values.onvif.configuration.brokerPod.env }}
env:
{{- range $key, $val := .Values.onvif.configuration.brokerPod.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
requests:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.onvif.configuration.brokerPod.resources.memoryRequest }}
cpu: {{ .Values.onvif.configuration.brokerPod.resources.cpuRequest }}
limits:
{{`"{{PLACEHOLDER}}"`}} : "1"
memory: {{ .Values.onvif.configuration.brokerPod.resources.memoryLimit }}
cpu: {{ .Values.onvif.configuration.brokerPod.resources.cpuLimit }}
{{- 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.configuration.brokerPod.image.repository }}
{{- if .Values.onvif.configuration.createInstanceServices }}
instanceServiceSpec:
type: {{ .Values.onvif.configuration.instanceService.type }}
ports:
- name: {{ .Values.onvif.configuration.instanceService.portName }}
port: {{ .Values.onvif.configuration.instanceService.port }}
protocol: {{ .Values.onvif.configuration.instanceService.protocol }}
targetPort: {{ .Values.onvif.configuration.instanceService.targetPort }}
{{- end }}
{{- if .Values.onvif.configuration.createConfigurationService }}
configurationServiceSpec:
type: {{ .Values.onvif.configuration.configurationService.type }}
ports:
- name: {{ .Values.onvif.configuration.configurationService.portName }}
port: {{ .Values.onvif.configuration.configurationService.port }}
protocol: {{ .Values.onvif.configuration.configurationService.protocol }}
targetPort: {{ .Values.onvif.configuration.configurationService.targetPort }}
{{- end }}
{{- end }}
{{- if .Values.onvif.configuration.brokerProperties }}
brokerProperties:
{{- range $key, $val := .Values.onvif.configuration.brokerProperties }}
{{- $key | nindent 4 }}: {{ $val | quote }}
{{- end }}
{{- else }}
brokerProperties: {}
{{- end }}
capacity: {{ .Values.onvif.configuration.capacity }}
{{- end }}