Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Automated cherry pick of #438: fail build on missing application name #446

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pkg/kfconfig/loaders/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ func (v V1) LoadKfConfig(def interface{}) (*kfconfig.KfConfig, error) {
config.Annotations = kfdef.Annotations
config.ClusterName = kfdef.ClusterName
config.Spec.Version = kfdef.Spec.Version
for _, app := range kfdef.Spec.Applications {
for i, app := range kfdef.Spec.Applications {
if app.Name == "" {
return nil, &kfapis.KfError{
Code: int(kfapis.INVALID_ARGUMENT),
Message: fmt.Sprintf("must have name for application. missing application name on application[%d] in kfdef", i),
}
}
application := kfconfig.Application{
Name: app.Name,
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/kfconfig/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ func (c *KfConfig) SetApplicationParameter(appName string, paramName string, val
"profiles": KfAppsStackName,
"dex": "dex",
// Spartakus is its own application because we want kfctl to be able to remove it.
"spartakus": "spartakus",
"spartakus": "spartakus",
// AWS Specific
"aws-alb-ingress-controller": KfAppsStackName,
"istio-ingress": "istio-ingress",
Expand Down