UNCLASSIFIED - NO CUI

Skip to content

`bbctl version` updates

Daniel Dides requested to merge dd/196-version-flags into main

General MR

Summary

Update bbctl version command to support positional arguments as well as flags for checking for updates and fetching all chart information.

Relevant logs/screenshots

By default, bbctl version should print the bbctl client version as well as the deployed version of the bigbang umbrella chart.

danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/196-version-flags)> bbctl version
bbctl: 0.7.3
bigbang: 2.33.0

bbctl version should also optionally accept an -A / --all-charts command that lists out all deployed charts and subcharts alongside their version

danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/196-version-flags)> bbctl version --all-charts
bigbang: 2.33.0
grafana: 8.4.6-bb.0
istio: 1.22.4-bb.1
istio-operator: 1.22.4-bb.0
kiali: 1.89.0-bb.0
kyverno: 3.2.6-bb.0
kyverno-policies: 3.2.5-bb.3
kyverno-reporter: 2.24.1-bb.0
loki: 6.10.0-bb.0
metrics-server: 3.12.1-bb.4
monitoring: 62.1.0-bb.0
neuvector: 2.7.8-bb.1
promtail: 6.16.2-bb.3
tempo: 1.10.1-bb.0

Update bbctl version to take an optional CHART_NAME which returns the deployed version of a given chart.

danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/196-version-flags)> bbctl version bigbang
bigbang: 2.33.0
danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/196-version-flags)> bbctl version tempo
tempo: 1.10.1-bb.0
danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/196-version-flags)> bbctl version notreal
time=2024-08-29T16:11:30.830-04:00 level=INFO msg="ERROR error encountered during execution: error getting chart version: no matching releases found for notreal"

bbctl version should support a --check or --check-for-updates flag that checks the upstream repository for changes (as the script does) and prints the information to the user.

bbctl version --check-for-updates should support the CHART_NAME positional arg to check for updates on that specific chart

danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/196-version-flags)> bbctl version tempo
tempo: 1.10.1-bb.0
danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/196-version-flags)> bbctl version tempo --check-for-updates 
latestVersion: 1.10.3-bb.0
updateAvailable: true
version: 1.10.1-bb.0
danieldides@BPH-MAC14 ~/P/b/p/bbctl (dd/196-version-flags)> bbctl version --check-for-updates -A
bigbang:
  latest: 2.33.0
  updateAvaliable: false
  version: 2.33.0
grafana:
  latest: 8.4.6-bb.1
  updateAvaliable: true
  version: 8.4.6-bb.0
istio:
  latest: 1.22.4-bb.1
  updateAvaliable: false
  version: 1.22.4-bb.1
istio-operator:
  latest: 1.22.4-bb.0
  updateAvaliable: false
  version: 1.22.4-bb.0

Linked Issue

closes #196 (closed) and #195 (closed)

Upgrade Notices

N/A

Edited by Daniel Dides

Merge request reports