Skip to content

Commit

Permalink
Set default value for suggestion container name
Browse files Browse the repository at this point in the history
  • Loading branch information
fischor committed Dec 17, 2022
1 parent 427f115 commit 7f1b284
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/controller.v1beta1/suggestion/composer/composer.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ func (g *General) desiredContainers(s *suggestionsv1beta1.Suggestion,
containers := []corev1.Container{}
suggestionContainer := suggestionConfigData.Container

// Assign default values for suggestionContainer fields that are not set via
// the suggestion config.

if suggestionContainer.Name == "" {
suggestionContainer.Name = consts.ContainerSuggestion
}

if len(suggestionContainer.Ports) == 0 {
suggestionContainer.Ports = []corev1.ContainerPort{
{
Expand Down

0 comments on commit 7f1b284

Please sign in to comment.