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

support: template --output-dir some_dir #587

Merged
merged 9 commits into from
May 10, 2022
Merged

support: template --output-dir some_dir #587

merged 9 commits into from
May 10, 2022

Conversation

intrand
Copy link
Contributor

@intrand intrand commented May 5, 2022

This PR fixes #572

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

Implement support for passing reckoner template --output-dir some_directory to make reckoner more gitops friendly. This will allow reckoner to stage manifests for other tools/PRs to gitops repos.

What alternative solution should we consider, if any?

Using reckoner template output as input to another tool, like kubectl-neat for example.

Another note: the template command does not have a configurable continue-on-error like other commands. We should probably implement that, too. There's a flag for that left commented out in this PR as a reminder for future contributors.

@intrand intrand self-assigned this May 5, 2022
@sudermanjr sudermanjr self-assigned this May 5, 2022
Copy link
Member

@sudermanjr sudermanjr left a comment

Choose a reason for hiding this comment

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

Looking really good! I love the documentation updates (I always forget those). I found some issues that I address inline.

Overall, I think we should discuss the pros/cons of using the yaml package to write out the yaml. It's going to do a lot of stuff like alphabetizing keys, and indenting lists identically. These things seem good initially, but then we're also modifying the yaml that the helm charts generate. Philosophically, should we be doing that? I don't know the answer. It also presents some minor challenges in reviewing PRs generated by reckoner template, because the yaml will be in an order that we don't expect (like putting the kind/name underneath the data in a configmap, etc.)

pkg/reckoner/split.go Outdated Show resolved Hide resolved
pkg/reckoner/split.go Outdated Show resolved Hide resolved
pkg/reckoner/split.go Show resolved Hide resolved
pkg/reckoner/split.go Outdated Show resolved Hide resolved
@intrand intrand requested a review from sudermanjr May 10, 2022 18:46
@sonarcloud
Copy link

sonarcloud bot commented May 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@intrand intrand merged commit 8ed412a into master May 10, 2022
@intrand intrand deleted the int/split branch May 10, 2022 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitops yaml split into separate files
2 participants