-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add image override #355
Add image override #355
Conversation
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.
You wouldn't know this.
You have to run make generate manifests
and commit the generated yaml and code. Otherwise, the kube api won't pick up the new field.
Ideally, CICD step catches this one day.
@@ -0,0 +1,22 @@ | |||
name: Kube Manifests |
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.
❤️
internal/fullnode/build_pods.go
Outdated
if o.Image != "" { | ||
pod.Spec.Containers[0].Image = o.Image | ||
} |
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.
Using the first image in the slice is the natural logic.
But I've gotten in trouble with this in the past. The user is able to patch and add whatever containers they want. This possibility is a tradeoff of the operator's flexibility. Therefore, if the user patches, there is no guarantee the node
container will be the first one. So, I suggest finding the specific node container vs. using the slice index.
I'll push a commit tomorrow morning.
Allow user to override the image for a specific pod, useful if pods are at different sync heights during initial sync.