edgeDevice
apiVersion: v0
import "github.com/edgenesis/shifu/pkg/k8s/crd"
EdgeDevice
EdgeDevice is a custom resource created by Kubernetes CRD that represents a virtualized digital twin of a physical IoT device.
- apiVersion: v1alpha1
- kind: EdgeDevice
- metadata
Standard Kubernetes ObjectMeta. - spec (Spec)
Describes the specification of an EdgeDevice. - status (EdgeDeviceStatus)
Describes the observed status of the EdgeDevice.
EdgeDeviceSpec
EdgeDeviceSpec is the description of an EdgeDevice.
Sku
Hardware model of an EdgeDevice, e.g. Siemens S7-1200
.
- sku (string) required
Connection
Indicates how the EdgeDevice connects to Shifu.
- connection (Connection) required
- Connection (string)
Indicates the connection method, which has to be Ethernet (for now).
- Connection (string)
Address
Connection address of the EdgeDevice, the format varies depending on the protocol.
- address (string) required
Protocol
Connection protocol of the EdgeDevice.
- protocol (Protocol) required
- Protocol (string)
indicates the connection protocol, which has to beHTTP
,HTTPCommandline
,MQTT
,OPCUA
,Socket
orPLC4X
(for now).
- Protocol (string)
ProtocolSettings
Settings of EdgeDevice connection protocol.
- protocolSettings (ProtocolSettings)
- MQTTSetting (MQTTSetting)
- MQTTTopic (string)
subscription of MQTT topic, e.g./test/test
.
- MQTTTopic (string)
- OPCUASetting (OPCUASetting)
- OPCUAEndpoint (string)
server address of OPC UA, e.g.opc.tcp://192.168.0.1:4840/test/server
. - SecurityMode (string)
message encryption mode of OPC UA, which has to beNone
(for now). - Username (string)
connection authentication username of OPC UA, e.g.operator
. - Password (string)
connection authentication password of OPC UA, e.g.password
. - ConnectionTimeoutInMilliseconds (int64)
requested connection milliseconds for OPC UA, e.g.1000
.
- OPCUAEndpoint (string)
- SocketSetting (SocketSetting)
- encoding (string)
encoding of the socket connection, optionallyutf-8
orhex
, the default value isutf-8
. - NetworkType (string)
protocol of the socket link, which has to betcp
(for now). - bufferLength (int)
buffer size of the socket when transferring data, the default value is 1024.
- encoding (string)
- PLC4XSetting (PLC4XSetting)
- protocol (Plc4xProtocol)
protocol used by plc4x to connect to the device.
- protocol (Plc4xProtocol)
- MQTTSetting (MQTTSetting)
Plc4xProtocol(enum)
Plc4xProtocolS7 = "s7"
Plc4xProtocolADS = "ads"
Plc4xProtocolBACnet = "bacnet"
Plc4xProtocolCBus = "cbus"
Plc4xProtocolEip = "eip"
Plc4xProtocolKnx = "knx"
Plc4xProtocolModbusAscii = "modbus-ascii"
Plc4xProtocolModbusRTU = "modbus-rtu"
Plc4xProtocolModbusTcp = "modbus-tcp"
CustomMetadata
Additional information about the EdgeDevice.
- customMetadata (string: string)
additional information, e.g.ChargingTime: 9h
.
EdgeDeviceStatus
Current status information
EdgeDevicePhase (will automatically update based on device telemetry)
Current state of EdgeDevice.
- edgedevicephase (EdgeDevicePhase)
- EdgeDevicePhase (string)
State of EdgeDevice, has to bePending
,Running
,Failed
orUnknown
.
- EdgeDevicePhase (string)