Repository navigation
Improve Image Builder Jobs Label and Annotation - #380
Conversation
…image builder job
| Tolerations: cfg.ImageBuilderConfig.Tolerations, | ||
| NodeSelectors: cfg.ImageBuilderConfig.NodeSelectors, | ||
| MaximumRetry: cfg.ImageBuilderConfig.MaximumRetry, | ||
| JobSafeToEvict: cfg.ImageBuilderConfig.JobSafeToEvict, |
There was a problem hiding this comment.
Nit: Shall we just call this SafeToEvict as opposed to JobSafeToEvict ? For 2 reasons:
- Since this property only corresponds to imagebuilding and it's found under the
ImageBuilder.Config, I feel thatSafeToEvictis more concise. JobSafeToEvictmay cause some confusion with prediction job for the readers (like myself, the first time I read it).
There was a problem hiding this comment.
Got it. I understand your confusion. I have updated this part.
| } | ||
|
|
||
| annotations := map[string]string{ | ||
| "cluster-autoscaler.kubernetes.io/safe-to-evict": fmt.Sprint(c.config.JobSafeToEvict), |
There was a problem hiding this comment.
Should we conditionally set this label only when it's supposed to be "false" ? Though we don't currently plan to use the value "true", I'm afraid that if we do so at some point in the future, it will make it more prone to eviction than usual (doc: https://kubernetes.io/docs/reference/labels-annotations-taints/#cluster-autoscaler-kubernetes-io-safe-to-evict).
There was a problem hiding this comment.
Ah, TIL. Thanks!
|
|
||
| annotations := make(map[string]string) | ||
| if !c.config.SafeToEvict { | ||
| annotations["cluster-autoscaler.kubernetes.io/safe-to-evict"] = fmt.Sprint(c.config.SafeToEvict) |
There was a problem hiding this comment.
Super nit: this can just be:
annotations["cluster-autoscaler.kubernetes.io/safe-to-evict"] = "false"Also, perhaps we can leave an inline comment on why we add this annotation conditionally, linking to the doc?
krithika369
left a comment
There was a problem hiding this comment.
LGTM. Thanks, @ariefrahmansyah !
What this PR does / why we need it:
a. Removing the duplicate of kserve-controller-manager statefulset as in kserve 0.9.0 manifest has both of statefulset and deployment
b. Removing kserve-controller-manager's cpu limits
Does this PR introduce a user-facing change?:
Checklist