Skip to content

Add version alias support #566

Merged
istio-testing merged 36 commits intoistio-ecosystem:mainfrom
yannuil:version-alias
Feb 17, 2025
Merged

Add version alias support #566
istio-testing merged 36 commits intoistio-ecosystem:mainfrom
yannuil:version-alias

Conversation

@yannuil
Copy link
Copy Markdown
Contributor

@yannuil yannuil commented Jan 21, 2025

What type of PR is this?

  • Enhancement / New Feature
  • Bug Fix
  • Refactor
  • Optimization
  • Test
  • Documentation Update

This PR addresses #405 .

@yannuil yannuil requested a review from a team as a code owner January 21, 2025 09:32
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Jan 21, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@istio-testing
Copy link
Copy Markdown
Collaborator

Hi @yannuil. Thanks for your PR.

I'm waiting for a istio-ecosystem or istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown
Collaborator

@dgn dgn left a comment

Choose a reason for hiding this comment

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

looks good so far. minor issues

@dgn
Copy link
Copy Markdown
Collaborator

dgn commented Jan 21, 2025

/cherry-pick release-1.0

@istio-testing
Copy link
Copy Markdown
Collaborator

@dgn: once the present PR merges, I will cherry-pick it on top of release-1.0 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@yannuil
Copy link
Copy Markdown
Contributor Author

yannuil commented Jan 21, 2025

/retest

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 22, 2025

Codecov Report

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

Project coverage is 74.41%. Comparing base (84c35a1) to head (135a8f3).
Report is 3 commits behind head on main.

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             @@
##             main     #566      +/-   ##
==========================================
+ Coverage   74.23%   74.41%   +0.18%     
==========================================
  Files          42       42              
  Lines        2550     2584      +34     
==========================================
+ Hits         1893     1923      +30     
- Misses        564      568       +4     
  Partials       93       93              

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

@dgn
Copy link
Copy Markdown
Collaborator

dgn commented Jan 31, 2025

Making a few more additions to this to make it compatible with our community/downstream fork setup.

adding a /hold until this is ready

@dgn
Copy link
Copy Markdown
Collaborator

dgn commented Jan 31, 2025

I made some more changes, most notably removing the latest version and just replacing it with an alias. Another thing i want to do is flatten the struct a bit - we don't need different fields for name and version IMO if they're always the same except for the v prefix

@dgn
Copy link
Copy Markdown
Collaborator

dgn commented Jan 31, 2025

This is also now ready for consumption in the fork. We will need to move the vendor versions.yaml into the same module but apart from that the process should be unchanged. Will test this thoroughly next week to avoid having to go back and forth between community and fork.

@yannuil
Copy link
Copy Markdown
Contributor Author

yannuil commented Feb 14, 2025

/test lint

1 similar comment
@yannuil
Copy link
Copy Markdown
Contributor Author

yannuil commented Feb 14, 2025

/test lint

Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Copy link
Copy Markdown
Collaborator

@dgn dgn left a comment

Choose a reason for hiding this comment

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

lgtm, just some minor comments. Note that I added a commit fixing the update-istio script


