diff --git a/Makefile b/Makefile index ef3d302d..54e8d613 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ # Image URL to use all building/pushing image targets REGISTRY ?= quay.io +FROM_VERSION ?=v2.2.1 +CHART_VERSION ?=2.2.1 +CHART_TOVERSION ?=2.3.0 +TO_VERSION ?=v2.3.0 IMGPREFIX ?=radondb/ IMG ?= $(IMGPREFIX)mysql-operator:latest SIDECAR57_IMG ?= $(IMGPREFIX)mysql57-sidecar:latest @@ -128,3 +132,15 @@ e2e-local: go test -v ./test/e2e $(G_ARGS) -timeout 20m todo: @grep -Irnw './' -e 'TODO:'|grep -v grep + +updateVersion: + find ./ -type f -name "*.go" -o -name "*.yaml" -exec sed -i "s/mysql57-sidecar:$(FROM_VERSION)/mysql57-sidecar:$(TO_VERSION)/g" {} \; + find ./ -type f -name "*.go" -o -name "*.yaml" -exec sed -i "s/xenon:$(FROM_VERSION)/xenon:$(TO_VERSION)/g" {} \; + find ./ -type f -name "*.go" -o -name "*.yaml" -exec sed -i "s/mysql-operator:$(FROM_VERSION)/mysql-operator:$(TO_VERSION)/g" {} \; + find ./ -type f -name "*.go" -o -name "*.yaml" -exec sed -i "s/mysql80-sidecar:$(FROM_VERSION)/mysql80-sidecar:$(TO_VERSION)/g" {} \; + find ./ -type f -name "*.go" -o -name "*.yaml" -exec sed -i "s/mysql-operator-$(FROM_VERSION)/mysql-operator-$(TO_VERSION)/g" {} \; + find ./ -type f -name "*.go" -o -name "*.yaml" -exec sed -i "s/\"$(FROM_VERSION)\"/\"$(TO_VERSION)\"/g" {} \; + # sed -i "18s/$(CHART_VERSION)/$(CHART_TOVERSION)/" charts/mysql-operator/charts/Chart.yaml + find ./charts -type f -name "*.yaml" -exec sed -i "s/$(CHART_VERSION)/$(CHART_TOVERSION)/g" {} \; + find ./config -type f -name "*.yaml" -exec sed -i "s/$(CHART_VERSION)/$(CHART_TOVERSION)/g" {} \; + diff --git a/api/v1alpha1/backup_types.go b/api/v1alpha1/backup_types.go index 430291a1..3fc018a2 100644 --- a/api/v1alpha1/backup_types.go +++ b/api/v1alpha1/backup_types.go @@ -29,7 +29,7 @@ type BackupSpec struct { // To specify the image that will be used for sidecar container. // +optional - // +kubebuilder:default:="radondb/mysql57-sidecar:v2.2.1" + // +kubebuilder:default:="radondb/mysql57-sidecar:v2.3.0" Image string `json:"image"` // HostName represents the host for which to take backup diff --git a/api/v1alpha1/mysqlcluster_types.go b/api/v1alpha1/mysqlcluster_types.go index 7fde84e3..bca42a30 100644 --- a/api/v1alpha1/mysqlcluster_types.go +++ b/api/v1alpha1/mysqlcluster_types.go @@ -48,7 +48,7 @@ type MysqlClusterSpec struct { // XenonOpts is the options of xenon container. // +optional - // +kubebuilder:default:={image: "radondb/xenon:v2.2.1", admitDefeatHearbeatCount: 5, electionTimeout: 10000, resources: {limits: {cpu: "100m", memory: "256Mi"}, requests: {cpu: "50m", memory: "128Mi"}}} + // +kubebuilder:default:={image: "radondb/xenon:v2.3.0", admitDefeatHearbeatCount: 5, electionTimeout: 10000, resources: {limits: {cpu: "100m", memory: "256Mi"}, requests: {cpu: "50m", memory: "128Mi"}}} XenonOpts XenonOpts `json:"xenonOpts,omitempty"` // MetricsOpts is the options of metrics container. @@ -65,7 +65,7 @@ type MysqlClusterSpec struct { // PodPolicy defines the policy to extra specification. // +optional - // +kubebuilder:default:={imagePullPolicy: "IfNotPresent", extraResources: {requests: {cpu: "10m", memory: "32Mi"}}, sidecarImage: "radondb/mysql57-sidecar:v2.2.1", busyboxImage: "busybox:1.32"} + // +kubebuilder:default:={imagePullPolicy: "IfNotPresent", extraResources: {requests: {cpu: "10m", memory: "32Mi"}}, sidecarImage: "radondb/mysql57-sidecar:v2.3.0", busyboxImage: "busybox:1.32"} PodPolicy PodPolicy `json:"podPolicy,omitempty"` // PVC extra specifiaction. @@ -181,7 +181,7 @@ type MysqlOpts struct { type XenonOpts struct { // To specify the image that will be used for xenon container. // +optional - // +kubebuilder:default:="radondb/xenon:v2.2.1" + // +kubebuilder:default:="radondb/xenon:v2.3.0" Image string `json:"image,omitempty"` // High available component admit defeat heartbeat count. @@ -248,7 +248,7 @@ type PodPolicy struct { // To specify the image that will be used for sidecar container. // +optional - // +kubebuilder:default:="radondb/mysql57-sidecar:v2.2.1" + // +kubebuilder:default:="radondb/mysql57-sidecar:v2.3.0" SidecarImage string `json:"sidecarImage,omitempty"` // The busybox image. diff --git a/charts/mysql-operator/Chart.yaml b/charts/mysql-operator/Chart.yaml index 61c65bc6..ae8d6ec6 100644 --- a/charts/mysql-operator/Chart.yaml +++ b/charts/mysql-operator/Chart.yaml @@ -15,14 +15,14 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: v2.2.1 +version: v2.3.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v2.2.1" +appVersion: "v2.3.0" dependencies: - name: "mysqlcluster" - version: "v2.2.1" + version: "v2.3.0" \ No newline at end of file diff --git a/charts/mysql-operator/charts/mysql-cluster/Chart.yaml b/charts/mysql-operator/charts/mysql-cluster/Chart.yaml index 6f90b1b8..ab07dbb3 100644 --- a/charts/mysql-operator/charts/mysql-cluster/Chart.yaml +++ b/charts/mysql-operator/charts/mysql-cluster/Chart.yaml @@ -15,10 +15,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.2.1 +version: 2.3.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v2.2.1" +appVersion: "v2.3.0" diff --git a/charts/mysql-operator/charts/mysql-cluster/values.yaml b/charts/mysql-operator/charts/mysql-cluster/values.yaml index 7dc16c56..cc35b6f7 100644 --- a/charts/mysql-operator/charts/mysql-cluster/values.yaml +++ b/charts/mysql-operator/charts/mysql-cluster/values.yaml @@ -6,7 +6,7 @@ name: "sample" namespace: "default" mysqlVersion: "8.0" -version: v2.2.1 +version: v2.3.0 tls: enable: false diff --git a/charts/mysql-operator/crds/mysql.radondb.com_backups.yaml b/charts/mysql-operator/crds/mysql.radondb.com_backups.yaml index dbe5e0b6..005fc364 100644 --- a/charts/mysql-operator/crds/mysql.radondb.com_backups.yaml +++ b/charts/mysql-operator/crds/mysql.radondb.com_backups.yaml @@ -67,7 +67,7 @@ spec: If is empty, is use leader HostName type: string image: - default: radondb/mysql57-sidecar:v2.2.1 + default: radondb/mysql57-sidecar:v2.3.0 description: To specify the image that will be used for sidecar container. type: string nfsServerAddress: diff --git a/charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml b/charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml index aa216ced..d31bc46e 100644 --- a/charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml +++ b/charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml @@ -302,7 +302,7 @@ spec: cpu: 10m memory: 32Mi imagePullPolicy: IfNotPresent - sidecarImage: radondb/mysql57-sidecar:v2.2.1 + sidecarImage: radondb/mysql57-sidecar:v2.3.0 description: PodPolicy defines the policy to extra specification. properties: affinity: @@ -1232,7 +1232,7 @@ spec: schedulerName: type: string sidecarImage: - default: radondb/mysql57-sidecar:v2.2.1 + default: radondb/mysql57-sidecar:v2.3.0 description: To specify the image that will be used for sidecar container. type: string @@ -1304,7 +1304,7 @@ spec: default: admitDefeatHearbeatCount: 5 electionTimeout: 10000 - image: radondb/xenon:v2.2.1 + image: radondb/xenon:v2.3.0 resources: limits: cpu: 100m @@ -1331,7 +1331,7 @@ spec: automatically rebuild the invalid node. type: boolean image: - default: radondb/xenon:v2.2.1 + default: radondb/xenon:v2.3.0 description: To specify the image that will be used for xenon container. type: string diff --git a/charts/mysql-operator/values.yaml b/charts/mysql-operator/values.yaml index 56b5ef8d..df31e845 100644 --- a/charts/mysql-operator/values.yaml +++ b/charts/mysql-operator/values.yaml @@ -7,7 +7,7 @@ installCRDS: true mysqlcluster: install: false - version: v2.2.1 + version: v2.3.0 ## Specify an imagePullPolicy (Required) ## It's recommended to change this to 'Always' if the image tag is 'latest' ## ref: http://kubernetes.io/docs/user-guide/images/#updating-images @@ -25,7 +25,7 @@ tolerationSeconds: 30 manager: image: radondb/mysql-operator - tag: v2.2.1 + tag: v2.3.0 enableWebhooks: true resources: {} # We usually recommend not to specify default resources and to leave this as a conscious diff --git a/config/crd/bases/mysql.radondb.com_backups.yaml b/config/crd/bases/mysql.radondb.com_backups.yaml index dbe5e0b6..005fc364 100644 --- a/config/crd/bases/mysql.radondb.com_backups.yaml +++ b/config/crd/bases/mysql.radondb.com_backups.yaml @@ -67,7 +67,7 @@ spec: If is empty, is use leader HostName type: string image: - default: radondb/mysql57-sidecar:v2.2.1 + default: radondb/mysql57-sidecar:v2.3.0 description: To specify the image that will be used for sidecar container. type: string nfsServerAddress: diff --git a/config/crd/bases/mysql.radondb.com_mysqlclusters.yaml b/config/crd/bases/mysql.radondb.com_mysqlclusters.yaml index aa216ced..d31bc46e 100644 --- a/config/crd/bases/mysql.radondb.com_mysqlclusters.yaml +++ b/config/crd/bases/mysql.radondb.com_mysqlclusters.yaml @@ -302,7 +302,7 @@ spec: cpu: 10m memory: 32Mi imagePullPolicy: IfNotPresent - sidecarImage: radondb/mysql57-sidecar:v2.2.1 + sidecarImage: radondb/mysql57-sidecar:v2.3.0 description: PodPolicy defines the policy to extra specification. properties: affinity: @@ -1232,7 +1232,7 @@ spec: schedulerName: type: string sidecarImage: - default: radondb/mysql57-sidecar:v2.2.1 + default: radondb/mysql57-sidecar:v2.3.0 description: To specify the image that will be used for sidecar container. type: string @@ -1304,7 +1304,7 @@ spec: default: admitDefeatHearbeatCount: 5 electionTimeout: 10000 - image: radondb/xenon:v2.2.1 + image: radondb/xenon:v2.3.0 resources: limits: cpu: 100m @@ -1331,7 +1331,7 @@ spec: automatically rebuild the invalid node. type: boolean image: - default: radondb/xenon:v2.2.1 + default: radondb/xenon:v2.3.0 description: To specify the image that will be used for xenon container. type: string diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 1a025582..f49027c7 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,4 +13,4 @@ kind: Kustomization images: - name: controller newName: radondb/mysql-operator - newTag: v2.2.1 + newTag: v2.3.0 diff --git a/config/samples/mysql_v1alpha1_backup.yaml b/config/samples/mysql_v1alpha1_backup.yaml index 83463855..4750919c 100644 --- a/config/samples/mysql_v1alpha1_backup.yaml +++ b/config/samples/mysql_v1alpha1_backup.yaml @@ -4,7 +4,7 @@ metadata: name: backup-sample spec: # Add fields here - image: radondb/mysql57-sidecar:v2.2.1 + image: radondb/mysql57-sidecar:v2.3.0 # hostname if empty, use the leader as hostname hostName: sample-mysql-0 clusterName: sample diff --git a/config/samples/mysql_v1alpha1_mysqlcluster.yaml b/config/samples/mysql_v1alpha1_mysqlcluster.yaml index 1504fa96..0ce6a82e 100644 --- a/config/samples/mysql_v1alpha1_mysqlcluster.yaml +++ b/config/samples/mysql_v1alpha1_mysqlcluster.yaml @@ -38,7 +38,7 @@ spec: memory: 1Gi xenonOpts: - image: radondb/xenon:v2.2.1 + image: radondb/xenon:v2.3.0 admitDefeatHearbeatCount: 5 electionTimeout: 10000 @@ -64,7 +64,7 @@ spec: podPolicy: imagePullPolicy: IfNotPresent - sidecarImage: radondb/mysql57-sidecar:v2.2.1 + sidecarImage: radondb/mysql57-sidecar:v2.3.0 busyboxImage: busybox:1.32 slowLogTail: false diff --git a/config/samples/mysql_v1alpha1_mysqlcluster_backup_schedule_demo.yaml b/config/samples/mysql_v1alpha1_mysqlcluster_backup_schedule_demo.yaml index c7c13c69..b4fe788a 100644 --- a/config/samples/mysql_v1alpha1_mysqlcluster_backup_schedule_demo.yaml +++ b/config/samples/mysql_v1alpha1_mysqlcluster_backup_schedule_demo.yaml @@ -34,7 +34,7 @@ spec: memory: 1Gi xenonOpts: - image: radondb/xenon:v2.2.1 + image: radondb/xenon:v2.3.0 admitDefeatHearbeatCount: 5 electionTimeout: 10000 @@ -60,7 +60,7 @@ spec: podPolicy: imagePullPolicy: IfNotPresent - sidecarImage: radondb/mysql57-sidecar:v2.2.1 + sidecarImage: radondb/mysql57-sidecar:v2.3.0 busyboxImage: busybox:1.32 slowLogTail: false diff --git a/config/samples/mysql_v1alpha1_mysqlcluster_mysql8.yaml b/config/samples/mysql_v1alpha1_mysqlcluster_mysql8.yaml index 59396a0c..88003d6f 100644 --- a/config/samples/mysql_v1alpha1_mysqlcluster_mysql8.yaml +++ b/config/samples/mysql_v1alpha1_mysqlcluster_mysql8.yaml @@ -35,7 +35,7 @@ spec: memory: 1Gi xenonOpts: - image: radondb/xenon:v2.2.1 + image: radondb/xenon:v2.3.0 admitDefeatHearbeatCount: 5 electionTimeout: 10000 @@ -61,7 +61,7 @@ spec: podPolicy: imagePullPolicy: IfNotPresent - sidecarImage: radondb/mysql80-sidecar:v2.2.1 + sidecarImage: radondb/mysql80-sidecar:v2.3.0 busyboxImage: busybox:1.32 slowLogTail: false diff --git a/config/samples/mysql_v1alpha1_mysqlcluster_podAntiAffinity.yaml b/config/samples/mysql_v1alpha1_mysqlcluster_podAntiAffinity.yaml index 79f64599..eaa98507 100644 --- a/config/samples/mysql_v1alpha1_mysqlcluster_podAntiAffinity.yaml +++ b/config/samples/mysql_v1alpha1_mysqlcluster_podAntiAffinity.yaml @@ -34,7 +34,7 @@ spec: memory: 1Gi xenonOpts: - image: radondb/xenon:v2.2.1 + image: radondb/xenon:v2.3.0 admitDefeatHearbeatCount: 5 electionTimeout: 10000 @@ -60,7 +60,7 @@ spec: podPolicy: imagePullPolicy: IfNotPresent - sidecarImage: radondb/mysql57-sidecar:v2.2.1 + sidecarImage: radondb/mysql57-sidecar:v2.3.0 busyboxImage: busybox:1.32 slowLogTail: false diff --git a/test/e2e/framework/mysqlcluster.go b/test/e2e/framework/mysqlcluster.go index 3a3624c9..aadc3509 100644 --- a/test/e2e/framework/mysqlcluster.go +++ b/test/e2e/framework/mysqlcluster.go @@ -42,7 +42,7 @@ metadata: spec: replicas: %d xenonOpts: - image: radondb/xenon:v2.2.1 + image: radondb/xenon:v2.3.0 ` MySQL57ReleaseAssetURL = "https://github.com/radondb/radondb-mysql-kubernetes/releases/latest/download/mysql_v1alpha1_mysqlcluster.yaml" ) diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 708bb521..366aa8b8 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -36,9 +36,9 @@ const ( LogDirPrefix = "" // // Image path of mysql operator. - // OperatorImagePath = "radondb/mysql-operator:v2.2.1" + // OperatorImagePath = "radondb/mysql-operator:v2.3.0" // Image path for mysql sidecar. - SidecarImagePath = "radondb/mysql57-sidecar:v2.2.1" + SidecarImagePath = "radondb/mysql57-sidecar:v2.3.0" // The namespace where the resource created by E2E. E2ETestNamespace = "radondb-mysql-e2e"