Skip to content

[release-1.0] Add version alias support (#566)#662

Merged
istio-testing merged 1 commit intoistio-ecosystem:release-1.0from
luksa:cherrypick-566
Feb 18, 2025
Merged

[release-1.0] Add version alias support (#566)#662
istio-testing merged 1 commit intoistio-ecosystem:release-1.0from
luksa:cherrypick-566

Conversation

@luksa
Copy link
Copy Markdown
Contributor

@luksa luksa commented Feb 18, 2025

  • Refactor version management to use new istioversions package
  • Moved supportedversion into pkg/istioversions
  • Embeded versions.yaml into the binary
  • Updated Makefile and scripts to reference the new versions.yaml location in pkg/istioversions.
  • Replaced instances of supportedversion with istioversions in various controller tests and integration tests.
  • Add alias support in istioversions

  • Introduce alias in the controller

  • Fix tests for alias

  • Fix version value format

  • Add comments to pkg/istioversions/versions.go

  • Support for different versions YAML files

  • Automatically update aliases

  • Remove 'latest' and create an alias called 'master'

  • Include alias as part of the installation tests

  • Update tests

  • Resolve version name for IstioCNI and ZTunnel

  • Update tests

  • Update types validation

  • Apply suggestions in the reviews

  • Change 'alias' to 'aliases' in version.yaml

  • Skip sample pod specs when running under an alias version

  • Make consistent naming

  • Fix test style

  • Change version.yaml structure

  • Update tests and rename

  • Fix tests

  • Remove version alias in IstioRevision

  • Fix a test

The error was "no namespace specified" and the reconciliation of the active revision path was never entered. A namespace is added into the spec and the error in the reconcileActiveRevision path is triggered.

  • Fix a rebase error

  • Update field name to use ref

  • Simplify versions.yaml loading logic

  • Lint

  • Fix list_only_latest() func

  • Introduce VERSIONS_YAML_PATH

  • Rename to istioversion

  • Reword error message

  • Fix update_alias()

  • Update package path references

  • Fix import error

  • Update versions.yaml definition

In versions.yaml, Ref is now a reference to the name of a version.

* Refactor version management to use new istioversions package

- Moved supportedversion into pkg/istioversions
- Embeded versions.yaml into the binary
- Updated Makefile and scripts to reference the new versions.yaml location in pkg/istioversions.
- Replaced instances of supportedversion with istioversions in various controller tests and integration tests.

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Add alias support in istioversions

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Introduce alias in the controller

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix tests for alias

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix version value format

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Add comments to pkg/istioversions/versions.go

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Support for different versions YAML files

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Automatically update aliases

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Remove 'latest' and create an alias called 'master'

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Include alias as part of the installation tests

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Update tests

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Resolve version name for IstioCNI and ZTunnel

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Update tests

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Update types validation

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Apply suggestions in the reviews

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Change 'alias' to 'aliases' in version.yaml

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Skip sample pod specs when running under an alias version

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Make consistent naming

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix test style

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Change version.yaml structure

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Update tests and rename

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix tests

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Remove version alias in IstioRevision

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix a test

The error was "no namespace specified" and the reconciliation of the active revision path was never entered. A namespace is added into the spec and the error in the `reconcileActiveRevision` path is triggered.

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Fix a rebase error

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Update field name to use `ref`

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Simplify `versions.yaml` loading logic

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Lint

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Fix list_only_latest() func

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>

* Introduce VERSIONS_YAML_PATH

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Rename to istioversion

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Reword error message

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Fix update_alias()

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Update package path references

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Fix import error

Signed-off-by: Yann Liu <yannliu@redhat.com>

* Update versions.yaml definition

In versions.yaml, `Ref` is now a reference to the name of a version.

Signed-off-by: Yann Liu <yannliu@redhat.com>

---------

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Co-authored-by: Daniel Grimm <dgrimm@redhat.com>
@luksa luksa requested a review from a team as a code owner February 18, 2025 08:24
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 78.57143% with 15 lines in your changes missing coverage. Please review.

Project coverage is 74.30%. Comparing base (8ded98d) to head (670c522).
Report is 1 commits behind head on release-1.0.

Files with missing lines Patch % Lines
controllers/ztunnel/ztunnel_controller.go 0.00% 10 Missing ⚠️
controllers/istiocni/istiocni_controller.go 72.72% 2 Missing and 1 partial ⚠️
pkg/istioversion/version.go 95.34% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           release-1.0     #662      +/-   ##
===============================================
- Coverage        74.44%   74.30%   -0.14%     
===============================================
  Files               42       42              
  Lines             2559     2584      +25     
===============================================
+ Hits              1905     1920      +15     
- Misses             562      570       +8     
- Partials            92       94       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@istio-testing istio-testing merged commit 4aa187d into istio-ecosystem:release-1.0 Feb 18, 2025
Copy link
Copy Markdown
Contributor

@yannuil yannuil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

openshift-service-mesh-bot referenced this pull request in openshift-service-mesh-bot/sail-operator Feb 24, 2025
* upstream/release-1.0:
  Make environment variable consistent (openshift-service-mesh#664)
  Add multi control plane e2e tests (openshift-service-mesh#610) (openshift-service-mesh#670)
  Ensure e2e tests use the correct versions yaml file (openshift-service-mesh#667) (openshift-service-mesh#669)
  Add version alias support  (openshift-service-mesh#566) (openshift-service-mesh#662)
  Add missing link for: Example using the RevisionBased strategy and an IstioRevisionTag

# Conflicts:
#	bundle/manifests/sailoperator.clusterserviceversion.yaml
mkralik3 pushed a commit to mkralik3/sail-operator that referenced this pull request Mar 23, 2026
Co-authored-by: openshift-service-mesh-bot <null>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants