From 399e3cf9d339e06571311008567bb31bac82ce44 Mon Sep 17 00:00:00 2001 From: Kyle Morton Date: Tue, 29 Nov 2022 13:02:35 -0600 Subject: [PATCH 1/8] feat: Add support in helm for ds-gpio Signed-off-by: Kyle Morton --- .../edgex-device-gpio-deployment.yaml | 96 +++++++++++++++++++ .../edgex-device-gpio-service.yaml | 18 ++++ deployment/helm/values.yaml | 21 +++- 3 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml create mode 100644 deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-service.yaml diff --git a/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml new file mode 100644 index 00000000..40e23d6e --- /dev/null +++ b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml @@ -0,0 +1,96 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + name: {{.Values.edgex.app.device.gpio}} +spec: + replicas: {{.Values.edgex.replicas.device.gpio}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.device.gpio}} + image: {{.Values.edgex.image.device.gpio.repository}}:{{.Values.edgex.image.device.gpio.tag}} + imagePullPolicy: {{.Values.edgex.image.device.gpio.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/bin/sh","/edgex-init/ready_to_run_wait_install.sh"] + args: ["/device-gpio", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.device.gpio}} + {{- if not .Values.edgex.security.enabled }} + hostPort: {{.Values.edgex.port.device.gpio}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.device.gpio}} + - name: SERVICE_PORT + value: "59994" + envFrom: + - configMapRef: + name: edgex-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + tcpSocket: + port: {{.Values.edgex.port.device.gpio}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.port.device.gpio}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.device.gpio.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.device.gpio.limits.memory }} + cpu: {{ .Values.edgex.resources.device.gpio.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.device.gpio.requests.memory }} + cpu: {{ .Values.edgex.resources.device.gpio.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.device.gpio}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-service.yaml b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-service.yaml new file mode 100644 index 00000000..f1c151b8 --- /dev/null +++ b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + name: {{.Values.edgex.app.device.gpio}} +spec: + ports: + - name: "{{.Values.edgex.port.device.gpio}}" + port: {{.Values.edgex.port.device.gpio}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.device.gpio}} + type: {{.Values.expose.type}} + diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml index 631eea95..c52541d0 100644 --- a/deployment/helm/values.yaml +++ b/deployment/helm/values.yaml @@ -35,6 +35,7 @@ edgex: bacnet: edgex-device-bacnet snmp: edgex-device-snmp rfidllrp: edgex-device-rfid-llrp + gpio: edgex-device-gpio ui: edgex-ui system: edgex-sys-mgmt-agent consul: edgex-core-consul @@ -112,6 +113,10 @@ edgex: repository: edgexfoundry/device-rfid-llrp tag: "2.3.0" pullPolicy: IfNotPresent + gpio: + repository: edgexfoundry/device-gpio + tag: "2.3.0" + pullPolicy: IfNotPresent ui: repository: edgexfoundry/edgex-ui tag: "2.3.0" @@ -173,6 +178,7 @@ edgex: modbus: 59901 snmp: 59993 rfidllrp: 59989 + gpio: 59994 system: 58890 ui: 4000 consul: 8500 @@ -216,6 +222,7 @@ edgex: bacnet: 0 snmp: 0 rfidllrp: 0 + gpio: 0 ui: 1 system: 1 consul: 1 @@ -230,9 +237,9 @@ edgex: runAsUser: 2002 runAsGroup: 2001 tlsHost: edgex - addConsulRoles: "device-onvif-camera,device-usb-camera,device-mqtt,device-modbus,device-bacnet,device-snmp,device-rfid-llrp" - addServiceTokens: "device-rest, device-virtual, device-onvif-camera, device-usb-camera, device-mqtt, device-modbus, device-bacnet, device-snmp, device-rfid-llrp" - addKnownSecrets: "redisdb[app-rules-engine],redisdb[device-rest],redisdb[device-virtual],redisdb[device-onvif-camera],redisdb[device-usb-camera],redisdb[device-mqtt],redisdb[device-modbus],redisdb[device-bacnet],redisdb[device-snmp],redisdb[device-rfid-llrp]" + addConsulRoles: "device-onvif-camera,device-usb-camera,device-mqtt,device-modbus,device-bacnet,device-snmp,device-rfid-llrp, device-gpio" + addServiceTokens: "device-rest, device-virtual, device-onvif-camera, device-usb-camera, device-mqtt, device-modbus, device-bacnet, device-snmp, device-rfid-llrp, device-gpio" + addKnownSecrets: "redisdb[app-rules-engine],redisdb[device-rest],redisdb[device-virtual],redisdb[device-onvif-camera],redisdb[device-usb-camera],redisdb[device-mqtt],redisdb[device-modbus],redisdb[device-bacnet],redisdb[device-snmp],redisdb[device-rfid-llrp],redisdb[device-gpio]" # resources defines the cpu and memory limits and requests for the respective application resources: @@ -360,6 +367,14 @@ edgex: requests: cpu: 0.5 memory: 256Mi + gpio: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi ui: enforceLimits: false limits: From 5460347ce8311c247e1e5b359a4b16c489f99727 Mon Sep 17 00:00:00 2001 From: Kyle Morton Date: Tue, 29 Nov 2022 17:05:31 -0600 Subject: [PATCH 2/8] feat: Add support in helm for asc-mqtt and asc-httpexport Signed-off-by: Kyle Morton --- .../edgex-app-http-export-deployment.yaml | 100 +++++++++++++++++ .../edgex-app-http-export-service.yaml | 18 ++++ .../edgex-app-mqtt-export-deployment.yaml | 101 ++++++++++++++++++ .../edgex-app-mqtt-export-service.yaml | 17 +++ deployment/helm/values.yaml | 36 ++++++- 5 files changed, 269 insertions(+), 3 deletions(-) create mode 100644 deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-service.yaml create mode 100644 deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-service.yaml diff --git a/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml new file mode 100644 index 00000000..eee7dd5a --- /dev/null +++ b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml @@ -0,0 +1,100 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + name: {{.Values.edgex.app.appservice.httpexport}} +spec: + replicas: {{.Values.edgex.replicas.appservice.httpexport}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.httpexport}} + image: {{.Values.edgex.image.appservice.httpexport.repository}}:{{.Values.edgex.image.appservice.httpexport.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.httpexport.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.httpexport}} + {{- if not .Values.edgex.security.enabled }} + hostPort: {{.Values.edgex.port.appservice.httpexport}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + env: + - name: EDGEX_PROFILE + value: "http-export" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.httpexport}} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + envFrom: + - configMapRef: + name: edgex-common-variables + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + tcpSocket: + port: {{.Values.edgex.port.appservice.httpexport}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.port.appservice.httpexport}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.httpexport.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.httpexport.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.httpexport.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.httpexport.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.httpexport.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.httpexport}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-service.yaml b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-service.yaml new file mode 100644 index 00000000..7b6dbba7 --- /dev/null +++ b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + name: {{.Values.edgex.app.appservice.httpexport}} +spec: + ports: + - name: "{{.Values.edgex.port.appservice.httpexport}}" + port: {{.Values.edgex.port.appservice.httpexport}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}} + type: {{.Values.expose.type}} + diff --git a/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml new file mode 100644 index 00000000..10f257bc --- /dev/null +++ b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml @@ -0,0 +1,101 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + name: {{.Values.edgex.app.appservice.mqttexport}} +spec: + replicas: {{.Values.edgex.replicas.appservice.mqttexport}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.mqttexport}} + image: {{.Values.edgex.image.appservice.mqttexport.repository}}:{{.Values.edgex.image.appservice.mqttexport.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.mqttexport.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.mqttexport}} + {{- if not .Values.edgex.security.enabled }} + hostPort: {{.Values.edgex.port.appservice.mqttexport}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + env: + - name: EDGEX_PROFILE + value: "mqtt-export" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.mqttexport}} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.mqttexport}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.mqttexport}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.mqttexport.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.mqttexport.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.mqttexport.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.mqttexport.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.mqttexport.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.mqttexport}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-service.yaml b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-service.yaml new file mode 100644 index 00000000..c5e158ff --- /dev/null +++ b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + name: {{.Values.edgex.app.appservice.mqttexport}} +spec: + ports: + - name: "http" + port: {{.Values.edgex.port.appservice.mqttexport}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.mqttexport}} + type: {{.Values.expose.type}} diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml index c52541d0..925c5725 100644 --- a/deployment/helm/values.yaml +++ b/deployment/helm/values.yaml @@ -25,6 +25,8 @@ edgex: scheduler: edgex-support-scheduler appservice: rules: edgex-app-rules-engine + mqttexport: edgex-app-mqtt-export + httpexport: edgex-app-http-export device: virtual: edgex-device-virtual rest: edgex-device-rest @@ -76,6 +78,14 @@ edgex: repository: edgexfoundry/app-service-configurable tag: "2.3.0" pullPolicy: IfNotPresent + mqttexport: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" + pullPolicy: IfNotPresent + httpexport: + repository: nexus3.edgexfoundry.org:10004/app-service-configurable + tag: "latest" + pullPolicy: IfNotPresent device: virtual: repository: edgexfoundry/device-virtual @@ -168,6 +178,8 @@ edgex: scheduler: 59861 appservice: rules: 59701 + mqttexport: 59703 + httpexport: 59704 device: virtual: 59900 rest: 59986 @@ -212,6 +224,8 @@ edgex: scheduler: 1 appservice: rules: 1 + mqttexport: 0 + httpexport: 0 device: virtual: 1 rest: 1 @@ -237,9 +251,9 @@ edgex: runAsUser: 2002 runAsGroup: 2001 tlsHost: edgex - addConsulRoles: "device-onvif-camera,device-usb-camera,device-mqtt,device-modbus,device-bacnet,device-snmp,device-rfid-llrp, device-gpio" - addServiceTokens: "device-rest, device-virtual, device-onvif-camera, device-usb-camera, device-mqtt, device-modbus, device-bacnet, device-snmp, device-rfid-llrp, device-gpio" - addKnownSecrets: "redisdb[app-rules-engine],redisdb[device-rest],redisdb[device-virtual],redisdb[device-onvif-camera],redisdb[device-usb-camera],redisdb[device-mqtt],redisdb[device-modbus],redisdb[device-bacnet],redisdb[device-snmp],redisdb[device-rfid-llrp],redisdb[device-gpio]" + addConsulRoles: "device-onvif-camera,device-usb-camera,device-mqtt,device-modbus,device-bacnet,device-snmp,device-rfid-llrp,device-gpio,app-mqtt-export,app-http-export" + addServiceTokens: "device-rest, device-virtual, device-onvif-camera, device-usb-camera, device-mqtt, device-modbus, device-bacnet, device-snmp, device-rfid-llrp, device-gpio, app-mqtt-export, app-http-export" + addKnownSecrets: "redisdb[app-rules-engine],redisdb[device-rest],redisdb[device-virtual],redisdb[device-onvif-camera],redisdb[device-usb-camera],redisdb[device-mqtt],redisdb[device-modbus],redisdb[device-bacnet],redisdb[device-snmp],redisdb[device-rfid-llrp],redisdb[device-gpio],redisdb[app-mqtt-export],message-bus[app-mqtt-export],redisdb[app-http-export],message-bus[app-http-export]" # resources defines the cpu and memory limits and requests for the respective application resources: @@ -294,6 +308,22 @@ edgex: requests: cpu: 0.5 memory: 256Mi + mqttexport: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + httpexport: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi device: virtual: enforceLimits: false From 8f5da8e909d1449fe1a7cd5e16e83dd749adde39 Mon Sep 17 00:00:00 2001 From: Kyle Morton Date: Thu, 1 Dec 2022 00:33:09 -0600 Subject: [PATCH 3/8] feat: Add support in helm for asc-sample, asc-metrics, and as-llrp Signed-off-by: Kyle Morton --- ...edgex-app-metrics-influxdb-deployment.yaml | 101 +++++++++++++++++ .../edgex-app-metrics-influxdb-service.yaml | 17 +++ ...ex-app-rfid-llrp-inventory-deployment.yaml | 104 ++++++++++++++++++ ...edgex-app-rfid-llrp-inventory-service.yaml | 17 +++ .../edgex-app-sample-deployment.yaml | 101 +++++++++++++++++ .../edgex-app-sample-service.yaml | 17 +++ deployment/helm/templates/edgex-pv.yaml | 18 +++ deployment/helm/templates/edgex-pvc.yaml | 16 +++ deployment/helm/values.yaml | 47 +++++++- 9 files changed, 437 insertions(+), 1 deletion(-) create mode 100644 deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-service.yaml create mode 100644 deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-service.yaml create mode 100644 deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-sample/edgex-app-sample-service.yaml diff --git a/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml new file mode 100644 index 00000000..30b589eb --- /dev/null +++ b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml @@ -0,0 +1,101 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rules}} + name: {{.Values.edgex.app.appservice.metricsinfluxdb}} +spec: + replicas: {{.Values.edgex.replicas.appservice.metricsinfluxdb}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.metricsinfluxdb}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.metricsinfluxdb}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.metricsinfluxdb}} + image: {{.Values.edgex.image.appservice.metricsinfluxdb.repository}}:{{.Values.edgex.image.appservice.metricsinfluxdb.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.metricsinfluxdb.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.metricsinfluxdb}} + {{- if not .Values.edgex.security.enabled }} + hostPort: {{.Values.edgex.port.appservice.metricsinfluxdb}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + env: + - name: EDGEX_PROFILE + value: "metrics-influxdb" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.metricsinfluxdb}} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.metricsinfluxdb}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.metricsinfluxdb}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.metricsinfluxdb.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.metricsinfluxdb.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.metricsinfluxdb.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.metricsinfluxdb.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.metricsinfluxdb.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.metricsinfluxdb}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-service.yaml b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-service.yaml new file mode 100644 index 00000000..246bc5fd --- /dev/null +++ b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.metricsinfluxdb}} + name: {{.Values.edgex.app.appservice.metricsinfluxdb}} +spec: + ports: + - name: "http" + port: {{.Values.edgex.port.appservice.metricsinfluxdb}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.metricsinfluxdb}} + type: {{.Values.expose.type}} diff --git a/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml new file mode 100644 index 00000000..ee725c0a --- /dev/null +++ b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml @@ -0,0 +1,104 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + name: {{.Values.edgex.app.appservice.rfidllrpinventory}} +spec: + replicas: {{.Values.edgex.replicas.appservice.rfidllrpinventory}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.rfidllrpinventory}} + image: {{.Values.edgex.image.appservice.rfidllrpinventory.repository}}:{{.Values.edgex.image.appservice.rfidllrpinventory.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.rfidllrpinventory.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-rfid-llrp-inventory", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.rfidllrpinventory}} + {{- if not .Values.edgex.security.enabled }} + hostPort: {{.Values.edgex.port.appservice.rfidllrpinventory}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + env: + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.rfidllrpinventory}} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.rfidllrpinventory}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.rfidllrpinventory}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + - mountPath: /tmp/edgex/edgex-app-rfid-llrp-inventory + name: edgex-app-rfid-llrp-inventory + {{- end }} + {{- if .Values.edgex.resources.appservice.rfidllrpinventory.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.rfidllrpinventory.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.rfidllrpinventory.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.rfidllrpinventory.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.rfidllrpinventory.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.rfidllrpinventory}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + - name: edgex-app-rfid-llrp-inventory + persistentVolumeClaim: + claimName: app-rfid-llrp-inventory + {{- end}} diff --git a/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-service.yaml b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-service.yaml new file mode 100644 index 00000000..e0450e67 --- /dev/null +++ b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + name: {{.Values.edgex.app.appservice.rfidllrpinventory}} +spec: + ports: + - name: "http" + port: {{.Values.edgex.port.appservice.rfidllrpinventory}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.rfidllrpinventory}} + type: {{.Values.expose.type}} diff --git a/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml new file mode 100644 index 00000000..b1fa80d4 --- /dev/null +++ b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml @@ -0,0 +1,101 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + name: {{.Values.edgex.app.appservice.appsample}} +spec: + replicas: {{.Values.edgex.replicas.appservice.appsample}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.appsample}} + image: {{.Values.edgex.image.appservice.appsample.repository}}:{{.Values.edgex.image.appservice.appsample.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.appsample.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.appsample}} + {{- if not .Values.edgex.security.enabled }} + hostPort: {{.Values.edgex.port.appservice.appsample}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + env: + - name: EDGEX_PROFILE + value: "sample" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.appsample}} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.appsample}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.appsample}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.appsample.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.appsample.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.appsample.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.appsample.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.appsample.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.appsample}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-sample/edgex-app-sample-service.yaml b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-service.yaml new file mode 100644 index 00000000..e89d9bf8 --- /dev/null +++ b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + name: {{.Values.edgex.app.appservice.appsample}} +spec: + ports: + - name: "http" + port: {{.Values.edgex.port.appservice.appsample}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.appsample}} + type: {{.Values.expose.type}} diff --git a/deployment/helm/templates/edgex-pv.yaml b/deployment/helm/templates/edgex-pv.yaml index 5ceea4b1..fbf58fc1 100644 --- a/deployment/helm/templates/edgex-pv.yaml +++ b/deployment/helm/templates/edgex-pv.yaml @@ -234,4 +234,22 @@ spec: - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-device-usb-camera" +{{- end}} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: edgex-app-rfid-llrp-inventory +spec: + storageClassName: "" + claimRef: + name: app-rfid-llrp-inventory + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/mnt/edgex-app-rfid-llrp-inventory" {{- end}} \ No newline at end of file diff --git a/deployment/helm/templates/edgex-pvc.yaml b/deployment/helm/templates/edgex-pvc.yaml index 5667ac71..16cf72e0 100644 --- a/deployment/helm/templates/edgex-pvc.yaml +++ b/deployment/helm/templates/edgex-pvc.yaml @@ -210,4 +210,20 @@ spec: resources: requests: storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: app-rfid-llrp-inventory +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi {{- end }} diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml index 925c5725..8dc33711 100644 --- a/deployment/helm/values.yaml +++ b/deployment/helm/values.yaml @@ -27,6 +27,9 @@ edgex: rules: edgex-app-rules-engine mqttexport: edgex-app-mqtt-export httpexport: edgex-app-http-export + appsample: edgex-app-sample + metricsinfluxdb: edgex-app-metrics-influxdb + rfidllrpinventory: edgex-app-rfid-llrp-inventory device: virtual: edgex-device-virtual rest: edgex-device-rest @@ -78,6 +81,18 @@ edgex: repository: edgexfoundry/app-service-configurable tag: "2.3.0" pullPolicy: IfNotPresent + appsample: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" + pullPolicy: IfNotPresent + metricsinfluxdb: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" + pullPolicy: IfNotPresent + rfidllrpinventory: + repository: edgexfoundry/app-rfid-llrp-inventory + tag: "2.3.0" + pullPolicy: IfNotPresent mqttexport: repository: edgexfoundry/app-service-configurable tag: "2.3.0" @@ -180,6 +195,9 @@ edgex: rules: 59701 mqttexport: 59703 httpexport: 59704 + appsample: 59700 + metricsinfluxdb: 59707 + rfidllrpinventory: 59711 device: virtual: 59900 rest: 59986 @@ -226,6 +244,9 @@ edgex: rules: 1 mqttexport: 0 httpexport: 0 + appsample: 0 + metricsinfluxdb: 0 + rfidllrpinventory: 0 device: virtual: 1 rest: 1 @@ -253,7 +274,7 @@ edgex: tlsHost: edgex addConsulRoles: "device-onvif-camera,device-usb-camera,device-mqtt,device-modbus,device-bacnet,device-snmp,device-rfid-llrp,device-gpio,app-mqtt-export,app-http-export" addServiceTokens: "device-rest, device-virtual, device-onvif-camera, device-usb-camera, device-mqtt, device-modbus, device-bacnet, device-snmp, device-rfid-llrp, device-gpio, app-mqtt-export, app-http-export" - addKnownSecrets: "redisdb[app-rules-engine],redisdb[device-rest],redisdb[device-virtual],redisdb[device-onvif-camera],redisdb[device-usb-camera],redisdb[device-mqtt],redisdb[device-modbus],redisdb[device-bacnet],redisdb[device-snmp],redisdb[device-rfid-llrp],redisdb[device-gpio],redisdb[app-mqtt-export],message-bus[app-mqtt-export],redisdb[app-http-export],message-bus[app-http-export]" + addKnownSecrets: "redisdb[app-rules-engine],redisdb[device-rest],redisdb[device-virtual],redisdb[device-onvif-camera],redisdb[device-usb-camera],redisdb[device-mqtt],redisdb[device-modbus],redisdb[device-bacnet],redisdb[device-snmp],redisdb[device-rfid-llrp],redisdb[device-gpio],redisdb[app-mqtt-export],message-bus[app-mqtt-export],redisdb[app-http-export],message-bus[app-http-export],redisdb[app-sample],redisdb[app-metrics-influxdb],redisdb[app-rfid-llrp-inventory]" # resources defines the cpu and memory limits and requests for the respective application resources: @@ -324,6 +345,30 @@ edgex: requests: cpu: 0.5 memory: 256Mi + appsample: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + metricsinfluxdb: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi + rfidllrpinventory: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi device: virtual: enforceLimits: false From e532499a17270c672bc14c2738a35f487cce6e67 Mon Sep 17 00:00:00 2001 From: "Dr. Kyle Morton" Date: Thu, 1 Dec 2022 17:07:21 -0500 Subject: [PATCH 4/8] fix: Updated device-onvif-camera and device-usb-camera directory and volume (#156) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton --- .../edgex-device-onvif-camera-deployment.yaml | 5 +++++ .../edgex-device-onvif-camera-service.yaml | 0 .../edgex-device-usb-camera-deployment.yaml | 5 +++++ .../edgex-device-usb-camera-service.yaml | 0 4 files changed, 10 insertions(+) rename deployment/helm/templates/{edgex-device-usb-camera => edgex-device-onvif-camera}/edgex-device-onvif-camera-deployment.yaml (94%) rename deployment/helm/templates/{edgex-device-usb-camera => edgex-device-onvif-camera}/edgex-device-onvif-camera-service.yaml (100%) rename deployment/helm/templates/{edgex-device-onvif-camera => edgex-device-usb-camera}/edgex-device-usb-camera-deployment.yaml (95%) rename deployment/helm/templates/{edgex-device-onvif-camera => edgex-device-usb-camera}/edgex-device-usb-camera-service.yaml (100%) diff --git a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-onvif-camera-deployment.yaml b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml similarity index 94% rename from deployment/helm/templates/edgex-device-usb-camera/edgex-device-onvif-camera-deployment.yaml rename to deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml index 5a3eb79d..97c6f96b 100644 --- a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-onvif-camera-deployment.yaml +++ b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml @@ -67,6 +67,8 @@ spec: name: edgex-init - mountPath: /tmp/edgex/secrets name: edgex-secrets + - mountPath: /mnt/edgex-device-onvif-camera + name: device-onvif-camera {{- end }} {{- if .Values.edgex.resources.device.onvifcamera.enforceLimits }} resources: @@ -91,4 +93,7 @@ spec: - name: edgex-secrets persistentVolumeClaim: claimName: edgex-secrets + - name: device-onvif-camera + persistentVolumeClaim: + claimName: device-onvif-camera {{- end}} diff --git a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-onvif-camera-service.yaml b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-service.yaml similarity index 100% rename from deployment/helm/templates/edgex-device-usb-camera/edgex-device-onvif-camera-service.yaml rename to deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-service.yaml diff --git a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-usb-camera-deployment.yaml b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml similarity index 95% rename from deployment/helm/templates/edgex-device-onvif-camera/edgex-device-usb-camera-deployment.yaml rename to deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml index beb0ff18..3d6e036c 100644 --- a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-usb-camera-deployment.yaml +++ b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml @@ -67,6 +67,8 @@ spec: name: edgex-init - mountPath: /tmp/edgex/secrets name: edgex-secrets + - mountPath: /mnt/edgex-device-usb-camera + name: device-usb-camera {{- end }} {{- if .Values.edgex.resources.device.usbcamera.enforceLimits }} resources: @@ -91,4 +93,7 @@ spec: - name: edgex-secrets persistentVolumeClaim: claimName: edgex-secrets + - name: device-usb-camera + persistentVolumeClaim: + claimName: device-usb-camera {{- end}} diff --git a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-usb-camera-service.yaml b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-service.yaml similarity index 100% rename from deployment/helm/templates/edgex-device-onvif-camera/edgex-device-usb-camera-service.yaml rename to deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-service.yaml From d1db7a97ad70774affe268c519b962676526b3cb Mon Sep 17 00:00:00 2001 From: "Dr. Kyle Morton" Date: Wed, 7 Dec 2022 18:04:38 -0600 Subject: [PATCH 5/8] fix: added service for edgex-ui (#162) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton --- .../templates/edgex-ui/edgex-ui-service.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 deployment/helm/templates/edgex-ui/edgex-ui-service.yaml diff --git a/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml b/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml new file mode 100644 index 00000000..c12adf28 --- /dev/null +++ b/deployment/helm/templates/edgex-ui/edgex-ui-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.ui}} + name: {{.Values.edgex.app.ui}} +spec: + ports: + - name: "http" + port: {{.Values.edgex.port.ui}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.ui}} + type: {{.Values.expose.type}} From ae282014a61af51cebfa5d0cf1fdfcf03aef3278 Mon Sep 17 00:00:00 2001 From: "Dr. Kyle Morton" Date: Thu, 8 Dec 2022 15:48:21 -0600 Subject: [PATCH 6/8] feat: Added support for nats (#163) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton --- .../configmaps/as-common-configmap.yaml | 10 ++ .../configmaps/device-common-configmap.yaml | 8 ++ .../{ => configmaps}/edgex-configmap.yaml | 4 +- ...-app-external-mqtt-trigger-deployment.yaml | 115 ++++++++++++++++++ ...gex-app-external-mqtt-trigger-service.yaml | 17 +++ .../edgex-app-http-export-deployment.yaml | 10 ++ ...edgex-app-metrics-influxdb-deployment.yaml | 4 + .../edgex-app-mqtt-export-deployment.yaml | 18 ++- ...ex-app-rfid-llrp-inventory-deployment.yaml | 4 + .../edgex-app-sample-deployment.yaml | 4 + .../edgex-app-rules-engine-deployment.yaml | 23 ++++ .../edgex-core-command-deployment.yaml | 12 ++ .../edgex-core-data-deployment.yaml | 14 +++ .../edgex-device-bacnet-deployment.yaml | 2 + .../edgex-device-gpio-deployment.yaml | 2 + .../edgex-device-modbus-deployment.yaml | 2 + .../edgex-device-mqtt-deployment.yaml | 2 + .../edgex-device-onvif-camera-deployment.yaml | 2 + .../edgex-device-rest-deployment.yaml | 2 + .../edgex-device-rfid-llrp-deployment.yaml | 2 + .../edgex-device-snmp-deployment.yaml | 2 + .../edgex-device-usb-camera-deployment.yaml | 2 + .../edgex-device-virtual-deployment.yaml | 2 + .../edgex-ekuiper-deployment.yaml | 26 ++++ .../edgex-core-metadata-deployment.yaml | 14 +++ .../edgex-mqtt-broker-deployment.yaml | 2 +- .../edgex-nats-server-deployment.yaml | 59 +++++++++ .../edgex-nats-server-service.yaml | 18 +++ deployment/helm/templates/edgex-pv.yaml | 20 ++- deployment/helm/templates/edgex-pvc.yaml | 16 +++ ...security-secretstore-setup-deployment.yaml | 4 + ...dgex-support-notifications-deployment.yaml | 14 +++ .../edgex-support-scheduler-deployment.yaml | 14 +++ deployment/helm/values.yaml | 42 ++++++- 34 files changed, 486 insertions(+), 6 deletions(-) create mode 100644 deployment/helm/templates/configmaps/as-common-configmap.yaml create mode 100644 deployment/helm/templates/configmaps/device-common-configmap.yaml rename deployment/helm/templates/{ => configmaps}/edgex-configmap.yaml (96%) create mode 100644 deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml create mode 100644 deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml create mode 100644 deployment/helm/templates/edgex-nats-server/edgex-nats-server-deployment.yaml create mode 100644 deployment/helm/templates/edgex-nats-server/edgex-nats-server-service.yaml diff --git a/deployment/helm/templates/configmaps/as-common-configmap.yaml b/deployment/helm/templates/configmaps/as-common-configmap.yaml new file mode 100644 index 00000000..7b38ab60 --- /dev/null +++ b/deployment/helm/templates/configmaps/as-common-configmap.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: as-common-variables +data: + DATABASE_HOST: edgex-redis + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST: edgex-redis + TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redis + {{- end}} diff --git a/deployment/helm/templates/configmaps/device-common-configmap.yaml b/deployment/helm/templates/configmaps/device-common-configmap.yaml new file mode 100644 index 00000000..8448593a --- /dev/null +++ b/deployment/helm/templates/configmaps/device-common-configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: device-common-variables +data: + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + MESSAGEQUEUE_HOST: edgex-redis + {{- end}} diff --git a/deployment/helm/templates/edgex-configmap.yaml b/deployment/helm/templates/configmaps/edgex-configmap.yaml similarity index 96% rename from deployment/helm/templates/edgex-configmap.yaml rename to deployment/helm/templates/configmaps/edgex-configmap.yaml index 6ea2c32a..2281aa02 100644 --- a/deployment/helm/templates/edgex-configmap.yaml +++ b/deployment/helm/templates/configmaps/edgex-configmap.yaml @@ -12,9 +12,11 @@ data: CLIENTS_CORE_COMMAND_HOST: {{.Values.edgex.app.core.command}} CLIENTS_SUPPORT_NOTIFICATIONS_HOST: {{.Values.edgex.app.support.notifications}} CLIENTS_SUPPORT_SCHEDULER_HOST: {{.Values.edgex.app.support.scheduler}} - MESSAGEQUEUE_HOST: {{.Values.edgex.app.redis}} REGISTRY_HOST: {{.Values.edgex.app.consul}} DATABASES_PRIMARY_HOST: {{.Values.edgex.app.redis}} +{{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + MESSAGEQUEUE_HOST: {{.Values.edgex.app.redis}} +{{- end}} {{- if .Values.edgex.security.enabled }} EDGEX_SECURITY_SECRET_STORE: "true" SECRETSTORE_HOST: edgex-vault diff --git a/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml new file mode 100644 index 00000000..71665565 --- /dev/null +++ b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml @@ -0,0 +1,115 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + name: {{.Values.edgex.app.appservice.externalmqtttrigger}} +spec: + replicas: {{.Values.edgex.replicas.appservice.externalmqtttrigger}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + strategy: {} + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + spec: + {{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}} + topologyKey: "kubernetes.io/hostname" + {{- end}} + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.appservice.externalmqtttrigger}} + image: {{.Values.edgex.image.appservice.externalmqtttrigger.repository}}:{{.Values.edgex.image.appservice.externalmqtttrigger.tag}} + imagePullPolicy: {{.Values.edgex.image.appservice.externalmqtttrigger.pullPolicy}} + {{- if .Values.edgex.security.enabled }} + command: ["/edgex-init/ready_to_run_wait_install.sh"] + args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"] + {{- end}} + ports: + - containerPort: {{.Values.edgex.port.appservice.externalmqtttrigger}} + {{- if not .Values.edgex.security.enabled }} + hostPort: {{.Values.edgex.port.appservice.externalmqtttrigger}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + envFrom: + - configMapRef: + name: edgex-common-variables + env: + - name: EDGEX_PROFILE + value: "edgex-app-external-mqtt-trigger" + - name: SERVICE_HOST + value: {{.Values.edgex.app.appservice.externalmqtttrigger}} + - name: WRITABLE_LOGLEVEL + value: INFO + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: {{.Values.edgex.app.redis}} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: {{.Values.edgex.app.redis}} + {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "mqtt") }} + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS + value: "{{.Values.edgex.features.mqttBrokerAddress}}" + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC + value: edgex-export + - name: TRIGGER_EXTERNALMQTT_URL + value: "{{.Values.edgex.features.mqttBrokerAddress}}" + {{- end}} + + + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.externalmqtttrigger}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + httpGet: + path: /api/v2/ping + port: {{.Values.edgex.port.appservice.externalmqtttrigger}} + {{- if .Values.edgex.security.enabled }} + volumeMounts: + - mountPath: /edgex-init + name: edgex-init + - mountPath: /tmp/edgex/secrets + name: edgex-secrets + {{- end }} + {{- if .Values.edgex.resources.appservice.externalmqtttrigger.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.appservice.externalmqtttrigger.limits.memory }} + cpu: {{ .Values.edgex.resources.appservice.externalmqtttrigger.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.appservice.externalmqtttrigger.requests.memory }} + cpu: {{ .Values.edgex.resources.appservice.externalmqtttrigger.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.appservice.externalmqtttrigger}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} + {{- if .Values.edgex.security.enabled }} + volumes: + - name: edgex-init + persistentVolumeClaim: + claimName: edgex-init + - name: edgex-secrets + persistentVolumeClaim: + claimName: edgex-secrets + {{- end}} diff --git a/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml new file mode 100644 index 00000000..fc3e2acd --- /dev/null +++ b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml @@ -0,0 +1,17 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + name: {{.Values.edgex.app.appservice.externalmqtttrigger}} +spec: + ports: + - name: "http" + port: {{.Values.edgex.port.appservice.externalmqtttrigger}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}} + type: {{.Values.expose.type}} diff --git a/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml index eee7dd5a..0bb9851b 100644 --- a/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml +++ b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml @@ -49,13 +49,23 @@ spec: value: "http-export" - name: SERVICE_HOST value: {{.Values.edgex.app.appservice.httpexport}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST value: {{.Values.edgex.app.redis}} - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST value: {{.Values.edgex.app.redis}} + {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: WRITABLE_PIPELINE_FUNCTIONS_HTTPEXPORT_PARAMETERS_URL + value: "{{.Values.edgex.features.httpExportURL}}" + - name: WRITABLE_LOGLEVEL + value: INFO + {{- end}} envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: as-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml index 30b589eb..b420e35d 100644 --- a/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml +++ b/deployment/helm/templates/edgex-app-metrics-influxdb/edgex-app-metrics-influxdb-deployment.yaml @@ -46,15 +46,19 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: as-common-variables env: - name: EDGEX_PROFILE value: "metrics-influxdb" - name: SERVICE_HOST value: {{.Values.edgex.app.appservice.metricsinfluxdb}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST value: {{.Values.edgex.app.redis}} - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST value: {{.Values.edgex.app.redis}} + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml index 10f257bc..9ff74ab3 100644 --- a/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml +++ b/deployment/helm/templates/edgex-app-mqtt-export/edgex-app-mqtt-export-deployment.yaml @@ -46,15 +46,31 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: as-common-variables env: - name: EDGEX_PROFILE value: "mqtt-export" - name: SERVICE_HOST value: {{.Values.edgex.app.appservice.mqttexport}} + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS + value: "{{.Values.edgex.features.mqttBrokerAddress}}" + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC + value: edgex-events + - name: WRITABLE_LOGLEVEL + value: INFO + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST value: {{.Values.edgex.app.redis}} - - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS value: {{.Values.edgex.app.redis}} + {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: "{{.Values.edgex.features.mqttBrokerAddress}}" + - name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC + value: edgex-events + {{- end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml index ee725c0a..8dfa7d94 100644 --- a/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml +++ b/deployment/helm/templates/edgex-app-rfid-llrp-inventory/edgex-app-rfid-llrp-inventory-deployment.yaml @@ -46,13 +46,17 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: as-common-variables env: - name: SERVICE_HOST value: {{.Values.edgex.app.appservice.rfidllrpinventory}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST value: {{.Values.edgex.app.redis}} - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST value: {{.Values.edgex.app.redis}} + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml index b1fa80d4..a66d3dad 100644 --- a/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml +++ b/deployment/helm/templates/edgex-app-sample/edgex-app-sample-deployment.yaml @@ -46,15 +46,19 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: as-common-variables env: - name: EDGEX_PROFILE value: "sample" - name: SERVICE_HOST value: {{.Values.edgex.app.appservice.appsample}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST value: {{.Values.edgex.app.redis}} - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST value: {{.Values.edgex.app.redis}} + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml b/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml index 867d10b0..d356c550 100644 --- a/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml +++ b/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml @@ -51,10 +51,33 @@ spec: value: "rules-engine" - name: SERVICE_HOST value: {{.Values.edgex.app.appservice.rules}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST value: {{.Values.edgex.app.redis}} - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST value: {{.Values.edgex.app.redis}} + {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: TRIGGER_EDGEXMESSAGEBUS_OPTIONAL_AUTHMODE + value: none + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST + value: edgex-nats-server + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_PORT + value: "4222" + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_PROTOCOL + value: tcp + - name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_PUBLISHTOPIC + value: edgex/rules-events + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST + value: edgex-nats-server + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_PORT + value: "4222" + - name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_PROTOCOL + value: tcp + - name: TRIGGER_EDGEXMESSAGEBUS_TYPE + value: nats-jetstream + {{- end}} + securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-core-command/edgex-core-command-deployment.yaml b/deployment/helm/templates/edgex-core-command/edgex-core-command-deployment.yaml index f30e28d6..f8ebb120 100644 --- a/deployment/helm/templates/edgex-core-command/edgex-core-command-deployment.yaml +++ b/deployment/helm/templates/edgex-core-command/edgex-core-command-deployment.yaml @@ -47,6 +47,18 @@ spec: env: - name: SERVICE_HOST value: {{.Values.edgex.app.core.command}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_INTERNAL_AUTHMODE + value: none + - name: MESSAGEQUEUE_INTERNAL_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_INTERNAL_PORT + value: "4222" + - name: MESSAGEQUEUE_INTERNAL_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_INTERNAL_TYPE + value: nats-jetstream + {{end}} envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-core-data/edgex-core-data-deployment.yaml b/deployment/helm/templates/edgex-core-data/edgex-core-data-deployment.yaml index 08edf3ef..c5e85fb8 100644 --- a/deployment/helm/templates/edgex-core-data/edgex-core-data-deployment.yaml +++ b/deployment/helm/templates/edgex-core-data/edgex-core-data-deployment.yaml @@ -51,6 +51,20 @@ spec: - name: SECRETSTORE_TOKENFILE value: /tmp/edgex/secrets/core-data/secrets-token.json {{- end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_AUTHMODE + value: none + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: core-data + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + {{end}} envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml b/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml index e84e9ac1..8a047b51 100644 --- a/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml +++ b/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml @@ -50,6 +50,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml index 40e23d6e..a041afb5 100644 --- a/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml +++ b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml @@ -52,6 +52,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml b/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml index 1c420e01..ab7640f1 100644 --- a/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml +++ b/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml @@ -50,6 +50,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml b/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml index 25f9b1d8..1ceb65b1 100644 --- a/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml +++ b/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml @@ -52,6 +52,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml index 97c6f96b..77566a31 100644 --- a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml +++ b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml @@ -50,6 +50,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml b/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml index 4445c18e..2ffe7af3 100644 --- a/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml +++ b/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml @@ -50,6 +50,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml b/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml index bc20d503..5f1b11b1 100644 --- a/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml +++ b/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml @@ -50,6 +50,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml b/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml index a663e3cf..d3062f5e 100644 --- a/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml +++ b/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml @@ -50,6 +50,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml index 3d6e036c..c87d6045 100644 --- a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml +++ b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml @@ -50,6 +50,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml b/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml index d41455df..aa0bdd50 100644 --- a/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml +++ b/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml @@ -50,6 +50,8 @@ spec: envFrom: - configMapRef: name: edgex-common-variables + - configMapRef: + name: device-common-variables securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-deployment.yaml b/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-deployment.yaml index 57c8f776..c1c6f4fe 100644 --- a/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-deployment.yaml +++ b/deployment/helm/templates/edgex-ekuiper/edgex-ekuiper-deployment.yaml @@ -60,6 +60,7 @@ spec: value: "true" - name: KUIPER__BASIC__RESTPORT value: "{{.Values.edgex.port.ekuiper}}" + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} - name: EDGEX__DEFAULT__SERVER value: {{.Values.edgex.app.redis}} - name: EDGEX__DEFAULT__PROTOCOL @@ -68,6 +69,31 @@ spec: value: "{{.Values.edgex.port.redis}}" - name: EDGEX__DEFAULT__TOPIC value: "rules-events" + {{end}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: kuiper-rules-engine + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + - name: EDGEX__DEFAULT__OPTIONAL__CLIENTID + value: kuiper-rules-engine + - name: EDGEX__DEFAULT__PORT + value: '4222' + - name: EDGEX__DEFAULT__PROTOCOL + value: tcp + - name: EDGEX__DEFAULT__SERVER + value: edgex-nats-server + - name: EDGEX__DEFAULT__TOPIC + value: edgex/rules-events + - name: EDGEX__DEFAULT__TYPE + value: nats-jetstream + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: false diff --git a/deployment/helm/templates/edgex-metadata/edgex-core-metadata-deployment.yaml b/deployment/helm/templates/edgex-metadata/edgex-core-metadata-deployment.yaml index d89ce67e..aaf3e8b3 100644 --- a/deployment/helm/templates/edgex-metadata/edgex-core-metadata-deployment.yaml +++ b/deployment/helm/templates/edgex-metadata/edgex-core-metadata-deployment.yaml @@ -52,6 +52,20 @@ spec: value: {{.Values.edgex.app.core.metadata}} - name: NOTIFICATIONS_SENDER value: {{.Values.edgex.app.core.metadata}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_AUTHMODE + value: none + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: core-metadata + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-deployment.yaml b/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-deployment.yaml index 841c53e4..a6ffffb9 100644 --- a/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-deployment.yaml +++ b/deployment/helm/templates/edgex-mqtt-broker/edgex-mqtt-broker-deployment.yaml @@ -46,7 +46,7 @@ spec: livenessProbe: tcpSocket: port: {{.Values.edgex.port.mqttbroker}} - {{- if .Values.edgex.resources.device.usbcamera.enforceLimits }} + {{- if .Values.edgex.resources.mqttbroker.enforceLimits }} resources: limits: memory: {{ .Values.edgex.resources.mqttbroker.limits.memory }} diff --git a/deployment/helm/templates/edgex-nats-server/edgex-nats-server-deployment.yaml b/deployment/helm/templates/edgex-nats-server/edgex-nats-server-deployment.yaml new file mode 100644 index 00000000..1781ded1 --- /dev/null +++ b/deployment/helm/templates/edgex-nats-server/edgex-nats-server-deployment.yaml @@ -0,0 +1,59 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + name: {{.Values.edgex.app.natsserver}} +spec: + replicas: {{.Values.edgex.replicas.natsserver}} + selector: + matchLabels: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + strategy: + type: Recreate + template: + metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + spec: + automountServiceAccountToken: false + containers: + - name: {{.Values.edgex.app.natsserver}} + image: {{.Values.edgex.image.natsserver.repository}}:{{.Values.edgex.image.natsserver.tag}} + imagePullPolicy: {{.Values.edgex.image.natsserver.pullPolicy}} + ports: + - containerPort: {{.Values.edgex.port.natsserver}} + {{- if not .Values.edgex.security.enabled }} + hostPort: {{.Values.edgex.port.natsserver}} + hostIP: {{.Values.edgex.hostPortInternalBind}} + {{- end}} + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + startupProbe: + tcpSocket: + port: {{.Values.edgex.port.natsserver}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.port.natsserver}} + {{- if .Values.edgex.resources.natsserver.enforceLimits }} + resources: + limits: + memory: {{ .Values.edgex.resources.natsserver.limits.memory }} + cpu: {{ .Values.edgex.resources.natsserver.limits.cpu }} + requests: + memory: {{ .Values.edgex.resources.natsserver.requests.memory }} + cpu: {{ .Values.edgex.resources.natsserver.requests.cpu }} + {{- end}} + hostname: {{.Values.edgex.app.natsserver}} + restartPolicy: Always + securityContext: + runAsNonRoot: true + runAsUser: {{ .Values.edgex.security.runAsUser }} + runAsGroup: {{ .Values.edgex.security.runAsGroup }} diff --git a/deployment/helm/templates/edgex-nats-server/edgex-nats-server-service.yaml b/deployment/helm/templates/edgex-nats-server/edgex-nats-server-service.yaml new file mode 100644 index 00000000..8c80fe94 --- /dev/null +++ b/deployment/helm/templates/edgex-nats-server/edgex-nats-server-service.yaml @@ -0,0 +1,18 @@ +# Copyright (C) 2022 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# +apiVersion: v1 +kind: Service +metadata: + labels: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + name: {{.Values.edgex.app.natsserver}} +spec: + ports: + - name: "{{.Values.edgex.port.natsserver}}" + port: {{.Values.edgex.port.natsserver}} + selector: + org.edgexfoundry.service: {{.Values.edgex.app.natsserver}} + type: {{.Values.expose.type}} + diff --git a/deployment/helm/templates/edgex-pv.yaml b/deployment/helm/templates/edgex-pv.yaml index fbf58fc1..18ca1570 100644 --- a/deployment/helm/templates/edgex-pv.yaml +++ b/deployment/helm/templates/edgex-pv.yaml @@ -252,4 +252,22 @@ spec: - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} hostPath: path: "/mnt/edgex-app-rfid-llrp-inventory" -{{- end}} \ No newline at end of file +{{- end}} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: edgex-nats-server +spec: + storageClassName: "" + claimRef: + name: nats-server + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/tmp/nats" +{{- end}} diff --git a/deployment/helm/templates/edgex-pvc.yaml b/deployment/helm/templates/edgex-pvc.yaml index 16cf72e0..47fedba7 100644 --- a/deployment/helm/templates/edgex-pvc.yaml +++ b/deployment/helm/templates/edgex-pvc.yaml @@ -226,4 +226,20 @@ spec: resources: requests: storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: nats-server +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi {{- end }} diff --git a/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-deployment.yaml b/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-deployment.yaml index e66ec8d4..f2440734 100644 --- a/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-deployment.yaml +++ b/deployment/helm/templates/edgex-security-secretstore-setup/edgex-security-secretstore-setup-deployment.yaml @@ -47,6 +47,10 @@ spec: value: {{.Values.edgex.security.addServiceTokens}} - name: ADD_KNOWN_SECRETS value: {{.Values.edgex.security.addKnownSecrets}} + {{- if (eq .Values.edgex.features.messagebusbackend "redis") }} + - name: SECUREMESSAGEBUS_TYPE + value: redis + {{- end}} envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-deployment.yaml b/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-deployment.yaml index a3155e8b..808b9b20 100644 --- a/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-deployment.yaml +++ b/deployment/helm/templates/edgex-support-notifications/edgex-support-notifications-deployment.yaml @@ -47,6 +47,20 @@ spec: env: - name: SERVICE_HOST value: {{.Values.edgex.app.support.notifications}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_AUTHMODE + value: none + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: support-notifications + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + {{end}} envFrom: - configMapRef: name: edgex-common-variables diff --git a/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-deployment.yaml b/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-deployment.yaml index 1a7c5b63..e2c85577 100644 --- a/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-deployment.yaml +++ b/deployment/helm/templates/edgex-support-scheduler/edgex-support-scheduler-deployment.yaml @@ -54,6 +54,20 @@ spec: value: {{.Values.edgex.app.core.data}} - name: INTERVALACTIONS_SCRUBAGED_HOST value: {{.Values.edgex.app.core.data}} + {{- if (eq .Values.edgex.features.messagebusbackend "nats") }} + - name: MESSAGEQUEUE_AUTHMODE + value: none + - name: MESSAGEQUEUE_HOST + value: edgex-nats-server + - name: MESSAGEQUEUE_OPTIONAL_CLIENTID + value: support-scheduler + - name: MESSAGEQUEUE_PORT + value: '4222' + - name: MESSAGEQUEUE_PROTOCOL + value: tcp + - name: MESSAGEQUEUE_TYPE + value: nats-jetstream + {{end}} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml index 8dc33711..7ad21ab5 100644 --- a/deployment/helm/values.yaml +++ b/deployment/helm/values.yaml @@ -30,6 +30,7 @@ edgex: appsample: edgex-app-sample metricsinfluxdb: edgex-app-metrics-influxdb rfidllrpinventory: edgex-app-rfid-llrp-inventory + externalmqtttrigger: edgex-app-external-mqtt-trigger device: virtual: edgex-device-virtual rest: edgex-device-rest @@ -51,6 +52,7 @@ edgex: secretstoresetup: edgex-security-secretstore-setup modbussimulator: edgex-modbus-simulator mqttbroker: edgex-mqtt-broker + natsserver: edgex-nats-server # image defines configuration properties for docker-image-level concerns image: @@ -98,8 +100,12 @@ edgex: tag: "2.3.0" pullPolicy: IfNotPresent httpexport: - repository: nexus3.edgexfoundry.org:10004/app-service-configurable - tag: "latest" + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" + pullPolicy: IfNotPresent + externalmqtttrigger: + repository: edgexfoundry/app-service-configurable + tag: "2.3.0" pullPolicy: IfNotPresent device: virtual: @@ -182,6 +188,10 @@ edgex: repository: eclipse-mosquitto tag: "2.0" pullPolicy: IfNotPresent + natsserver: + repository: nats + tag: "2.9.3-alpine" + pullPolicy: IfNotPresent # port defines configuration properties for container, target and host ports port: core: @@ -198,6 +208,7 @@ edgex: appsample: 59700 metricsinfluxdb: 59707 rfidllrpinventory: 59711 + externalmqtttrigger: 59706 device: virtual: 59900 rest: 59986 @@ -216,6 +227,7 @@ edgex: ekuiper: 59720 modbussimulator: 1502 mqttbroker: 1883 + natsserver: 4222 # ports used by security bootstrapping for stage gating edgex init bootstrap: @@ -247,6 +259,7 @@ edgex: appsample: 0 metricsinfluxdb: 0 rfidllrpinventory: 0 + externalmqtttrigger: 0 device: virtual: 1 rest: 1 @@ -265,6 +278,7 @@ edgex: ekuiper: 1 modbussimulator: 0 mqttbroker: 0 + natsserver: 0 # UID/GID for container user security: @@ -369,6 +383,14 @@ edgex: requests: cpu: 0.5 memory: 256Mi + externalmqtttrigger: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi device: virtual: enforceLimits: false @@ -530,6 +552,14 @@ edgex: requests: cpu: 0.5 memory: 256Mi + natsserver: + enforceLimits: false + limits: + cpu: 1 + memory: 512Mi + requests: + cpu: 0.5 + memory: 256Mi storage: useHostPath: true @@ -541,3 +571,11 @@ edgex: sharedVolumesClassName: "rook-cephfs" # If this value is set to "ReadWriteOnce" it will trigger pod affinity rules. sharedVolumesAccessMode: "ReadWriteMany" + + features: + # Available messagebus options: redis|mqtt|nats + messagebusbackend: redis + # MQTT broker address + mqttBrokerAddress: "" + # Writable pipeline functions HTTP export parameter URL + httpExportURL: "" From 86b0734e922025a21de8c3d3673463ac0638b04d Mon Sep 17 00:00:00 2001 From: "Dr. Kyle Morton" Date: Fri, 9 Dec 2022 14:14:51 -0600 Subject: [PATCH 7/8] fix: Updated health checks to appropriate protocol (#164) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton --- .../edgex-app-external-mqtt-trigger-deployment.yaml | 2 +- .../edgex-app-http-export-deployment.yaml | 6 ++++-- .../edgex-device-bacnet-deployment.yaml | 6 ++++-- .../edgex-device-gpio/edgex-device-gpio-deployment.yaml | 6 ++++-- .../edgex-device-modbus-deployment.yaml | 6 ++++-- .../edgex-device-mqtt/edgex-device-mqtt-deployment.yaml | 6 ++++-- .../edgex-device-onvif-camera-deployment.yaml | 6 ++++-- .../edgex-device-rest/edgex-device-rest-deployment.yaml | 6 ++++-- .../edgex-device-rfid-llrp-deployment.yaml | 6 ++++-- .../edgex-device-snmp/edgex-device-snmp-deployment.yaml | 6 ++++-- .../edgex-device-usb-camera-deployment.yaml | 6 ++++-- .../edgex-device-virtual-deployment.yaml | 6 ++++-- .../edgex-security-bootstrapper-deployment.yaml | 8 ++++++++ .../templates/edgex-vault/edgex-vault-deployment.yaml | 8 ++++++++ deployment/helm/values.yaml | 7 ++++--- 15 files changed, 65 insertions(+), 26 deletions(-) diff --git a/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml index 71665565..38682d33 100644 --- a/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml +++ b/deployment/helm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml @@ -48,7 +48,7 @@ spec: name: edgex-common-variables env: - name: EDGEX_PROFILE - value: "edgex-app-external-mqtt-trigger" + value: "external-mqtt-trigger" - name: SERVICE_HOST value: {{.Values.edgex.app.appservice.externalmqtttrigger}} - name: WRITABLE_LOGLEVEL diff --git a/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml index 0bb9851b..eb28044d 100644 --- a/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml +++ b/deployment/helm/templates/edgex-app-http-export/edgex-app-http-export-deployment.yaml @@ -70,12 +70,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.appservice.httpexport}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.appservice.httpexport}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml b/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml index 8a047b51..d49ed556 100644 --- a/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml +++ b/deployment/helm/templates/edgex-device-bacnet/edgex-device-bacnet-deployment.yaml @@ -56,12 +56,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.bacnet}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.bacnet}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml index a041afb5..201dfed4 100644 --- a/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml +++ b/deployment/helm/templates/edgex-device-gpio/edgex-device-gpio-deployment.yaml @@ -58,12 +58,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.gpio}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.gpio}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml b/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml index ab7640f1..4f1beb11 100644 --- a/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml +++ b/deployment/helm/templates/edgex-device-modbus/edgex-device-modbus-deployment.yaml @@ -56,12 +56,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.modbus}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.modbus}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml b/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml index 1ceb65b1..82aa3315 100644 --- a/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml +++ b/deployment/helm/templates/edgex-device-mqtt/edgex-device-mqtt-deployment.yaml @@ -58,12 +58,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.mqtt}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.mqtt}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml index 77566a31..e50c4f12 100644 --- a/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml +++ b/deployment/helm/templates/edgex-device-onvif-camera/edgex-device-onvif-camera-deployment.yaml @@ -56,12 +56,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.onvifcamera}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.onvifcamera}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml b/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml index 2ffe7af3..d6506719 100644 --- a/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml +++ b/deployment/helm/templates/edgex-device-rest/edgex-device-rest-deployment.yaml @@ -56,12 +56,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.rest}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.rest}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml b/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml index 5f1b11b1..b782ead8 100644 --- a/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml +++ b/deployment/helm/templates/edgex-device-rfid-llrp/edgex-device-rfid-llrp-deployment.yaml @@ -56,12 +56,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.rfidllrp}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.rfidllrp}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml b/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml index d3062f5e..f2ddddbd 100644 --- a/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml +++ b/deployment/helm/templates/edgex-device-snmp/edgex-device-snmp-deployment.yaml @@ -56,12 +56,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.snmp}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.snmp}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml index c87d6045..a4f39104 100644 --- a/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml +++ b/deployment/helm/templates/edgex-device-usb-camera/edgex-device-usb-camera-deployment.yaml @@ -56,12 +56,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.usbcamera}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.usbcamera}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml b/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml index aa0bdd50..e444006c 100644 --- a/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml +++ b/deployment/helm/templates/edgex-device-virtual/edgex-device-virtual-deployment.yaml @@ -56,12 +56,14 @@ spec: allowPrivilegeEscalation: false readOnlyRootFilesystem: true startupProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.virtual}} periodSeconds: 1 failureThreshold: 120 livenessProbe: - tcpSocket: + httpGet: + path: /api/v2/ping port: {{.Values.edgex.port.device.virtual}} {{- if .Values.edgex.security.enabled }} volumeMounts: diff --git a/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-deployment.yaml b/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-deployment.yaml index 07ad0065..16dc7c47 100644 --- a/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-deployment.yaml +++ b/deployment/helm/templates/edgex-security-bootstrapper/edgex-security-bootstrapper-deployment.yaml @@ -49,6 +49,14 @@ spec: memory: {{ .Values.edgex.resources.vault.requests.memory }} cpu: {{ .Values.edgex.resources.vault.requests.cpu }} {{- end}} + startupProbe: + tcpSocket: + port: {{.Values.edgex.bootstrap.port.start}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.bootstrap.port.start}} hostname: {{.Values.edgex.app.bootstrapper}} restartPolicy: Always securityContext: diff --git a/deployment/helm/templates/edgex-vault/edgex-vault-deployment.yaml b/deployment/helm/templates/edgex-vault/edgex-vault-deployment.yaml index 853db4ee..9b7b87d6 100644 --- a/deployment/helm/templates/edgex-vault/edgex-vault-deployment.yaml +++ b/deployment/helm/templates/edgex-vault/edgex-vault-deployment.yaml @@ -98,6 +98,14 @@ spec: memory: {{ .Values.edgex.resources.vault.requests.memory }} cpu: {{ .Values.edgex.resources.vault.requests.cpu }} {{- end}} + startupProbe: + tcpSocket: + port: {{.Values.edgex.port.vault}} + periodSeconds: 1 + failureThreshold: 120 + livenessProbe: + tcpSocket: + port: {{.Values.edgex.port.vault}} hostname: {{.Values.edgex.app.vault}} restartPolicy: Always securityContext: diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml index 7ad21ab5..333c9b32 100644 --- a/deployment/helm/values.yaml +++ b/deployment/helm/values.yaml @@ -228,6 +228,7 @@ edgex: modbussimulator: 1502 mqttbroker: 1883 natsserver: 4222 + vault: 8200 # ports used by security bootstrapping for stage gating edgex init bootstrap: @@ -286,9 +287,9 @@ edgex: runAsUser: 2002 runAsGroup: 2001 tlsHost: edgex - addConsulRoles: "device-onvif-camera,device-usb-camera,device-mqtt,device-modbus,device-bacnet,device-snmp,device-rfid-llrp,device-gpio,app-mqtt-export,app-http-export" - addServiceTokens: "device-rest, device-virtual, device-onvif-camera, device-usb-camera, device-mqtt, device-modbus, device-bacnet, device-snmp, device-rfid-llrp, device-gpio, app-mqtt-export, app-http-export" - addKnownSecrets: "redisdb[app-rules-engine],redisdb[device-rest],redisdb[device-virtual],redisdb[device-onvif-camera],redisdb[device-usb-camera],redisdb[device-mqtt],redisdb[device-modbus],redisdb[device-bacnet],redisdb[device-snmp],redisdb[device-rfid-llrp],redisdb[device-gpio],redisdb[app-mqtt-export],message-bus[app-mqtt-export],redisdb[app-http-export],message-bus[app-http-export],redisdb[app-sample],redisdb[app-metrics-influxdb],redisdb[app-rfid-llrp-inventory]" + addConsulRoles: "app-external-mqtt-trigger,app-http-export,app-mqtt-export,device-bacnet,device-gpio,device-modbus,device-mqtt,device-onvif-camera,device-rfid-llrp,device-snmp,device-usb-camera" + addServiceTokens: "app-external-mqtt-trigger, app-http-export, app-metrics-influxdb, app-mqtt-export, app-rfid-llrp-inventory, app-sample, device-bacnet, device-gpio, device-modbus, device-mqtt, device-onvif-camera, device-rest, device-rfid-llrp, device-snmp, device-usb-camera, device-virtual" + addKnownSecrets: "message-bus[app-mqtt-export],message-bus[app-http-export],redisdb[app-external-mqtt-trigger],redisdb[app-http-export],redisdb[app-metrics-influxdb], redisdb[app-metrics-influxdb],redisdb[app-mqtt-export],redisdb[app-rfid-llrp-inventory],redisdb[app-sample],redisdb[device-bacnet],redisdb[device-gpio],redisdb[device-modbus],redisdb[device-mqtt],redisdb[device-onvif-camera],redisdb[device-rest],redisdb[device-rfid-llrp],redisdb[device-snmp], redisdb[device-usb-camera],redisdb[device-virtual]" # resources defines the cpu and memory limits and requests for the respective application resources: From 5002ffdc2cc34eb97a971db6a8f45121a49a6428 Mon Sep 17 00:00:00 2001 From: "Dr. Kyle Morton" Date: Fri, 9 Dec 2022 14:28:28 -0600 Subject: [PATCH 8/8] fix: added kuiper-connections and kuipers-sources volumes (#165) Signed-off-by: Kyle Morton Signed-off-by: Kyle Morton Co-authored-by: Kyle Morton --- .../edgex-app-rules-engine-deployment.yaml | 10 ++++++ deployment/helm/templates/edgex-pv.yaml | 36 +++++++++++++++++++ deployment/helm/templates/edgex-pvc.yaml | 32 +++++++++++++++++ 3 files changed, 78 insertions(+) diff --git a/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml b/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml index d356c550..ea04ba04 100644 --- a/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml +++ b/deployment/helm/templates/edgex-appservice-rules/edgex-app-rules-engine-deployment.yaml @@ -97,6 +97,10 @@ spec: name: edgex-init - mountPath: /tmp/edgex/secrets name: edgex-secrets + - mountPath: /kuiper/etc/sources + name: kuiper-sources + - mountPath: /kuiper/etc/connections + name: kuiper-connections {{- end }} {{- if .Values.edgex.resources.appservice.rules.enforceLimits }} resources: @@ -121,4 +125,10 @@ spec: - name: edgex-secrets persistentVolumeClaim: claimName: edgex-secrets + - name: kuiper-sources + persistentVolumeClaim: + claimName: kuiper-sources + - name: kuiper-connections + persistentVolumeClaim: + claimName: kuiper-connections {{- end}} diff --git a/deployment/helm/templates/edgex-pv.yaml b/deployment/helm/templates/edgex-pv.yaml index 18ca1570..84a9e155 100644 --- a/deployment/helm/templates/edgex-pv.yaml +++ b/deployment/helm/templates/edgex-pv.yaml @@ -271,3 +271,39 @@ spec: hostPath: path: "/tmp/nats" {{- end}} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: kuiper-sources +spec: + storageClassName: "" + claimRef: + name: kuiper-sources + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/mnt/kuiper-sources" +{{- end }} +--- +{{- if .Values.edgex.storage.useHostPath }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: kuiper-connections +spec: + storageClassName: "" + claimRef: + name: kuiper-connections + namespace: {{ .Release.Namespace }} + capacity: + storage: 128Mi + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + hostPath: + path: "/mnt/kuiper-connections" +{{- end }} diff --git a/deployment/helm/templates/edgex-pvc.yaml b/deployment/helm/templates/edgex-pvc.yaml index 47fedba7..c478aad0 100644 --- a/deployment/helm/templates/edgex-pvc.yaml +++ b/deployment/helm/templates/edgex-pvc.yaml @@ -242,4 +242,36 @@ spec: resources: requests: storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: kuiper-sources +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: kuiper-connections +spec: + {{- if (eq .Values.edgex.storage.useHostPath true)}} + storageClassName: "" + {{- else }} + storageClassName: "{{.Values.edgex.storage.nonSharedVolumesClassName}}" + {{- end }} + accessModes: + - {{.Values.edgex.storage.nonSharedVolumesAccessMode}} + resources: + requests: + storage: 128Mi {{- end }}