-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: allow user to override image repository #76
base: main
Are you sure you want to change the base?
Conversation
0a635d0
to
2fedd1d
Compare
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.
Thanks for the PR. The idea loosk good. But you need to do the changes to the /packaging/helm-charts
directory. The /helm-charts
directory is changed only by a new release.
Oh, didn't catch that the first time amended to change the correct files only |
a5eda41
to
ce468a7
Compare
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.
Ok, look like we have one more problem. The reguar installation files are generated from this and you changed them by adding the image pull policy. You would either need to commit those changes to the PR or maybe better, keep the field unset and set it in tzhe deployment only if set by the user. E.g. something like this in the operators Helm chart: https://github.com/strimzi/strimzi-kafka-operator/blob/main/helm-charts/helm3/strimzi-kafka-operator/templates/060-Deployment-strimzi-cluster-operator.yaml#L65-L67
Sorry, I should have noticed it the first time.
ce468a7
to
3928f54
Compare
I removed the pullPolicy when I reviewed the code again I realized it wasn't needed I also accidentally changed the default tag in this path from latest to a version which wasn't needed becasue your setting that when you build the chart. |
@im-konge How are the Helm Chart STs here supposed to work? From the code, it seems they expect here to be three values in the Helm Chart:
And there likely should be fourth part But it seems that only the I guess we should follow what we do in other Strimzi Helm Charts and have: image:
registry: quay.io
repository: strimzi
name: access-operator
tag: latest
pullPolicy: "" And have something like this in the Deployment? image: {{ .Values.image.registry }}/{{ .Values.image.repository}}/{{ .Values.image.name }}:{{ .Values.image.tag }}
{{- if .Values.image.pullPolicy }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }} Do you think that would make the STs work? |
@scholzj I will have a look today at the morning. Sorry for the issues. |
@scholzj yeah I think that when I was writing the tests and everything, I just copied the stuff we have for DrainCleaner for the Helm installation -> there we have exactly this:
so having the whole block as you mentioned should fix the issue. For the name -> I can create a PR here and also to the DrainCleaner repo to make it configurable. The reason why I didn't add it there is that we actually never needed to change the name of the image and kept it as it is (even when we are building the images in the AZP). |
@ryanfaircloth could you please change the values.yaml and the Deployment YAML as @scholzj suggested? It should fix the issue with the tests and also make it consistent to the Deployment files we have in Strimzi and DrainCleaner. Because currently, we are configuring the registry to point to local ones, but it should be just instead of Thanks a lot! And sorry for issues... I should have check it sooner. |
Allow the image repo to be set in values so that customers can use private registries. Signed-off-by: Ryan Faircloth <[email protected]>
3928f54
to
925f957
Compare
No problem changes made. I also found a better solution to the syntax highly error with pullPolicy |
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, thanks :)
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.
Thanks @ryanfaircloth
Allow the image repo to be set in values so that customers can use private registries. Also set pullPolicy in values to the default rather than null