Skip to content

Commit

Permalink
Merge pull request #2107 from tnozicka/fix-manager-version-replacement
Browse files Browse the repository at this point in the history
Synchronize ScyllaDB Manager version with config.yaml
  • Loading branch information
scylla-operator-bot[bot] authored Sep 3, 2024
2 parents 1bbc816 + 6b00965 commit 9e4ed32
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 20 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ endef
define update-scylla-helm-versions
$(YQ) eval-all -i -P '\
select(fi==0).scyllaImage.tag = ( select(fi==1) | .operator.scyllaDBVersion ) | \
select(fi==0).agentImage.tag = ( select(fi==1) | .operator.scyllaDBManagerVersion ) | \
select(fi==0).agentImage.tag = ( select(fi==1) | .operator.scyllaDBManagerAgentVersion ) | \
select(fi==0)' \
'$(1)' './assets/config/config.yaml'
endef
Expand All @@ -442,7 +442,8 @@ endef
define update-scylla-manager-helm-versions
$(YQ) eval-all -i -P '\
select(fi==0).scylla.scyllaImage.tag = ( select(fi==1) | .operator.scyllaDBVersion ) | \
select(fi==0).scylla.agentImage.tag = ( select(fi==1) | .operator.scyllaDBManagerVersion ) | \
select(fi==0).scylla.agentImage.tag = ( select(fi==1) | .operator.scyllaDBManagerAgentVersion ) | \
select(fi==0).image.tag = ( select(fi==1) | .operator.scyllaDBManagerVersion ) | \
select(fi==0)' \
'$(1)' './assets/config/config.yaml'
endef
Expand Down Expand Up @@ -515,7 +516,7 @@ verify-deploy:
define replace-scyllacluster-versions
$(YQ) eval-all -i -P '\
select(fi==0 and di==$(2)).spec.version = ( select(fi==1) | .operator.scyllaDBVersion ) | \
select(fi==0 and di==$(2)).spec.agentVersion = ( select(fi==1) | .operator.scyllaDBManagerVersion ) | \
select(fi==0 and di==$(2)).spec.agentVersion = ( select(fi==1) | .operator.scyllaDBManagerAgentVersion ) | \
select(fi==0)' \
'$(1)' './assets/config/config.yaml'
endef
Expand Down
1 change: 1 addition & 0 deletions assets/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type OperatorConfig struct {
ScyllaDBEnterpriseVersionNeedingConsistentClusterManagementOverride string `json:"scyllaDBEnterpriseVersionNeedingConsistentClusterManagementOverride"`
ScyllaDBUtilsImage string `json:"scyllaDBUtilsImage"`
ScyllaDBManagerVersion string `json:"scyllaDBManagerVersion"`
ScyllaDBManagerAgentVersion string `json:"scyllaDBManagerAgentVersion"`
BashToolsImage string `json:"bashToolsImage"`
GrafanaImage string `json:"grafanaImage"`
PrometheusVersion string `json:"prometheusVersion"`
Expand Down
3 changes: 2 additions & 1 deletion assets/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ operator:
scyllaDBEnterpriseVersionNeedingConsistentClusterManagementOverride: "2024.1.8"
# TODO: scyllaDBUtils image can't be bumped until scylladb/scylladb#17787 is fixed.
scyllaDBUtilsImage: "docker.io/scylladb/scylla:5.4.0@sha256:b9070afdb2be0d5c59b1c196e1bb66660351403cb30d5c6ba446ef8c3b0754f1"
scyllaDBManagerVersion: "3.3.0"
scyllaDBManagerVersion: "3.3.0@sha256:e8c5b62c9330f91dfca24f109b033df78113d3ffaac306edf6d3c4346e1fa0bf"
scyllaDBManagerAgentVersion: "3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b"
bashToolsImage: "registry.access.redhat.com/ubi9/ubi:9.3-1361.1699548029@sha256:6b95efc134c2af3d45472c0a2f88e6085433df058cc210abb2bb061ac4d74359"
grafanaImage: "docker.io/grafana/grafana:9.5.12@sha256:7d2f2a8b7aebe30bf3f9ae0f190e508e571b43f65753ba3b1b1adf0800bc9256"
prometheusVersion: "v2.44.0"
Expand Down
5 changes: 5 additions & 0 deletions assets/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ func TestProjectConfig(t *testing.T) {
t.Error(err)
}

err = validateRequired(Project.Operator.ScyllaDBManagerAgentVersion)
if err != nil {
t.Error(err)
}

err = validateImage(Project.Operator.BashToolsImage)
if err != nil {
t.Error(err)
Expand Down
2 changes: 1 addition & 1 deletion deploy/manager-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ metadata:
namespace: scylla-manager
spec:
version: 6.1.1
agentVersion: 3.3.0
agentVersion: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
repository: docker.io/scylladb/scylla
agentRepository: docker.io/scylladb/scylla-manager-agent
developerMode: true
Expand Down
2 changes: 1 addition & 1 deletion deploy/manager-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ metadata:
namespace: scylla-manager
spec:
version: 6.1.1
agentVersion: 3.3.0
agentVersion: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
repository: docker.io/scylladb/scylla
agentRepository: docker.io/scylladb/scylla-manager-agent
developerMode: true
Expand Down
2 changes: 1 addition & 1 deletion deploy/manager/dev/50_scyllacluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: scylla-manager
spec:
version: 6.1.1
agentVersion: 3.3.0
agentVersion: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
repository: docker.io/scylladb/scylla
agentRepository: docker.io/scylladb/scylla-manager-agent
developerMode: true
Expand Down
2 changes: 1 addition & 1 deletion deploy/manager/prod/50_scyllacluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: scylla-manager
spec:
version: 6.1.1
agentVersion: 3.3.0
agentVersion: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
repository: docker.io/scylladb/scylla
agentRepository: docker.io/scylladb/scylla-manager-agent
developerMode: true
Expand Down
2 changes: 1 addition & 1 deletion examples/eks/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
name: scylla-cluster
namespace: scylla
spec:
agentVersion: 3.3.0
agentVersion: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
version: 6.1.1
sysctls:
- fs.aio-max-nr=2097152
Expand Down
2 changes: 1 addition & 1 deletion examples/generic/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
name: simple-cluster
namespace: scylla
spec:
agentVersion: 3.3.0
agentVersion: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
version: 6.1.1
developerMode: true
datacenter:
Expand Down
2 changes: 1 addition & 1 deletion examples/gke/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
name: scylla-cluster
namespace: scylla
spec:
agentVersion: 3.3.0
agentVersion: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
version: 6.1.1
automaticOrphanedNodeCleanup: true
sysctls:
Expand Down
2 changes: 1 addition & 1 deletion examples/helm/values.cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
scyllaImage:
tag: 6.1.1
agentImage:
tag: 3.3.0
tag: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
# Cluster information
developerMode: true
datacenter: us-east-1
Expand Down
4 changes: 2 additions & 2 deletions examples/helm/values.manager.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scylla Manager image
image:
tag: 3.3.0
tag: 3.3.0@sha256:e8c5b62c9330f91dfca24f109b033df78113d3ffaac306edf6d3c4346e1fa0bf
# Resources allocated to Scylla Manager pods
resources:
limits:
Expand All @@ -23,7 +23,7 @@ scylla:
scyllaImage:
tag: 6.1.1
agentImage:
tag: 3.3.0
tag: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
datacenter: manager-dc
racks:
- name: manager-rack
Expand Down
2 changes: 1 addition & 1 deletion examples/scylladb/scylla.scyllacluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ScyllaCluster
metadata:
name: scylla
spec:
agentVersion: 3.3.0
agentVersion: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
version: 6.1.1
developerMode: true
automaticOrphanedNodeCleanup: true
Expand Down
3 changes: 2 additions & 1 deletion helm/deploy/manager_prod.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Scylla Manager image
image:
repository: docker.io/scylladb
tag: 3.3.0@sha256:e8c5b62c9330f91dfca24f109b033df78113d3ffaac306edf6d3c4346e1fa0bf
controllerImage:
repository: docker.io/scylladb
logLevel: info
Expand All @@ -21,7 +22,7 @@ scylla:
repository: docker.io/scylladb/scylla
tag: 6.1.1
agentImage:
tag: 3.3.0
tag: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
repository: docker.io/scylladb/scylla-manager-agent
developerMode: true
cpuset: true
Expand Down
2 changes: 1 addition & 1 deletion helm/scylla-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ scylla:
scyllaImage:
tag: 6.1.1
agentImage:
tag: 3.3.0
tag: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
datacenter: manager-dc
racks:
- name: manager-rack
Expand Down
2 changes: 1 addition & 1 deletion helm/scylla/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ scyllaImage:
agentImage:
repository: scylladb/scylla-manager-agent
# Overrides the image tag whose default is the chart appVersion.
tag: 3.3.0
tag: 3.3.0@sha256:dc2684f51e961d88da5a8eac2d9f165cb7a960cbf91f67f49332e7224317c96b
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (f *Framework) CommonLabels() map[string]string {
func (f *Framework) GetDefaultScyllaCluster() *scyllav1.ScyllaCluster {
renderArgs := map[string]any{
"scyllaDBVersion": configassets.Project.Operator.ScyllaDBVersion,
"scyllaDBManagerVersion": configassets.Project.Operator.ScyllaDBManagerVersion,
"scyllaDBManagerVersion": configassets.Project.Operator.ScyllaDBManagerAgentVersion,
"nodeServiceType": TestContext.ScyllaClusterOptions.ExposeOptions.NodeServiceType,
"nodesBroadcastAddressType": TestContext.ScyllaClusterOptions.ExposeOptions.NodesBroadcastAddressType,
"clientsBroadcastAddressType": TestContext.ScyllaClusterOptions.ExposeOptions.ClientsBroadcastAddressType,
Expand All @@ -151,7 +151,7 @@ func (f *Framework) GetDefaultScyllaCluster() *scyllav1.ScyllaCluster {
func (f *Framework) GetDefaultZonalScyllaClusterWithThreeRacks() *scyllav1.ScyllaCluster {
renderArgs := map[string]any{
"scyllaDBVersion": configassets.Project.Operator.ScyllaDBVersion,
"scyllaDBManagerVersion": configassets.Project.Operator.ScyllaDBManagerVersion,
"scyllaDBManagerVersion": configassets.Project.Operator.ScyllaDBManagerAgentVersion,
"nodeServiceType": TestContext.ScyllaClusterOptions.ExposeOptions.NodeServiceType,
"nodesBroadcastAddressType": TestContext.ScyllaClusterOptions.ExposeOptions.NodesBroadcastAddressType,
"clientsBroadcastAddressType": TestContext.ScyllaClusterOptions.ExposeOptions.ClientsBroadcastAddressType,
Expand Down

0 comments on commit 9e4ed32

Please sign in to comment.