-
Notifications
You must be signed in to change notification settings - Fork 596
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
including conditions when starting side cars docker containers #4815
Conversation
putStringIfNotEmpty(root, "sidecarReadyCommand", m.Spec.Sidecars[0].ReadyCommand) | ||
// if there one side car do not check conditions and consider the only side care as default . this is default behaviour | ||
// if there are more than one side car then check conditions, | ||
if len(m.Spec.Sidecars) == 1 { |
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.
merge with outer `if
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.
That would slightly change the meaning, but looping over empty sidecars should be fine. But why do we need those if
s at all? Why shouldn't one sidecar
have a condition? Taking always the else
case (i.e. looping over all sidecars) should always working, for 0,1 and many.
putStringIfNotEmpty(root, "sidecarReadyCommand", m.Spec.Sidecars[0].ReadyCommand) | ||
// if there one side car do not check conditions and consider the only side care as default . this is default behaviour | ||
// if there are more than one side car then check conditions, | ||
if len(m.Spec.Sidecars) == 1 { |
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.
That would slightly change the meaning, but looping over empty sidecars should be fine. But why do we need those if
s at all? Why shouldn't one sidecar
have a condition? Taking always the else
case (i.e. looping over all sidecars) should always working, for 0,1 and many.
|
/it-go |
Changes
when adding side cars for a piper step, this PR allows to bring in conditions when selecting a side care from conditions