kubestellar / kubestellar

KubeStellar - a flexible solution for challenges associated with multi-cluster configuration management for edge, multi-cloud, and hybrid cloud
https://kubestellar.io
Apache License 2.0
262 stars 60 forks source link

feature: add linux/s390x platform support to syncer #732

Closed ronenkat closed 1 year ago

ronenkat commented 1 year ago

Feature Description

I would like to run the syncer on s390x architecture.

Proposed Solution

Add linux/s390x as an additional architecture in ARCHS in the following files:

  1. goreleaser.yml
  2. create kubestellar syncer image.yml

Am I missing something?

Want to contribute?

Additional Context

No response

clubanderson commented 1 year ago

@yana1205 can you help @ronenkat with this request?

clubanderson commented 1 year ago

@MikeSpreitzer fyi

clubanderson commented 1 year ago

@yuji-watanabe-jp can you help us prioritize this request with @yana1205 ?

yuji-watanabe-jp commented 1 year ago

@clubanderson ok, @yana1205 will pick this.

clubanderson commented 1 year ago

Thank you @yuji-watanabe-jp

yana1205 commented 1 year ago

I added linux/s390x and have opened the PR (https://github.com/kubestellar/kubestellar/pull/743).

@clubanderson Although I added the linux/s390, it seems that https://github.com/kubestellar/kubestellar/blob/main/.github/workflows/goreleaser.yml runs only at tagging a version. Could you please manage to tag a version to build and push the image?

@ronenkat For a confirmation, I created and published linux/s390x image on my ghcr.io.

make build-kubestellar-syncer-image DOCKER_REPO=ghcr.io/yana1205/kubestellar/syncer IMAGE_TAG=dev-2023-06-05 ARCHS=linux/amd64,linux/arm64,linux/s390x

Could you make sure this image (ghcr.io/yana1205/kubestellar/syncer:dev-2023-06-05) works on your linux/s390x environment?

docker pull ghcr.io/yana1205/kubestellar/syncer:dev-2023-06-05
clubanderson commented 1 year ago

Thank you @yana1205. Always appreciated. I Knew you would make quick work of this.

Thank you @yuji-watanabe-jp for helping.

clubanderson commented 1 year ago

I will create an image later tonight.

clubanderson commented 1 year ago

tagged version is now available. @ronenkat can you test?

MikeSpreitzer commented 1 year ago

We still have not resolved the self-reference issue wrt the syncer image. Release 0.3.1 (https://github.com/kubestellar/kubestellar/blob/v0.3.1/scripts/kubectl-kubestellar-prep_for_syncer#L37) references the syncer of release 0.3.0.

ronenkat commented 1 year ago

hi @clubanderson @yana1205 I tried to deploy v0.3.1 image of the syncer, but it fails. I don't think the image has s390x support. When exploring the image I don't see any reference to s390x tags (see here), you can easily see references to x86 and arm64.

When deploying on k8s I get:

  Normal   Pulling    47s (x3 over 89s)  kubelet            Pulling image "quay.io/kubestellar/syncer:v0.3.1"
  Warning  Failed     46s (x3 over 88s)  kubelet            Failed to pull image "quay.io/kubestellar/syncer:v0.3.1": rpc error: code = NotFound desc = failed to pull and unpack image "quay.io/kubestellar/syncer:v0.3.1": no match for platform in manifest: not found

Looking at how ko builds images, I tried to find out if cgr.dev/chainguard/static has an image for s390x, but couldn't find the platforms for which chainguard/static is available.

yana1205 commented 1 year ago

I'm not sure how v0.3.1 was pushed to quay. I don't have the permission.

By the way, I have just created and pushed the same image on my quay.io account in addition to ghcr.io I did at https://github.com/kubestellar/kubestellar/issues/732#issuecomment-1620838126.

@ronenkat Could you try this image to see if it works until the official image (kubestellar/syncer:v0.3.1) is available? quay.io/yanagawa_takumi1205/kubestellar-syncer:v0.3.1

I can see linux/s390x is marked along with linux/amd64 and linux/arm64. https://quay.io/repository/yanagawa_takumi1205/kubestellar-syncer?tab=tags

Looking at how ko builds images, I tried to find out if cgr.dev/chainguard/static has an image for s390x, but couldn't find the platforms for which chainguard/static is available.

I also created and published another syncer image by gorelease with linux/s390x arch and explicitly setting base_image: cgr.dev/chainguard/static in .gorelease.yaml (https://goreleaser.com/customization/ko/). The published image is quay.io/yanagawa_takumi1205/kubestellar-syncer:latest.

ronenkat commented 1 year ago

quay.io/yanagawa_takumi1205/kubestellar-syncer:v0.3.1

Running nicely - quay.io/yanagawa_takumi1205/kubestellar-syncer:v0.3.1 Next I will check it actually does what it needs to do, but not expecting any issues with that....

clubanderson commented 1 year ago

@MikeSpreitzer can you figure out what is going on with goreleaser gh action? https://github.com/kubestellar/kubestellar/actions/runs/5464897374/jobs/9947561409

clubanderson commented 1 year ago

new tagged release is available with s390 image, and new quay image is available for syncer at quay.io