version, err := istioversions.ResolveVersion(cni.Spec.Version)
if err != nil {
return fmt.Errorf("failed to apply profile: %w", err)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: wrong error message. should be "versions %s not found" like above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reworded all places where istionversion.Resolve is called to include more context on the resource names.

Comment on lines +67 to +68
// AliasList is the alias for the version
AliasList []AliasInfo
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we need this anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will make it private as it is used in the TestInit for verifying if all aliases are properly referenced.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But why have code just for test purposes if the test can easily find the aliases by itself?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree it shouldn't be there, but let's fix it in a follow-up, I'd like to produce some RC builds

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Yann Liu <yannliu@redhat.com>
In versions.yaml, `Ref` is now a reference to the name of a version.

Signed-off-by: Yann Liu <yannliu@redhat.com>
@yannuil yannuil requested a review from luksa February 17, 2025 16:34
ztunnelselectValues=$(yq '.versions[] | select(.version >= "1.24.0") | ", \"urn:alm:descriptor:com.tectonic.ui:select:" + .name + "\""' "${VERSIONS_YAML_FILE}" | tr -d '\n')
ztunnelversionsEnum=$(yq '.versions[] | select(.version >= "1.24.0") | .name' "${VERSIONS_YAML_FILE}" | tr '\n' ';' | sed 's/;$//g')
ztunnelversions=$(yq '.versions[] | select(.version >= "1.24.0") | .name' "${VERSIONS_YAML_FILE}" | tr '\n' ',' | sed -e 's/,/, /g' -e 's/, $//g')
ztunnelselectValues=$(yq '.versions[] | select(.version >= "1.24.0" or .ref >= "v1.24.0") | ", \"urn:alm:descriptor:com.tectonic.ui:select:" + .name + "\""' "${VERSIONS_YAML_PATH}" | tr -d '\n')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This .ref >= "v1.24.0" won't work correctly, but neither will the version >= "1.24.0", which was here previously.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it's not perfect but it works for the time being. I think it's okay to keep it as it is as this is only temporary anyway until pre-1.24 versions drop out of support

Copy link
Copy Markdown
Contributor

@luksa luksa left a comment

Choose a reason for hiding this comment

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

LGTM, but I do have a few reservations about the istioversion package. Needs refactoring; and the tests also need to be simplified and improved. Let's do this ASAP in a follow-up PR.

@istio-testing istio-testing merged commit 13a1029 into istio-ecosystem:main Feb 17, 2025
@istio-testing
Copy link
Copy Markdown
Collaborator

@dgn: #566 failed to apply on top of branch "release-1.0":

Applying: Refactor version management to use new istioversions package
Applying: Add alias support in istioversions
Applying: Introduce alias in the controller
Applying: Fix tests for alias
Applying: Fix version value format
Applying: Add comments to pkg/istioversions/versions.go
Applying: Support for different versions YAML files
Applying: Automatically update aliases
Applying: Remove 'latest' and create an alias called 'master'
error: mode change for resources/latest/charts/base/Chart.yaml, which is not in current HEAD
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0009 Remove 'latest' and create an alias called 'master'

Details

In response to this:

/cherry-pick release-1.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@istio-testing
Copy link
Copy Markdown
Collaborator

@dgn: new issue created for failed cherrypick: #661

Details

In response to this:

/cherry-pick release-1.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

luksa pushed a commit to luksa/sail-operator that referenced this pull request 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.

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 pushed a commit to luksa/sail-operator that referenced this pull request 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.

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>
Signed-off-by: Marko Lukša <mluksa@redhat.com>
istio-testing pushed a commit that referenced this pull request 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.



---------

Signed-off-by: Yann Liu <yannliu@redhat.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Co-authored-by: Yann Liu <yannliu@redhat.com>
Co-authored-by: Daniel Grimm <dgrimm@redhat.com>
openshift-merge-bot bot referenced this pull request in openshift-service-mesh/sail-operator Feb 19, 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.

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>
Signed-off-by: Marko Lukša <mluksa@redhat.com>
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
FilipB added a commit to FilipB/sail-operator that referenced this pull request Feb 24, 2025
* upstream-eco/main:
  Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667)
  Make environment  variable consistent (istio-ecosystem#663)
  Add contributor meeting information to the contributor.md file (istio-ecosystem#623)
  Add version alias support  (istio-ecosystem#566)
@dgn dgn mentioned this pull request Mar 20, 2025
7 tasks
cam-garrison pushed a commit to cam-garrison/sail-operator that referenced this pull request Oct 30, 2025
Co-authored-by: openshift-service-mesh-bot <null>
dgn added a commit to dgn/sail-operator that referenced this pull request Mar 17, 2026
* 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>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants