// GetAllApplicationWithDefaultApp will not to create default application if default application not found
// note: this func will return all app meta, includes invalid application(uninstalled)
GetAllApplicationWithDefaultApp will not to create default application if default application not found
note: this func will return all app meta, includes invalid application(uninstalled)
// GetAllApplicationWithDefaultApp will not to create default application if default application not found // note : this func will return all app meta includes invalid application ( uninstalled )
func GetAllApplicationWithDefaultApp(namespace, kubeconfigPath string) []*appmeta.ApplicationMeta {
	kubeconfigBytes, _ := ioutil.ReadFile(kubeconfigPath)
	applicationMetaList := appmeta_manager.GetApplicationMetas(
		namespace, kubeconfigBytes,
		func(meta *appmeta.ApplicationMeta) bool {
			return true
		},
	)
	var foundDefaultApp bool
	for _, meta := range applicationMetaList {
		if meta.Application == _const.DefaultNocalhostApplication {
			foundDefaultApp = true
		}
	}
	if !foundDefaultApp {
		applicationMetaList = append(
			applicationMetaList, appmeta.FakeAppMeta(namespace, _const.DefaultNocalhostApplication),
		)
	}
	SortApplication(applicationMetaList)
	return applicationMetaList
}
func GetAllApplicationWithDefaultApp ( namespace , kubeconfigPath string ) [ ] * appmeta . ApplicationMeta { kubeconfigBytes , _ := ioutil . ReadFile ( kubeconfigPath ) applicationMetaList := appmeta_manager . GetApplicationMetas ( namespace , kubeconfigBytes , func ( meta * appmeta . ApplicationMeta ) bool { return true } , ) var foundDefaultApp bool for _ , meta := range applicationMetaList { if meta . Application == _const . DefaultNocalhostApplication { foundDefaultApp = true } } if ! foundDefaultApp { applicationMetaList = append ( applicationMetaList , appmeta . FakeAppMeta ( namespace , _const . DefaultNocalhostApplication ) , ) } SortApplication ( applicationMetaList ) return applicationMetaList }
GetAllApplicationWithDefaultApp will not to create default application if default application not found
note: this func will return all app meta, includes invalid application(uninstalled)
GetAllApplicationWithDefaultApp will not to create default application if default application not found note : this func will return all app meta includes invalid application ( uninstalled )