diff --git a/README.md b/README.md index c3f760527..903dcac53 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ metadata: name: "example-etcd-cluster" spec: size: 5 - version: "3.2.13" + version: "v3.2.13" ``` Apply the size change to the cluster CR: @@ -129,7 +129,7 @@ metadata: name: "example-etcd-cluster" spec: size: 3 - version: "3.2.13" + version: "v3.2.13" ``` ``` $ kubectl apply -f example/example-etcd-cluster.yaml @@ -222,7 +222,7 @@ metadata: name: "example-etcd-cluster" spec: size: 3 - version: "3.1.10" + version: "v3.1.10" repository: "quay.io/coreos/etcd" ``` @@ -254,7 +254,7 @@ metadata: name: "example-etcd-cluster" spec: size: 3 - version: "3.2.13" + version: "v3.2.13" ``` Apply the version change to the cluster CR: diff --git a/example/example-etcd-cluster.yaml b/example/example-etcd-cluster.yaml index 8f5144122..1c2169751 100644 --- a/example/example-etcd-cluster.yaml +++ b/example/example-etcd-cluster.yaml @@ -8,4 +8,4 @@ metadata: # etcd.database.coreos.com/scope: clusterwide spec: size: 3 - version: "3.2.13" + version: "v3.2.13" diff --git a/pkg/apis/etcd/v1beta2/cluster.go b/pkg/apis/etcd/v1beta2/cluster.go index ddfe0cf62..44f2c7ca2 100644 --- a/pkg/apis/etcd/v1beta2/cluster.go +++ b/pkg/apis/etcd/v1beta2/cluster.go @@ -189,7 +189,8 @@ func (e *EtcdCluster) SetDefaults() { c.Version = DefaultEtcdVersion } - c.Version = strings.TrimLeft(c.Version, "v") + // not used anymore, we take the full version name as final version (not prepending v to the version) + // c.Version = strings.TrimLeft(c.Version, "v") // convert PodPolicy.AntiAffinity to Pod.Affinity.PodAntiAffinity // TODO: Remove this once PodPolicy.AntiAffinity is removed diff --git a/pkg/util/k8sutil/k8sutil.go b/pkg/util/k8sutil/k8sutil.go index 5b3dc95ae..082775edf 100644 --- a/pkg/util/k8sutil/k8sutil.go +++ b/pkg/util/k8sutil/k8sutil.go @@ -135,7 +135,7 @@ fi } func ImageName(repo, version string) string { - return fmt.Sprintf("%s:v%v", repo, version) + return fmt.Sprintf("%s:%s", repo, version) } // imageNameBusybox returns the default image for busybox init container, or the image specified in the PodPolicy