Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: slog dev deploy #3176

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/pkg/packager/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ var (
)

func (p *Packager) resetRegistryHPA(ctx context.Context) {
l := logger.From(ctx)
if p.isConnectedToCluster() && p.hpaModified {
if err := p.cluster.EnableRegHPAScaleDown(ctx); err != nil {
message.Debugf("unable to reenable the registry HPA scale down: %s", err.Error())
l.Debug("unable to reenable the registry HPA scale down", "error", err.Error())
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/pkg/packager/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import (
"fmt"
"os"
"runtime"
"time"

"github.com/defenseunicorns/pkg/helpers/v2"
"github.com/zarf-dev/zarf/src/config"
"github.com/zarf-dev/zarf/src/pkg/layout"
"github.com/zarf-dev/zarf/src/pkg/logger"
"github.com/zarf-dev/zarf/src/pkg/message"
"github.com/zarf-dev/zarf/src/pkg/packager/creator"
"github.com/zarf-dev/zarf/src/pkg/packager/filters"
Expand All @@ -21,6 +23,8 @@ import (

// DevDeploy creates + deploys a package in one shot
func (p *Packager) DevDeploy(ctx context.Context) error {
l := logger.From(ctx)
start := time.Now()
config.CommonOptions.Confirm = true
p.cfg.CreateOpts.SkipSBOM = !p.cfg.CreateOpts.NoYOLO

Expand Down Expand Up @@ -74,6 +78,7 @@ func (p *Packager) DevDeploy(ctx context.Context) error {
}

message.HeaderInfof("📦 PACKAGE DEPLOY %s", p.cfg.Pkg.Metadata.Name)
l.Info("starting package deploy", "name", p.cfg.Pkg.Metadata.Name)

if !p.cfg.CreateOpts.NoYOLO {
p.cfg.Pkg.Metadata.YOLO = true
Expand Down Expand Up @@ -108,10 +113,12 @@ func (p *Packager) DevDeploy(ctx context.Context) error {
}
if len(deployedComponents) == 0 {
message.Warn("No components were selected for deployment. Inspect the package to view the available components and select components interactively or by name with \"--components\"")
l.Warn("No components were selected for deployment. Inspect the package to view the available components and select components interactively or by name with \"--components\"")
}

// Notify all the things about the successful deployment
message.Successf("Zarf dev deployment complete")
l.Debug("dev deployment complete", "package", p.cfg.Pkg.Metadata.Name, "duration", time.Since(start))

message.HorizontalRule()
message.Title("Next steps:", "")
Expand Down