openeuler-riscv / oerv-team

OERV 实习生工作中心
11 stars 43 forks source link

调研 Kubesphere 在 RISC-V 运行所需要的镜像列表 #1001

Closed TimePrinciple closed 1 month ago

TimePrinciple commented 2 months ago

说明

问题背景: KubeSphere 作为一个基于 Kubernetes 的分布式多租户容器管理平台, 提供了友好的用户界面, 以及丰富的功能, 来简化 Kubernetes 的使用和管理,使用户能够更加轻松地部署、管理和运维云原生应用。目前 kubesphere 还不能部署在 RISC-V 上

涉及软件包: kubesphere, kubekey 以及更多

涉及软件包地址: https://github.com/kubesphere/kubesphere https://github.com/kubesphere/kubekey

所需技能: Go, Dockerfile, Cloud Native

TexasOct commented 2 months ago

RISC-V 移植简报

所需 Image List (排除目前已有)

kube-system

kubesphere-system

kubesphere-controls-system

kubesphere-monitoring-system

版本参考 (kubernetes v1.29.1, kubesphere v3.4.1)

root@kube-master:~# crictl images
IMAGE                                                                         TAG                 IMAGE ID            SIZE
registry.cn-beijing.aliyuncs.com/kubesphereio/alertmanager                    v0.23.0             ba2b418f427c0       26.5MB
registry.cn-beijing.aliyuncs.com/kubesphereio/coredns                         1.9.3               5185b96f0becf       14.8MB
registry.cn-beijing.aliyuncs.com/kubesphereio/defaultbackend-amd64            1.4                 846921f0fe0e5       1.82MB
registry.cn-beijing.aliyuncs.com/kubesphereio/flannel-cni-plugin              v1.1.2              7a2dcab94698c       3.84MB
registry.cn-beijing.aliyuncs.com/kubesphereio/flannel                         v0.21.3             0d004b381af6c       24.2MB
registry.cn-beijing.aliyuncs.com/kubesphereio/k8s-dns-node-cache              1.22.20             ff71cd4ea5ae5       30.5MB
registry.cn-beijing.aliyuncs.com/kubesphereio/ks-apiserver                    v3.4.1              c486abe6f1cc8       65.8MB
registry.cn-beijing.aliyuncs.com/kubesphereio/ks-console                      v3.4.1              aa81987f764d3       51.7MB
registry.cn-beijing.aliyuncs.com/kubesphereio/ks-controller-manager           v3.4.1              2a2294b6c6af0       50.3MB
registry.cn-beijing.aliyuncs.com/kubesphereio/ks-installer                    v3.4.1              d6ce52546e1c3       156MB
registry.cn-beijing.aliyuncs.com/kubesphereio/kube-apiserver                  v1.29.1             53b148a9d1963       35.1MB
registry.cn-beijing.aliyuncs.com/kubesphereio/kube-controller-manager         v1.29.1             79d451ca186a6       33.4MB
registry.cn-beijing.aliyuncs.com/kubesphereio/kube-proxy                      v1.29.1             43c6c10396b89       28.4MB
registry.cn-beijing.aliyuncs.com/kubesphereio/kube-rbac-proxy                 v0.11.0             29589495df8d9       19.2MB
registry.cn-beijing.aliyuncs.com/kubesphereio/kube-scheduler                  v1.29.1             406945b511542       18.5MB
registry.cn-beijing.aliyuncs.com/kubesphereio/kube-state-metrics              v2.6.0              ec6e2d871c544       12MB
registry.cn-beijing.aliyuncs.com/kubesphereio/kubectl                         v1.22.0             30c7baa8e18c0       26.6MB
registry.cn-beijing.aliyuncs.com/kubesphereio/linux-utils                     3.3.0               e88cfb3a763b9       26.9MB
registry.cn-beijing.aliyuncs.com/kubesphereio/node-exporter                   v1.3.1              1dbe0e9319764       10.3MB
registry.cn-beijing.aliyuncs.com/kubesphereio/notification-manager-operator   v2.3.0              7ffe334bf3772       19.3MB
registry.cn-beijing.aliyuncs.com/kubesphereio/notification-manager            v2.3.0              2c35ec9a2c185       21.6MB
registry.cn-beijing.aliyuncs.com/kubesphereio/notification-tenant-sidecar     v3.2.0              4b47c43ec6ab6       14.7MB
registry.cn-beijing.aliyuncs.com/kubesphereio/pause                           3.9                 e6f1816883972       321kB
registry.cn-beijing.aliyuncs.com/kubesphereio/prometheus-config-reloader      v0.55.1             7c63de88523a9       4.84MB
registry.cn-beijing.aliyuncs.com/kubesphereio/prometheus-operator             v0.55.1             b30c215b787f5       14.3MB
registry.cn-beijing.aliyuncs.com/kubesphereio/prometheus                      v2.39.1             6b9895947e9e4       88.5MB
registry.cn-beijing.aliyuncs.com/kubesphereio/provisioner-localpv             3.3.0               739e82fed8b2c       28.8MB
registry.cn-beijing.aliyuncs.com/kubesphereio/snapshot-controller             v4.0.0              f1d8a00ae690f       19MB

所需配置

网络层的默认配置需要从 Calico 切换为 Flannel

apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
  name: all-in-one
spec:
  hosts:
  ##You should complete the ssh information of the hosts
  - {name: kube-master, address: 192.168.30.21, internalAddress: 192.168.30.21, user: root, password: "2002"}
  roleGroups:
    etcd:
    - kube-master
    master:
    - kube-master
    worker:
    - kube-master
  controlPlaneEndpoint:
    ##Internal loadbalancer for apiservers
    #internalLoadbalancer: haproxy
    ##If the external loadbalancer was used, 'address' should be set to loadbalancer's ip.
    domain: lb.kubesphere.local
    address: "192.168.30.21"
    port: 6443
  kubernetes:
    version: v1.29.1
    clusterName: cluster.local
    proxyMode: ipvs
    masqueradeAll: false
    maxPods: 110
    nodeCidrMaskSize: 24
  network:
    plugin: flannel # chang to flannel
    kubePodsCIDR: 10.233.64.0/18
    kubeServiceCIDR: 10.233.0.0/18
  registry:
    privateRegistry: ""
TexasOct commented 2 months ago

问题描述

ks-console 编译存在问题,具体情况与其使用的 nodejs 有关,视情况需要大幅度的改变依赖。

当前的 nodejs 14 在 RISC-V 中没有较为稳定可靠的构筑,所以为了一些稳定性考量,我们决定将 nodejs 的版本从 14 迁为 16 , 但由于当前 ks-console 中的 package.json 的部分包,如 node-sass 之类的,在 nodejs 16 下会产生依赖问题导致编译无法通过,需要改变依赖并测试,当前我们还在尝试对原项目依赖修改进行并测试,以使得项目能在 nodejs 16 上运行。