-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add zarf tools yq
(or similar) for easily parsing yaml files
#2384
Comments
Some notes: // src/cmd/tools/yq.go
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2021-Present The Zarf Authors
// Package tools contains the CLI commands for Zarf.
package tools
import (
yq "github.com/mikefarah/yq/v4/cmd"
)
func init() {
toolsCmd.AddCommand(yq.New())
} Successfully embeds yq under Some things I wasn't able to grok about https://github.com/mikefarah/yq/blob/master/yq.go that may cause issues w/ usage. More research required. |
Thanks! I had already gotten that far locally and then sidetracked trying to track down why it made the package so much larger (tldr I wasn't building on Linux). Back to trying to put in doc generation and test things. Will need to try to account for making sure per your note that there aren't issues with certain commands running. |
## Description Adds `zarf tools yq` ## Related Issue Fixes #2384 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed
Is your feature request related to a problem? Please describe.
As Ezra I want to be able to use
yq
with Zarf so that I can quickly pull information out of YAML files / Kubernetes Manifests within actions.Describe the solution you'd like
zarf tools yq
yq
CLI: https://github.com/mikefarah/yqDescribe alternatives you've considered
We could explore other libraries but the main
yq
cli is already written in go - it could also be put behind another layer rather than at the root oftools
(to pave the way for potentially more tools likejq
)Additional context
This comes from us wanting to reduce dependencies within Software Factory and open up more options when using UDS Run.
The text was updated successfully, but these errors were encountered: