-
Notifications
You must be signed in to change notification settings - Fork 27
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
Init job creates from InstanceSpec image if specified #336
Conversation
cc @l0kix2 |
pkg/components/helpers.go
Outdated
@@ -227,3 +227,10 @@ func AddInitContainersToPodSpec(initContainers []string, podSpec *corev1.PodSpec | |||
podSpec.InitContainers = append(containers, podSpec.InitContainers...) | |||
return nil | |||
} | |||
|
|||
func SelectTrueImage(coreImage string, instanceImage *string) string { |
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.
suppose it can be non-exported since we are using it in the components package only
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.
And the name TrueImage sounds like some soft for windows. Let's maybe call It SelectEffectiveImage
.
Also, I would expect a signature like getImageWithDefault(componentImage, defaultImage string)
I've realized that there is an issue with this change since all jobs require yt cli installed, but strawberry and UI have different images which can't be used for k8s job. I'll fix that |
Before this change if resource(master/chyt/scheduler etc.) is updated the init job still uses outdated image from
Spec.CoreImage
.This change corrects this behavior, and if the more relevant image exists it gonna be used instead (relevant image for each resource)
Closes #157