Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9b3223a
Refactor version management to use new istioversions package
yannuil Jan 21, 2025
1310a0e
Add alias support in istioversions
yannuil Jan 21, 2025
b0bdf75
Introduce alias in the controller
yannuil Jan 21, 2025
85232b1
Fix tests for alias
yannuil Jan 21, 2025
0904433
Fix version value format
yannuil Jan 21, 2025
162d786
Add comments to pkg/istioversions/versions.go
dgn Jan 31, 2025
cf51eeb
Support for different versions YAML files
dgn Jan 31, 2025
bb206c3
Automatically update aliases
dgn Jan 31, 2025
ce54f48
Remove 'latest' and create an alias called 'master'
dgn Jan 31, 2025
9de1130
Include alias as part of the installation tests
yannuil Feb 10, 2025
9b6fbdc
Update tests
yannuil Feb 10, 2025
a65f240
Resolve version name for IstioCNI and ZTunnel
yannuil Feb 11, 2025
8026a64
Update tests
yannuil Feb 11, 2025
128e9ba
Update types validation
yannuil Feb 11, 2025
f2c196a
Apply suggestions in the reviews
yannuil Feb 11, 2025
cba6eb2
Change 'alias' to 'aliases' in version.yaml
yannuil Feb 11, 2025
6d1734b
Skip sample pod specs when running under an alias version
yannuil Feb 12, 2025
555874e
Make consistent naming
yannuil Feb 12, 2025
888c46b
Fix test style
yannuil Feb 12, 2025
706b944
Change version.yaml structure
yannuil Feb 12, 2025
2fe3dd2
Update tests and rename
yannuil Feb 12, 2025
9e376c5
Fix tests
yannuil Feb 12, 2025
7ccd97f
Remove version alias in IstioRevision
yannuil Feb 12, 2025
59dd0e7
Fix a test
yannuil Feb 13, 2025
81742a9
Fix a rebase error
yannuil Feb 13, 2025
f48d079
Update field name to use `ref`
yannuil Feb 14, 2025
0ead03c
Simplify `versions.yaml` loading logic
yannuil Feb 14, 2025
129cf69
Lint
yannuil Feb 14, 2025
59e8e81
Fix list_only_latest() func
dgn Feb 17, 2025
4372aab
Introduce VERSIONS_YAML_PATH
yannuil Feb 17, 2025
d5e0823
Rename to istioversion
yannuil Feb 17, 2025
a5f5741
Reword error message
yannuil Feb 17, 2025
986656c
Fix update_alias()
yannuil Feb 17, 2025
955d53a
Update package path references
yannuil Feb 17, 2025
3d3b832
Fix import error
yannuil Feb 17, 2025
135a8f3
Update versions.yaml definition
yannuil Feb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ VERSION ?= 1.1.0
MINOR_VERSION := $(shell echo "${VERSION}" | cut -f1,2 -d'.')

OPERATOR_NAME ?= sailoperator
VERSIONS_YAML_DIR ?= pkg/istioversion
VERSIONS_YAML_FILE ?= versions.yaml

# Istio images names
Expand Down Expand Up @@ -53,6 +54,7 @@ LD_EXTRAFLAGS = -X ${GO_MODULE}/pkg/version.buildVersion=${VERSION}
LD_EXTRAFLAGS += -X ${GO_MODULE}/pkg/version.buildGitRevision=${GIT_REVISION}
LD_EXTRAFLAGS += -X ${GO_MODULE}/pkg/version.buildTag=${GIT_TAG}
LD_EXTRAFLAGS += -X ${GO_MODULE}/pkg/version.buildStatus=${GIT_STATUS}
LD_EXTRAFLAGS += -X ${GO_MODULE}/pkg/istioversion.versionsFilename=${VERSIONS_YAML_FILE}

IS_FIPS_COMPLIANT ?= false # set to true for FIPS compliance
ifeq ($(IS_FIPS_COMPLIANT), true)
Expand Down Expand Up @@ -389,7 +391,7 @@ gen-charts: ## Pull charts from istio repository.
@# use yq to generate a list of download-charts.sh commands for each version in versions.yaml; these commands are
@# passed to sh and executed; in a nutshell, the yq command generates commands like:
@# ./hack/download-charts.sh <version> <git repo> <commit> [chart1] [chart2] ...
@yq eval '.versions[] | "./hack/download-charts.sh " + .name + " " + .repo + " " + .commit + " " + ((.charts // []) | join(" "))' < $(VERSIONS_YAML_FILE) | sh
@yq eval '.versions[] | "./hack/download-charts.sh " + .name + " " + .repo + " " + .commit + " " + ((.charts // []) | join(" "))' < $(VERSIONS_YAML_DIR)/$(VERSIONS_YAML_FILE) | sh

