Skip to content

Commit 004f44e

Browse files
author
Moritz Clasmeier
committed
Use new AssembleRoxieEnvironment for setting up post-deployment sub-shell
1 parent 8740688 commit 004f44e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

cmd/deploy.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import (
1818
"github.com/stackrox/roxie/internal/env"
1919
"github.com/stackrox/roxie/internal/helpers"
2020
"github.com/stackrox/roxie/internal/logger"
21+
"github.com/stackrox/roxie/internal/manifest"
22+
"github.com/stackrox/roxie/internal/roxieenv"
2123
"github.com/stackrox/roxie/internal/types"
2224

2325
"github.com/stackrox/roxie/internal/stackroxversions"
@@ -337,6 +339,17 @@ func runDeploy(cmd *cobra.Command, args []string) error {
337339
d.WaitForCentral(5 * time.Minute)
338340
}
339341

342+
if components.IncludesCentral() && !dryRun {
343+
roxieEnv := roxieenv.AssembleRoxieEnvironment(d.GetCentralDeploymentInfo())
344+
m := manifest.RoxieManifest{
345+
RoxieEnvironment: roxieEnv,
346+
Config: deploySettings,
347+
}
348+
if err := manifest.CreateManifestSecretOnCluster(ctx, log, m); err != nil {
349+
log.Warningf("Failed to save roxie manifest: %v", err)
350+
}
351+
}
352+
340353
if components.IncludesCentral() && envrc == "" {
341354
if err := spawnSubshell(d, log); err != nil {
342355
return fmt.Errorf("failed to spawn subshell: %w", err)

0 commit comments

Comments
 (0)