-
Notifications
You must be signed in to change notification settings - Fork 72
fix: set-image
with more matching rules
#909
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
base: master
Are you sure you want to change the base?
Conversation
// getContainers gets the containers inside kubeObject | ||
func getContainers(o *fn.KubeObject) fn.SliceSubObjects { | ||
switch o.GetKind() { | ||
case "Pod": | ||
return getPodContainers(o) | ||
case "Deployment", "StatefulSet", "ReplicaSet", "DaemonSet", "PodTemplate": | ||
return getPodSpecContainers(o) | ||
} | ||
return nil | ||
} |
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.
suggest adding it back to the main Run
method. This part belongs to the main logic so it's better to be replaced in the main function
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.
Run
method already uses this function getContianers
, I have this as a separate function because I feel I need to iterate containers twice, once for validating user input if image name is not provided, once for update container images. To reduce code duplication, I have this function here.
to fix issue kptdev/kpt#3444
provide
containerName
andimageName
as input, supportcontainerName
matching, supportimageName
omission inside input