UNCLASSIFIED - NO CUI

Skip to content

cmd/config: create a bbctl config command for fetching configuration information

Daniel Dides requested to merge dd/config-command into main

General MR

Summary

Creates a simple command bbctl config that loads the configuration and prints out the resulting information, similar to how go env works. If no parameter is passed, outputs the entire (complete) configuration. If a specific key is provided, prints only the value.

Relevant logs/screenshots

All Keys

danieldides@BPH-MAC14 ~/P/b/p/b/s/completion-tests (dd/config-command)> bbctl config
kubeconfig: /Users/danieldides/.kube/Daniel.Dides-dev-config
addon: []
recursive: true
big-bang-credential-helper: credentials-file
...

Specific key

danieldides@BPH-MAC14 ~/P/b/p/b/s/completion-tests (dd/config-command)> bbctl config kubeconfig
/Users/danieldides/.kube/Daniel.Dides-dev-config

Nested keys

danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/config-command)> bbctl config k3d-ssh.ssh-username
ubuntu

Nested non-string keys

danieldides@BPH-MAC14 ~/P/b/p/bbctl (moving-constants-and-adding-release-pipe)> bbctl config policy.gatekeeper
false

Linked Issue

Part of #51 (closed)

Upgrade Notices

N/A

Edited by Daniel Dides

Merge request reports

Loading