Skip to content

Commit 7f1b284

Browse files
committed
Set default value for suggestion container name
1 parent 427f115 commit 7f1b284

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/controller.v1beta1/suggestion/composer/composer.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ func (g *General) desiredContainers(s *suggestionsv1beta1.Suggestion,
184184
containers := []corev1.Container{}
185185
suggestionContainer := suggestionConfigData.Container
186186

187+
// Assign default values for suggestionContainer fields that are not set via
188+
// the suggestion config.
189+
190+
if suggestionContainer.Name == "" {
191+
suggestionContainer.Name = consts.ContainerSuggestion
192+
}
193+
187194
if len(suggestionContainer.Ports) == 0 {
188195
suggestionContainer.Ports = []corev1.ContainerPort{
189196
{

0 commit comments

Comments
 (0)