KubeEdge 1.22.0 版本已發佈。新版本對 Beehive 框架以及 Device Model 做了優化升級,同時對邊緣資源管理能力做了提升。
新增特性:
- 新增 hold/release 機制控制邊緣資源更新
- Beehive框架升級,支持配置子模塊重啓策略
- 基於物模型與產品概念的設備模型能力升級
- 邊緣輕量化 Kubelet 新增 Pod Resources Server 和 CSI Plugin 特性開關
- C語言版本的 Mapper-Framework 支持
- 升級 K8s 依賴到1.31
新增 hold/release 機制控制邊緣資源更新
在1.22.0版本中引入了hold/release 機制來管理邊緣資源的更新。
在雲端,用户可以通過對 Deployment、StatefulSet 和 DaemonSet 等資源添加 edge.kubeedge.io/hold-upgrade: "true"的 annotation,表示對應的 Pod 在邊緣更新需要被 hold。
在邊緣,被標記了edge.kubeedge.io/hold-upgrade: "true"的 Pod 會被暫緩被處理。邊緣管理員可以通過執行以下命令來釋放對該 Pod 的鎖,完成資源更新。
keadmctlunhold-upgradepod<pod-name>
也可以執行以下命令解鎖邊緣節點上所有被 hold 的邊緣資源。
keadmctlunhold-upgradenode
注意:
使用keadm ctl命令需要啓動 DynamicController 和 MetaServer 開關。
更多信息可參考:
- https://github.com/kubeedge/kubeedge/pull/6348
- https://github.com/kubeedge/kubeedge/pull/6418
Beehive框架升級,支持配置子模塊重啓策略
在1.17版本中實現了 EdgeCore 模塊的自重啓,可以通過全局配置來設置邊緣模塊的重啓。在1.22版本中對 Beehive 框架進行了升級優化,支持邊緣子模塊級別的重啓策略配置。同時統一了 Beehive 各子模塊啓動的錯誤處理方式,對子模塊能力標準化。
更多信息可參考:
- https://github.com/kubeedge/kubeedge/pull/6444
- https://github.com/kubeedge/kubeedge/pull/6445
基於物模型與產品概念的設備模型能力升級
目前的 Device Model 基於物模型概念設計,而在傳統 IoT 中,設備通常採用物模型、產品和設備實例三層結構進行設計,可能導致用户在實際使用中產生困惑。
在 1.22.0 版本中結合物模型與實際產品的概念,對設備模型的設計進行了升級。從現有的設備實例中提取了 protocolConfigData , visitors 字段到設備模型中,設備實例可以共享這些模型配置。同時,為了降低模型分離的成本,設備實例可以重寫覆蓋以上配置。
更多信息可參考:
- https://github.com/kubeedge/kubeedge/pull/6457
- https://github.com/kubeedge/kubeedge/pull/6458
邊緣輕量化 Kubelet 新增 Pod Resources Server 和 CSI Plugin 特性開關
在之前的版本中在 EdgeCore 集成的輕量化 Kubelet 中移除了 Pod Resources Server 能力,但在一些使用場景中,用户希望恢復該能力以實現對Pod的監控等。同時,由於 Kubelet 默認啓動 CSI Plugin,離線環境下啓動 EdgeCore 會由於 CSINode 創建失敗而導致失敗。
在 1.22.0 版本中在輕量化 Kubelet 中新增了 Pod Resources Server 和 CSI Plugin 特性開關,如果你需要啓用 Pod Resources Server 或關閉 CSI Plugin,可以在 EdgeCore 配置中添加如下特性開關:
apiVersion:edgecore.config.kubeedge.io/v1alpha2
kind:EdgeCore
modules:
edged:
tailoredKubeletConfig:
featureGates:
KubeletPodResources:true
DisableCSIVolumePlugin:true
...
更多信息可參考:
- https://github.com/kubeedge/kubernetes/pull/12
- https://github.com/kubeedge/kubernetes/pull/13
- https://github.com/kubeedge/kubeedge/pull/6452
C語言版本 Mapper-Framework 支持
在1.20.0版本中,在原有的 go 語言版本 Mapper 工程基礎上,新增了 Java 版本的 Mapper-Framework。由於邊緣 IoT 設備通信協議的多樣性,很多邊緣設備驅動協議都是基於 C語言實現的,因此在新版本中,KubeEdge 提供了 C語言版本的 Mapper-Framework,用户可以訪問 KubeEdge 主倉庫的 feature-multilingual-mapper-c 分支,利用 Mapper-Framework 生成 C語言版本的自定義 Mapper 工程。
更多信息可參考:
- https://github.com/kubeedge/kubeedge/pull/6405
- https://github.com/kubeedge/kubeedge/pull/6455
升級 K8s 依賴到1.31
新版本將依賴的 Kubernetes 版本升級到v1.31.12,可以在雲和邊緣使用新版本的特性。
更多信息可參考:
- https://github.com/kubeedge/kubeedge/pull/6443