Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

don't render empty kubernetes yaml lists #825

Merged
merged 3 commits into from
Feb 8, 2019

Conversation

laverya
Copy link
Member

@laverya laverya commented Feb 8, 2019

What I Did

Added a list length check to the render step - and only render the list if the length is nonzero.

How I Did it

How to verify it

Description for the Changelog

Empty kubernetes lists will not be included in ship output.

Picture of a Boat (not required but encouraged)

USS Carpenter (DD-825)

@laverya laverya added the wip Work in progress label Feb 8, 2019
@laverya laverya requested a review from Rob0h February 8, 2019 02:30
@laverya laverya removed the wip Work in progress label Feb 8, 2019
@@ -121,16 +121,16 @@ func (l *Unforker) Execute(ctx context.Context, release *api.Release, step api.U
return nil
}

func (l *Unforker) unforkBuild(kustomizePath string) ([]postKustomizeFile, error) {
debug := level.Debug(log.With(l.Logger, "struct", "daemonless.unforker", "method", "kustomizeBuild"))
func (l *Unforker) unforkBuild(kustomizePath string) ([]util.PostKustomizeFile, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@laverya laverya merged commit 847d4d3 into replicatedhq:master Feb 8, 2019
@laverya laverya deleted the dont-render-empty-lists branch February 8, 2019 19:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants