keel-hq / keel

Kubernetes Operator to automate Helm, DaemonSet, StatefulSet & Deployment updates
https://keel.sh
Mozilla Public License 2.0
2.44k stars 283 forks source link

Keel configured with polling does not trigger update when image hash changes #462

Open patricialarisa opened 4 years ago

patricialarisa commented 4 years ago

Is this expected behavior?

When the latest tag moves to another hash/image, it is obvious that the image developers want this new latest-tagged-image to be used as latest, even if the version is not semver. Therefore, even with non-semver tags, keel should detect the hash change and trigger an update accordingly. Is there any reason for keel not to do that?

rusenask commented 4 years ago

Hi, Keel does this, can you share more details about the policy that you use and image tag example?

On 25 Nov 2019, at 16:15, patricialarisa notifications@github.com wrote:

Is this expected behavior?

When the latest tag moves to another hash/image, it is obvious that the image developers want this new latest-tagged-image to be used as latest, even if the version is not semver. Therefore, even with non-semver tags, keel should detect the hash change and trigger an update accordingly. Is there any reason for keel not to do that?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

patricialarisa commented 4 years ago

Hi,

I have tried on images like:

de.icr.io/name1/develop/image:latest-api1.7.1 de.icr.io/name1/develop/image:latest

And for specifying the policy I have used the labels:

keel.sh/policy: all keel.sh/trigger: poll

Also tried with:

keel.sh/policy: force keel.sh/match-tag=true

Keel was installed using Helm.

patricialarisa commented 4 years ago

Hi,

I have tried on images like:

de.icr.io/name1/develop/image:latest-api1.7.1 de.icr.io/name1/develop/image:latest

And for specifying the policy I have used the labels:

keel.sh/policy: all keel.sh/trigger: poll

Also tried with:

keel.sh/policy: force keel.sh/match-tag=true

Keel was installed using Helm.

Another thing that I noticed in the logs is that when the digest check is done, the current digest is equal to the new digest(both of them having the value of the digest of the image it should be updated to). Which I expected to be different considering the update is performed if there are differences between digests, right? checking_digest

The pod: pod_digest

And the container registry: digest_CR

rusenask commented 4 years ago

Try poll and force together, I have similar setup for many deployments

On 26 Nov 2019, at 08:19, patricialarisa notifications@github.com wrote:

Hi,

I have tried on images like:

de.icr.io/name1/develop/image:latest-api1.7.1 de.icr.io/name1/develop/image:latest

And for specifying the policy I have used the labels:

keel.sh/policy: all keel.sh/trigger: poll

Also tried with:

keel.sh/policy: force keel.sh/match-tag=true

Keel was installed using Helm.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

patricialarisa commented 4 years ago

Try poll and force together, I have similar setup for many deployments On 26 Nov 2019, at 08:19, patricialarisa @.***> wrote: Hi, I have tried on images like: de.icr.io/name1/develop/image:latest-api1.7.1 de.icr.io/name1/develop/image:latest And for specifying the policy I have used the labels: keel.sh/policy: all keel.sh/trigger: poll Also tried with: keel.sh/policy: force keel.sh/match-tag=true Keel was installed using Helm. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

I found what was the problem: I didn't have a name label on the deployment, a name in the metadata of the template and an app label in template's metadata. Added those and then worked. I don't know if all of them are necessary, I will keep on testing by adding them one by one. issue

Thank you for your help !