Skip to content

NO-JIRA: add logging when rendering bootstrap manifests #770

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

Merged
Merged
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
3 changes: 3 additions & 0 deletions pkg/cmd/render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/openshift/library-go/pkg/operator/resource/resourceapply"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
klog "k8s.io/klog/v2"
)

const (
Expand Down Expand Up @@ -45,12 +46,14 @@ func (ro *RenderOptions) Run() error {
}

for _, assetToRender := range ro.AssetsToRender {
klog.Info("rendering asset ", assetToRender)
asset, err := ro.Assets(assetToRender)
if err != nil {
return fmt.Errorf("getting asset %q to be rendered: %w", assetToRender, err)
}

filename := filepath.Join(ro.AssetOutputDir, filepath.Base(assetToRender))
klog.Info("writing asset to ", filename)
err = os.WriteFile(filename, asset, FileModeFileDefault)
if err != nil {
return fmt.Errorf("rendering asset %q to file %q: %w ", assetToRender, filename, err)
Expand Down