Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

removed auto-adding v to the etcd image version #2079

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

prune998
Copy link

When creating an etcdCluster resource, you provide an Image and a Version. Version` is a semver version depending on the EtcD image version you wish to use.

The default is to use Quay images, which are versioned using a pattern of v + semver, like v3.0.12.

So defining :

apiVersion: "etcd.database.coreos.com/v1beta2"
kind: "EtcdCluster"
metadata:
  name: "example-etcd-cluster"
spec:
  size: 3
  version: "3.1.10"
  repository: "quay.io/coreos/etcd"

Will create a Pod using image quay.io/coreos/etcd:v3.1.10.

This may be fine with Quay images, but when you are working with other Docker Registries, you may not want to add the v to the version.

The Operator should not force you to use a specific version pattern.

This PR removes the v addition to the version, allowing to use a real version name in the CRD.

@etcd-bot
Copy link
Collaborator

Can one of the admins verify this patch?

2 similar comments
@etcd-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@etcd-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@alaypatel07
Copy link
Collaborator

I am wondering if instead of composing the image name using repository and version, it would be simpler to replace it with a key called image? The CR will look like:

apiVersion: "etcd.database.coreos.com/v1beta2"
kind: "EtcdCluster"
metadata:
  name: "example-etcd-cluster"
spec:
  size: 3
  image: "quay.io/coreos/etcd:v3.1.10"

@prune998
Copy link
Author

Maybe doing this will make it harder to manage the upgrade process when only the image version is changed ?
That would also imply an API change, while this PR does not.

@alaypatel07
Copy link
Collaborator

I could be wrong, but I thought if we can compare the image instead of version here, the upgrade process can be handled.

Agreed, this would mean an API change, and I do not know if we would want it for simplicity or not.

@xmlking
Copy link

xmlking commented Oct 30, 2019

we also have issue with auto-adding v
our Pod Security Policy restrict images using with version number. we have to sign them and we have to use tag with digest something like this "sha256:4567464gfjfjfgjfjfjfjfjjfjfjfjfj354345534" if it adds "v" , then it breaks

@NormanFoxLee
Copy link

Is it possible to add digest: so we can use image@digest instead image:version?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants