-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopcua.yaml
96 lines (96 loc) · 3.11 KB
/
opcua.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
96
{{- if .Values.opcua.enabled }}
apiVersion: {{ printf "%s/%s" .Values.crds.group .Values.crds.version }}
kind: Configuration
metadata:
name: {{ .Values.opcua.name }}
spec:
discoveryHandler:
name: opcua
discoveryDetails: |+
opcuaDiscoveryMethod:
standard:
discoveryUrls:
{{- toYaml .Values.opcua.discoveryUrls | nindent 10 }}
applicationNames:
action: {{ .Values.opcua.applicationNames.action }}
{{- if .Values.opcua.applicationNames.items}}
items:
{{- toYaml .Values.opcua.applicationNames.items | nindent 8 }}
{{- else }}
items: []
{{- end }}
{{- if .Values.opcua.brokerPod.image.repository }}
{{- /* Only add broker pod spec if a broker image is provided */}}
brokerPodSpec:
containers:
- name: {{ .Values.opcua.name }}-broker
image: {{ printf "%s:%s" .Values.opcua.brokerPod.image.repository .Values.opcua.brokerPod.image.tag | quote }}
{{- with .Values.opcua.brokerPod.image.pullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- if .Values.opcua.brokerPod.env }}
env:
{{- range $key, $val := .Values.opcua.brokerPod.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- end }}
resources:
limits:
{{`"{{PLACEHOLDER}}"`}} : "1"
{{- if .Values.opcua.mountCertificates}}
volumeMounts:
- name: credentials
mountPath: "/etc/opcua-certs/client-pki"
readOnly: false
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.opcua.mountCertificates }}
volumes:
- name: credentials
secret:
secretName: opcua-broker-credentials
items:
- key: client_certificate
path: own/certs/AkriBroker.der
- key: client_key
path: own/private/AkriBroker.pfx
- key: ca_certificate
path: trusted/certs/SomeCA.der
- key: ca_crl
path: trusted/crl/SomeCA.crl
{{- end }}
{{- end }}
{{- /* Only add service specs if a broker image was specified and service
creation was not disabled */}}
{{- if .Values.opcua.brokerPod.image.repository }}
{{- if .Values.opcua.createInstanceServices }}
instanceServiceSpec:
type: {{ .Values.opcua.instanceService.type }}
ports:
- name: grpc
port: {{ .Values.opcua.instanceService.port }}
protocol: {{ .Values.opcua.instanceService.protocol }}
targetPort: {{ .Values.opcua.instanceService.targetPort }}
{{- end }}
{{- if .Values.opcua.createConfigurationService }}
configurationServiceSpec:
type: {{ .Values.opcua.configurationService.type }}
ports:
- name: grpc
port: {{ .Values.opcua.configurationService.port }}
protocol: {{ .Values.opcua.configurationService.protocol }}
targetPort: {{ .Values.opcua.configurationService.targetPort }}
{{- end }}
{{- end }}
{{- if .Values.opcua.properties }}
properties:
{{- toYaml . | nindent 4 }}
{{- else }}
properties: {}
{{- end }}
capacity: {{ .Values.opcua.capacity }}
{{- end }}