@# remove old version directories
@hack/remove-old-versions.sh
Expand Down
6 changes: 3 additions & 3 deletions api/v1/istio_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const (
type IstioSpec struct {
// +sail:version
// Defines the version of Istio to install.
// Must be one of: v1.24.2, v1.24.1, v1.24.0, v1.23.4, v1.23.3, v1.23.2, v1.22.8, v1.22.7, v1.22.6, v1.22.5, v1.21.6, latest.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Istio Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:General", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.1", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.0", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.4", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.3", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.8", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.7", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.6", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.5", "urn:alm:descriptor:com.tectonic.ui:select:v1.21.6", "urn:alm:descriptor:com.tectonic.ui:select:latest"}
// +kubebuilder:validation:Enum=v1.24.2;v1.24.1;v1.24.0;v1.23.4;v1.23.3;v1.23.2;v1.22.8;v1.22.7;v1.22.6;v1.22.5;v1.21.6;latest
// Must be one of: v1.24-latest, v1.24.2, v1.24.1, v1.24.0, v1.23-latest, v1.23.4, v1.23.3, v1.23.2, v1.22-latest, v1.22.8, v1.22.7, v1.22.6, v1.22.5, v1.21.6, master, v1.25-alpha.c2ac935c.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Istio Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:General", "urn:alm:descriptor:com.tectonic.ui:select:v1.24-latest", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.1", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.0", "urn:alm:descriptor:com.tectonic.ui:select:v1.23-latest", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.4", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.3", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.22-latest", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.8", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.7", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.6", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.5", "urn:alm:descriptor:com.tectonic.ui:select:v1.21.6", "urn:alm:descriptor:com.tectonic.ui:select:master", "urn:alm:descriptor:com.tectonic.ui:select:v1.25-alpha.c2ac935c"}
// +kubebuilder:validation:Enum=v1.24-latest;v1.24.2;v1.24.1;v1.24.0;v1.23-latest;v1.23.4;v1.23.3;v1.23.2;v1.22-latest;v1.22.8;v1.22.7;v1.22.6;v1.22.5;v1.21.6;master;v1.25-alpha.c2ac935c
// +kubebuilder:default=v1.24.2
Version string `json:"version"`

Expand Down
6 changes: 3 additions & 3 deletions api/v1/istiocni_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ const (
type IstioCNISpec struct {
// +sail:version
// Defines the version of Istio to install.
// Must be one of: v1.24.2, v1.24.1, v1.24.0, v1.23.4, v1.23.3, v1.23.2, v1.22.8, v1.22.7, v1.22.6, v1.22.5, v1.21.6, latest.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Istio Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:General", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.1", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.0", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.4", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.3", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.8", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.7", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.6", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.5", "urn:alm:descriptor:com.tectonic.ui:select:v1.21.6", "urn:alm:descriptor:com.tectonic.ui:select:latest"}
// +kubebuilder:validation:Enum=v1.24.2;v1.24.1;v1.24.0;v1.23.4;v1.23.3;v1.23.2;v1.22.8;v1.22.7;v1.22.6;v1.22.5;v1.21.6;latest
// Must be one of: v1.24-latest, v1.24.2, v1.24.1, v1.24.0, v1.23-latest, v1.23.4, v1.23.3, v1.23.2, v1.22-latest, v1.22.8, v1.22.7, v1.22.6, v1.22.5, v1.21.6, master, v1.25-alpha.c2ac935c.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Istio Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:General", "urn:alm:descriptor:com.tectonic.ui:select:v1.24-latest", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.1", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.0", "urn:alm:descriptor:com.tectonic.ui:select:v1.23-latest", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.4", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.3", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.22-latest", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.8", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.7", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.6", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.5", "urn:alm:descriptor:com.tectonic.ui:select:v1.21.6", "urn:alm:descriptor:com.tectonic.ui:select:master", "urn:alm:descriptor:com.tectonic.ui:select:v1.25-alpha.c2ac935c"}
// +kubebuilder:validation:Enum=v1.24-latest;v1.24.2;v1.24.1;v1.24.0;v1.23-latest;v1.23.4;v1.23.3;v1.23.2;v1.22-latest;v1.22.8;v1.22.7;v1.22.6;v1.22.5;v1.21.6;master;v1.25-alpha.c2ac935c
// +kubebuilder:default=v1.24.2
Version string `json:"version"`

Expand Down
6 changes: 3 additions & 3 deletions api/v1/istiorevision_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const (
type IstioRevisionSpec struct {
// +sail:version
// Defines the version of Istio to install.
// Must be one of: v1.24.2, v1.24.1, v1.24.0, v1.23.4, v1.23.3, v1.23.2, v1.22.8, v1.22.7, v1.22.6, v1.22.5, v1.21.6, latest.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Istio Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:General", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.1", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.0", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.4", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.3", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.8", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.7", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.6", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.5", "urn:alm:descriptor:com.tectonic.ui:select:v1.21.6", "urn:alm:descriptor:com.tectonic.ui:select:latest"}
// +kubebuilder:validation:Enum=v1.24.2;v1.24.1;v1.24.0;v1.23.4;v1.23.3;v1.23.2;v1.22.8;v1.22.7;v1.22.6;v1.22.5;v1.21.6;latest
// Must be one of: v1.24.2, v1.24.1, v1.24.0, v1.23.4, v1.23.3, v1.23.2, v1.22.8, v1.22.7, v1.22.6, v1.22.5, v1.21.6, v1.25-alpha.c2ac935c.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Istio Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:General", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.1", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.0", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.4", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.3", "urn:alm:descriptor:com.tectonic.ui:select:v1.23.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.8", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.7", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.6", "urn:alm:descriptor:com.tectonic.ui:select:v1.22.5", "urn:alm:descriptor:com.tectonic.ui:select:v1.21.6", "urn:alm:descriptor:com.tectonic.ui:select:v1.25-alpha.c2ac935c"}
// +kubebuilder:validation:Enum=v1.24.2;v1.24.1;v1.24.0;v1.23.4;v1.23.3;v1.23.2;v1.22.8;v1.22.7;v1.22.6;v1.22.5;v1.21.6;v1.25-alpha.c2ac935c
Version string `json:"version"`

// Namespace to which the Istio components should be installed.
Expand Down
6 changes: 3 additions & 3 deletions api/v1alpha1/ztunnel_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const (
type ZTunnelSpec struct {
// +sail:version
// Defines the version of Istio to install.
// Must be one of: v1.24.2, v1.24.1, v1.24.0, latest.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Istio Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:General", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.1", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.0", "urn:alm:descriptor:com.tectonic.ui:select:latest"}
// +kubebuilder:validation:Enum=v1.24.2;v1.24.1;v1.24.0;latest
// Must be one of: v1.24-latest, v1.24.2, v1.24.1, v1.24.0, master, v1.25-alpha.c2ac935c.
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1,displayName="Istio Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:General", "urn:alm:descriptor:com.tectonic.ui:select:v1.24-latest", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.2", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.1", "urn:alm:descriptor:com.tectonic.ui:select:v1.24.0", "urn:alm:descriptor:com.tectonic.ui:select:master", "urn:alm:descriptor:com.tectonic.ui:select:v1.25-alpha.c2ac935c"}
// +kubebuilder:validation:Enum=v1.24-latest;v1.24.2;v1.24.1;v1.24.0;master;v1.25-alpha.c2ac935c
// +kubebuilder:default=v1.24.2
Version string `json:"version"`

Expand Down
2 changes: 1 addition & 1 deletion bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Repeat the process to create a project named `istio-cni`.
The `version` field of the `Istio` and `IstioCNI` resource defines which version
of each component should be deployed. This can be set using the `Istio Version`
drop down menu when creating a new `Istio` with the OpenShift Container Platform
web console. For a list of available versions, see the [versions.yaml](/versions.yaml) file
web console. For a list of available versions, see the [versions.yaml](/pkg/istioversion/versions.yaml) file
or use the command:

```sh
Expand Down
Loading