karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.11k stars 803 forks source link

local-up-karmada.sh cannot using other version but "latest " #3628

Closed zishen closed 1 month ago

zishen commented 10 months ago

What happened: When I want to setup Karmada by using local-up-karmada.sh, I found it is not work if I change export VERSION="latest" to export VERSION="v1.5.1". The kind container also has latest tag images. And karmada is stiil using latest tag image.

What you expected to happen: The kind container using the special tag images which I assign in local-up-karmada.sh. And karmada is using the same one.

How to reproduce it (as minimally and precisely as possible): Just assign another VERSION in local-up-karmada.sh

Anything else we need to know?: none

Environment:

yike21 commented 10 months ago

Hi! Using local-up-karmada.sh will build images based on current code with export VERSION="latest", so tag is always "latest".

I'm not sure how to assign another VERSION in local-up-karmada.sh. To get the specified version of the component, maybe you can first clone the target version source code, then use make image-{component-name}.

jwcesign commented 10 months ago

If you want to build a specific version, you can clone the repo and checkout to the particular tag, then run local-up-karmada.sh

zishen commented 9 months ago

If you want to build a specific version, you can clone the repo and checkout to the particular tag, then run local-up-karmada.sh

Hi! Using local-up-karmada.sh will build images based on current code with export VERSION="latest", so tag is always "latest".

I'm not sure how to assign another VERSION in local-up-karmada.sh. To get the specified version of the component, maybe you can first clone the target version source code, then use make image-{component-name}.

I have tried to assign VERSION in local-up-karmada.sh, but only the code change and the image's version out of kind changed. The images's version in kind not.

I think the point is yaml using the latest tag.

mrequena commented 8 months ago

The same happens when I use remote-up-karmada.sh, i.e. the latest version is used for all the karmada components. Both scripts (local-up-karmada.sh and remote-up-karmada.sh) use the script deploy-karmada.sh and this script uses the yaml files in artifacts/deploy that contains the "latest" tag for all the images.

Could it be a solution to introduce a variable {{karmada_version}} in the yaml files in artifacts/deploy and then add the sed lines to put the karmada version for all the karmada components with something like?

sed -i'' -e "s/{{karmada_version}}/${KARMADA_VERSION}/g" "${TEMP_PATH_APISERVER}"/karmada-apiserver.yaml

Or is there another reason why in these yaml files always the "latest" version is used?

Is there other way to install a specific version of Karmada? Thanks

RainbowMango commented 8 months ago

Or is there another reason why in these yaml files always the "latest" version is used?

These yamls as well as local-up-karmada.sh are used for the development and the CI, that usually runs against lastest code.

Is there other way to install a specific version of Karmada?

The local-up-karmada.sh is also often used by people to evaluate the project, I think it makes sense to launch Karmada system with a specific version.

Could it be a solution to introduce a variable {{karmada_version}} in the yaml files in artifacts/deploy and then add the sed lines to put the karmada version for all the karmada components with something like?

I'm not sure, but it might be challenging as it might be involved too much.

mrequena commented 8 months ago

These yamls as well as local-up-karmada.sh are used for the development and the CI, that usually runs against lastest code.

I totally understand but then what is the recommended way to install a specific version?

I'm not sure, but it might be challenging as it might be involved too much.

What kind of challenges do you foresee? I would like to patch the yaml files and the scripts, so your advice is highly appreciated.

zishen commented 8 months ago

These yamls as well as local-up-karmada.sh are used for the development and the CI, that usually runs against lastest code.

I totally understand but then what is the recommended way to install a specific version?

I'm not sure, but it might be challenging as it might be involved too much.

What kind of challenges do you foresee? I would like to patch the yaml files and the scripts, so your advice is highly appreciated.

My opinion is copy the yaml files to a temporary directory like /tmp. And delete them when deloy karmada ok.

XiShanYongYe-Chang commented 1 month ago

As a lack of activity, let's close this first, feel free to reopen it if you still need it. /close

karmada-bot commented 1 month ago

@XiShanYongYe-Chang: Closing this issue.

In response to [this](https://github.com/karmada-io/karmada/issues/3628#issuecomment-1976439116): >As a lack of activity, let's close this first, feel free to reopen it if you still need it. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.