Skip to content

Commit

Permalink
store non exist parameter differently (kubeflow#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
IronPan authored and k8s-ci-robot committed Mar 6, 2019
1 parent a583626 commit 3bbfd95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions bootstrap/cmd/bootstrap/app/ksServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ func (s *ksServer) appGenerate(kfApp kApp.App, appConfig *kstypes.AppConfig) err
}
}
// Apply Params
for _, p := range appConfig.Parameters {
for _, p := range appConfig.ApplyParameters {
err = actions.RunParamSet(map[string]interface{}{
actions.OptionAppRoot: kfApp.Root(),
actions.OptionName: p.Component,
Expand Down Expand Up @@ -1296,14 +1296,14 @@ func makeDeployEndpoint(svc KsService) endpoint.Endpoint {
r.Err = err.Error()
return r, err
}
req.AppConfig.Parameters = append(
req.AppConfig.Parameters,
req.AppConfig.ApplyParameters = append(
req.AppConfig.ApplyParameters,
kstypes.KsParameter{
Component: "pipeline",
Name: "mysqlPd",
Value: req.Name + StorageDmSpec.DmNameSuffix + MetadataStoreDiskSuffix})
req.AppConfig.Parameters = append(
req.AppConfig.Parameters,
req.AppConfig.ApplyParameters = append(
req.AppConfig.ApplyParameters,
kstypes.KsParameter{
Component: "pipeline",
Name: "minioPd",
Expand Down
12 changes: 7 additions & 5 deletions bootstrap/pkg/apis/apps/ksonnet/v1alpha1/application_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,12 @@ type RegistriesConfigFile struct {
}

type AppConfig struct {
Registries []*RegistryConfig `json:"registries,omitempty"`
Packages []KsPackage `json:"packages,omitempty"`
Components []KsComponent `json:"components,omitempty"`
Parameters []KsParameter `json:"parameters,omitempty"`
Registries []*RegistryConfig `json:"registries,omitempty"`
Packages []KsPackage `json:"packages,omitempty"`
Components []KsComponent `json:"components,omitempty"`
Parameters []KsParameter `json:"parameters,omitempty"`
// Parameters to apply when creating the ksonnet components
ApplyParameters []KsParameter `json:"applyParameters,omitempty"`
}

type NameValue struct {
Expand Down Expand Up @@ -250,7 +252,7 @@ type Ksonnet struct {
type KsAppList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Ksonnet `json:"items"`
Items []Ksonnet `json:"items"`
}

func init() {
Expand Down

0 comments on commit 3bbfd95

Please sign in to comment.