karmada
karmada copied to clipboard
karmadactl init image default tag use latest
Task description: Optimize the debug karmadactl process
Solution: https://github.com/karmada-io/karmada/blob/6687479543631e781f2e58371cb09c42aab70753/pkg/version/release.go#L40-L46 Revised
// PatchRelease returns the stable version with format "vx.y.z".
func (r *ReleaseVersion) PatchRelease() string {
if r.Version == nil {
return "latest"
}
return fmt.Sprintf("v%d.%d.%d", r.Version.Major(), r.Version.Minor(), r.Version.Patch())
}
Who can join or take the task:
The good first issue is intended for first-time contributors
to get started on his/her contributor journey.
After a contributor has successfully completed 1-2 good first issue's,
they should be ready to move on to help wanted
items, saving the remaining good first issue
for other new contributors.
How to join or take the task:
Just reply on the issue with the message /assign
in a separate line.
Then, the issue will be assigned to you.
How to ask for help:
If you need help or have questions, please feel free to ask on this issue. The issue author or other members of the community will guide you through the contribution process.
@RainbowMango Can such changes be made?
/assign
@RainbowMango Can such changes be made?
Why? And, what's the benefit?
@RainbowMango Can such changes be made?
Why? And, what's the benefit?
Versions are automatically injected when making a make, but not when debugging
I'm currently using vscode launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "cmd/karmadactl",
"args": [
"init",
"--kube-image-mirror-country=cn",
"-p=32444",
"--etcd-storage-mode=emptyDir",
"--crds=https://github.com/karmada-io/karmada/releases/download/v1.5.0/crds.tar.gz",
"--karmada-scheduler-image=docker.io/karmada/karmada-scheduler:v1.5.0",
"--karmada-webhook-image=docker.io/karmada/karmada-webhook:v1.5.0"
]
}
]
}
After optimization, I can pay more attention to the parts I want to debug. When debugging in a new environment, I do not need to configure the path of karmada related images, but use the latest image.
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "cmd/karmadactl",
"args": [
"init",
"--kube-image-mirror-country=cn",
"-p=32444",
"--etcd-storage-mode=emptyDir",
"--crds=/root/karmada/crds.tar.gz",
]
}
]
}
I'm not familiar with the vscode launch.json
, and don't get the pain point here.
But the version
package provides common functionalities, I don't think it's a good idea to change the behavior here.
-1 for this, Please just provide a stable version of karamda to the user by default.
This is not true, latest will only be exported when debug, normal users are using make out karmadactl, there will be no latest @RainbowMango @liangyuanpeng
Please just provide a stable version of karamda to the user by default.
I think i misunderstood, i got the nil version when i run command of make
for karmada. Do you mean change
@helen-frank
lan@lan:~/repo/git/karmada$ _output/bin/linux/amd64/karmadactl init -h
...
--karmada-aggregated-apiserver-image='docker.io/karmada/karmada-aggregated-apiserver:<nil>':
Karmada aggregated apiserver image
--crds='https://github.com/karmada-io/karmada/releases/download/<nil>/crds.tar.gz':
Karmada crds resource.(local file e.g. --crds /root/crds.tar.gz)
...
Please just provide a stable version of karamda to the user by default.
I think i misunderstood, i got the nil version when i run command of
make
for karmada. Do you mean change to "latest".@helen-frank
lan@lan:~/repo/git/karmada$ _output/bin/linux/amd64/karmadactl init -h ... --karmada-aggregated-apiserver-image='docker.io/karmada/karmada-aggregated-apiserver:<nil>': Karmada aggregated apiserver image --crds='https://github.com/karmada-io/karmada/releases/download/<nil>/crds.tar.gz': Karmada crds resource.(local file e.g. --crds /root/crds.tar.gz) ...
yes
I'm following the karmadactl CI to run e2e at local,and just got the error :(
$:k describe po -n karmada-system karmada-aggregated-apiserver-78b74b56c4-dvrzf
...
Normal Scheduled 73s default-scheduler Successfully assigned karmada-system/karmada-aggregated-apiserver-78b74b56c4-dvrzf to karmada-host-control-plane
Warning InspectFailed 4s (x7 over 72s) kubelet Failed to apply default image tag "docker.io/karmada/karmada-aggregated-apiserver:<nil>": couldn't parse image reference "docker.io/karmada/karmada-aggregated-apiserver:<nil>": invalid reference format
...
Easy to reproduce it:
- git clone --depth 1 https://github.com/karmada-io/karmada.git
- cd karmada
- export CLUSTER_VERSION=kindest/node:v1.26.0
- hack/cli-testing-environment.sh
But CI is working, I'm looking to see what the magic is. 🤔
Is it related with this issue? @helen-frank
I'm following the karmadactl CI to run e2e at local,and just got the error :(
$:k describe po -n karmada-system karmada-aggregated-apiserver-78b74b56c4-dvrzf ... Normal Scheduled 73s default-scheduler Successfully assigned karmada-system/karmada-aggregated-apiserver-78b74b56c4-dvrzf to karmada-host-control-plane Warning InspectFailed 4s (x7 over 72s) kubelet Failed to apply default image tag "docker.io/karmada/karmada-aggregated-apiserver:<nil>": couldn't parse image reference "docker.io/karmada/karmada-aggregated-apiserver:<nil>": invalid reference format ...
Easy to reproduce it:
- git clone --depth 1 https://github.com/karmada-io/karmada.git
- cd karmada
- export CLUSTER_VERSION=kindest/node:v1.26.0
- hack/cli-testing-environment.sh
But CI is working, I'm looking to see what the magic is. 🤔
Is it related with this issue? @helen-frank
It should not be, and I have tested it and can start normally. My change is applied to the debug phase. when version information is not injected, image gets nil, hack/cli-testing-environment.sh has make karmadactl in line 30, and version information has been injected here.
hey , I am a beginner and new to this repo, can anyone tell is this project is enrolled in LFX mentorship 2024. I would be grateful if someone can point out to a resource to understand the karmada? I am a college student ,only know web devlopment and DSA but have a passion to contribute in open source.
@CodexRaunak visit the Blogs and Documentation, Ask doubts on Slack if you further face any issues. The LFX part is uncertain
/assign
Hi @helen-frank , @RainbowMango Is the issue fixed , cause I find a commit that edited the file. Please let me know if it is already fixed.
Can I contribute to this issue?