diff --git a/pkg/kfconfig/loaders/v1.go b/pkg/kfconfig/loaders/v1.go index 8d162650..77ad05b2 100644 --- a/pkg/kfconfig/loaders/v1.go +++ b/pkg/kfconfig/loaders/v1.go @@ -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, } diff --git a/pkg/kfconfig/types.go b/pkg/kfconfig/types.go index ed7e2acf..17336353 100644 --- a/pkg/kfconfig/types.go +++ b/pkg/kfconfig/types.go @@ -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",