kubestellar / kubeflex

A flexible and scalable platform for running Kubernetes control plane APIs.
Apache License 2.0
46 stars 13 forks source link

bug: The CP of type k8s dosen't perfectly support arm64 processors #189

Closed waltforme closed 7 months ago

waltforme commented 7 months ago

Describe the bug

In a CP of type k8s, the kube-apiserver deployment uses kine to connect to the shared postgres. The kine container image is for amd64. https://github.com/kubestellar/kubeflex/blob/2287f51e6346f6f2b05b00ee52eb415cd3784eed/pkg/reconcilers/k8s/deployment.go#L129

This amd64 image can be used on darwin/arm64 because of the Rosetta 2 emulator, but can not be used on linux/arm64. In other words, arm64 is not perfectly supported.

Steps To Reproduce

  1. On a linux/arm64 platform, start one of the KubeStellar e2e test. For example:
    test/e2e/singleton-status/run-test.sh
  2. Observe the hanging of the k8s CP creation.
    + :
    + : -------------------------------------------------------------------------
    + : Create a Workload Description Space wds1 directly in KubeFlex.
    + :
    + kflex create wds1
    ✔ Checking for saved initial context...
    ✔ Switching to initial context...
    ✔ Creating new control plane wds1 of type k8s ...
    ◑ Waiting for API server to become ready...
  3. kubectl edit the kube-apiserver deployment
    kubectl --context kind-kubeflex -n wds1-system edit deploy kube-apiserver

    by replacing

        image: rancher/kine:v0.9.9-amd64

    with

        image: rancher/kine:v0.9.9-arm64
  4. Observe the pass through of the k8s CP creation.

Expected Behavior

A k8s CP can start on linux/arm64.

Additional Context

No response

pdettori commented 7 months ago

@waltforme : @francostellari has been working on a PR for this issue

ezrasilvera commented 7 months ago

@francostellari can you please link the PR to here ?And assign the issue to yourself ?

waltforme commented 7 months ago

Good to know this. Thanks @pdettori @ezrasilvera @francostellari !

francostellari commented 7 months ago

Will be fixed by https://github.com/kubestellar/kubeflex/pull/190

francostellari commented 7 months ago

@waltforme v0.9.9 does not have a multi-arch tag, we need to move to 0.9.8 or >=v0.10.x

pdettori commented 7 months ago

190 has been merged and @francostellari manually tested the fix.