Skip to content

Commit

Permalink
Replace ephemeral environments with override parameters (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmt authored Mar 26, 2018
1 parent 817b13c commit 234ace1
Show file tree
Hide file tree
Showing 15 changed files with 547 additions and 433 deletions.
18 changes: 13 additions & 5 deletions controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,21 @@ func (ctrl *ApplicationController) tryRefreshAppStatus(app *appv1.Application) (
Password: "",
}
}
overrides := make([]*appv1.ComponentParameterOverride, len(app.Spec.Source.ComponentParameterOverrides))
if app.Spec.Source.ComponentParameterOverrides != nil {
for i := range app.Spec.Source.ComponentParameterOverrides {
item := app.Spec.Source.ComponentParameterOverrides[i]
overrides[i] = &item
}
}
revision := app.Spec.Source.TargetRevision
manifestInfo, err := client.GenerateManifest(context.Background(), &repository.ManifestRequest{
Repo: repo,
Revision: revision,
Path: app.Spec.Source.Path,
Environment: app.Spec.Source.Environment,
AppLabel: app.Name,
Repo: repo,
Revision: revision,
Path: app.Spec.Source.Path,
Environment: app.Spec.Source.Environment,
AppLabel: app.Name,
ComponentParameterOverrides: overrides,
})
if err != nil {
log.Errorf("Failed to load application manifest %v", err)
Expand Down
Loading

0 comments on commit 234ace1

Please sign in to comment.