Skip to content

Conversation

michi-covalent
Copy link
Contributor

Derive the default Cilium version from the source using vendored cilium/charts instead of injecting it at compile time. This helps ensure that the default version is consistent across all the downstream cilium-cli packages.

Fixes: cilium/cilium-cli#2870

Derive the default Cilium version from the source using vendored
cilium/charts instead of injecting it at compile time. This helps ensure
that the default version is consistent across all the downstream
cilium-cli packages.

Fixes: cilium/cilium-cli#2870

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Dec 3, 2024
@michi-covalent michi-covalent added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Dec 3, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Dec 3, 2024
@github-actions github-actions bot added cilium-cli This PR contains changes related with cilium-cli cilium-cli-exclusive This PR only impacts cilium-cli binary labels Dec 3, 2024
@michi-covalent
Copy link
Contributor Author

% make
CGO_ENABLED=0 go build  \
        -ldflags "-w -s -X 'github.com/cilium/cilium/cilium-cli/defaults.CLIVersion=v1.17.0-pre.3-41-g544d680f9e'" \
        -o cilium \
        ./cmd/cilium

% ./cilium version --client
cilium-cli: v1.17.0-pre.3-41-g544d680f9e compiled with go1.23.3 on linux/amd64
cilium image (default): v1.16.4
cilium image (stable): v1.16.4

% ./cilium install -h | grep "\--version"
      --version string           Cilium version to install (default "v1.16.4")

% ./cilium upgrade -h | grep "\--version"
      --version string           Cilium version to install (default "v1.16.4")

@michi-covalent
Copy link
Contributor Author

@tklauser something like this for cilium-cli release note entry 🚀🙏

Cilium CLI now derives the default Cilium version to install from the source instead of injecting it at compile time. You no longer need to set github.com/cilium/cilium/cilium-cli/defaults.CLIVersion using -ldflags while compiling Cilium CLI.

@michi-covalent
Copy link
Contributor Author

/test

@michi-covalent michi-covalent marked this pull request as ready for review December 4, 2024 00:22
@michi-covalent michi-covalent requested review from a team as code owners December 4, 2024 00:22
@michi-covalent michi-covalent added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit deeaf8b Dec 4, 2024
224 checks passed
@michi-covalent michi-covalent deleted the pr/michi/cilium-cli-default branch December 4, 2024 09:56
@Foxboron
Copy link

Foxboron commented Dec 7, 2024

@michi-covalent The suggested release note was not included it seems? Just has the github autogenerated ones.

@michi-covalent
Copy link
Contributor Author

oh yeah thanks for the heads up. tobias, i updated the release notes here => https://github.com/cilium/cilium-cli/releases/tag/v0.16.21 🚀🙏

michi-covalent added a commit to cilium/cilium-cli that referenced this pull request Dec 9, 2024
Now Cilium CLI sets the default Cilium version without relying on the
compile-time flag [^1].

[^1]: cilium/cilium#36344

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
tklauser pushed a commit to cilium/cilium-cli that referenced this pull request Dec 10, 2024
Now Cilium CLI sets the default Cilium version without relying on the
compile-time flag [^1].

[^1]: cilium/cilium#36344

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
michi-covalent added a commit that referenced this pull request Feb 28, 2025
- Include the top-level Makefile.defs, and re-use GO and INSTALL
  variables.
- Remove unused THIS_DIR variable [^1].
- Explicitly set GO_BUILD_LDFLAGS variable. Cilium and Cilium CLI use
  different Go build flags.

[^1]: #36344

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
michi-covalent added a commit that referenced this pull request Feb 28, 2025
- Include the top-level Makefile.defs, and re-use GO and INSTALL
  variables.
- Remove unused THIS_DIR variable [^1].
- Explicitly set BINDIR and GO_BUILD_LDFLAGS variable. Cilium and Cilium
  CLI use different values for these settings.

[^1]: #36344

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request Feb 28, 2025
- Include the top-level Makefile.defs, and re-use GO and INSTALL
  variables.
- Remove unused THIS_DIR variable [^1].
- Explicitly set BINDIR and GO_BUILD_LDFLAGS variable. Cilium and Cilium
  CLI use different values for these settings.

[^1]: #36344

Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cilium-cli This PR contains changes related with cilium-cli cilium-cli-exclusive This PR only impacts cilium-cli binary release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

curl'ing stable.txt from cilium/cilium makes builds unreproducible.
4 participants