-
Notifications
You must be signed in to change notification settings - Fork 225
Kafka source image policy #303
Kafka source image policy #303
Conversation
/assign @dubee |
@aslom: GitHub didn't allow me to assign the following users: dubee. Note that only knative members and repo collaborators can be assigned. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @matzew |
…_policy # Conflicts: # contrib/kafka/pkg/reconciler/kafkasource.go
When would we ever want the policy to be |
Copied from #299 since the comment is really about the implementation here that exposes a config option: Why make this an option instead of just changing it from Always to IfNotPresent? Won't this reference an image reference be an image digest once we cut a release, and thus IfNotPresent sufficient? |
@bbrowning you may want different policies depending on your k8s policies, for example how you do upgrades? |
If you look at our generated release.yaml files, you'll see image references like:
Those are image digests, and thus unique. IfNotPresent seems like the sensible default and I can't see why you'd ever want to change that to Always? |
BTW: wit this PR default is for imagePullPolicy is IfNotPresent and you can override not only to Always but also to Never |
wasnt that changed to IfNotPresent? I think we talked about that.
If not, send a PR ;-)
On Wed 27. Mar 2019 at 21:48, Aleksander Slominski ***@***.***> wrote:
BTW: wit this PR default is for imagePullPolicy is IfNotPresent and you
can override not only to Always but also to Never
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#303 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJnzhdix9QMlu8hy_8lsYsOwsOP5tk8ks5va9kZgaJpZM4cOnYn>
.
--
Sent from Gmail Mobile
|
the default value for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbrowning, I was using an image pull policy of always for development purposes. After updating the event source locally and publishing it to my container registry, my cluster didn't always seem to pull down the updated image when I deployed a new event source to test my changes.
Perhaps this solves the problem. 👍 |
@@ -32,10 +32,12 @@ spec: | |||
containers: | |||
- name: manager | |||
image: github.com/knative/eventing-sources/contrib/kafka/cmd/controller | |||
imagePullPolicy: Always | |||
imagePullPolicy: IfNotPresent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could remove it instead of making IfNotPresent as I think k8s default policy is Always - do you want it to be removed? @matzew @dubee @lionelvillard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break integration tests
env: | ||
- name: KAFKA_RA_IMAGE | ||
value: github.com/knative/eventing-sources/contrib/kafka/cmd/receive_adapter | ||
- name: KAFKA_RA_IMAGE_PULL_POLLICY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dubee @matzew @lionelvillard @bbrowning I have added comments to lines of code above showing changes about image policy - please comment what you think is missing/need changing. |
Here is what I found in k8s docs - the default pull policy is IfNotPresent for non latest tagged images: Considering how complex it is making receiver adapter image pull policy configurable is good? 5 separate cases: |
Perhaps you were using tags and not digests to reference your image? Knative releases specifically use digests for all image references to avoid this issue. |
@bbrowning @dubee I made the changes - image pull policy setting is now removed form kafka source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@dubee: changing LGTM is restricted to assignees, and only knative/eventing-sources repo collaborators may be assigned issues. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
PASS ok github.com/knative/eventing-sources/contrib/kafka/pkg/reconciler 0.049s
/lgtm |
/ok-to-test |
/test pull-knative-eventing-sources-integration-tests |
2 similar comments
/test pull-knative-eventing-sources-integration-tests |
/test pull-knative-eventing-sources-integration-tests |
/ok-to-test |
/approve |
@n3wscott mind doing an approve ? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aslom, dubee, matzew, n3wscott The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Solves #299