Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
```

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion example/example-etcd-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ metadata:
# etcd.database.coreos.com/scope: clusterwide
spec:
size: 3
version: "3.2.13"
version: "v3.2.13"
3 changes: 2 additions & 1 deletion pkg/apis/etcd/v1beta2/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/k8sutil/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down