UNCLASSIFIED - NO CUI

Skip to content

cmd/version: use kubectl to list helmrelease resources instead of helm.List calls

Daniel Dides requested to merge dd/speed-up-resource-fetching into main

General MR

Summary

helm list is internally very slow, causing the bbctl version implementation to take forever. This new implementation checks the flux resources directly speeding up the internal fetch times dramatically.

Relevant logs/screenshots

New (dogfood)

danieldides@BPH-MAC14 ~ [1]> time bbctl version -A
anchore: 2.9.0-bb.6
argocd: 7.4.0-bb.1
authservice: 1.0.1-bb.5
bigbang: 2.35.0
cluster-auditor: 1.5.0-bb.21
dogfood: 1.0.0
eck-operator: 2.14.0-bb.0
ek: 1.18.0-bb.0
fluentbit: 0.47.7-bb.0
fortify: 1.1.2320154-bb.17
gatekeeper: 3.16.3-bb.1
gitlab: 8.2.4-bb.0
gitlab-runner: 0.66.0-bb.1
grafana: 8.4.6-bb.1
harbor: 1.15.0-bb.1
istio: 1.22.4-bb.1
istio-operator: 1.22.4-bb.0
jaeger: 2.56.0-bb.0
keycloak: 2.4.3-bb.5
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
mattermost: 9.10.1-bb.4
mattermost-operator: 1.22.0-bb.5
minio: 6.0.2-bb.3
minio-operator: 6.0.2-bb.2
monitoring: 62.1.0-bb.0
neuvector: 2.7.8-bb.1
nexus-repository-manager: 71.0.0-bb.0
promtail: 6.16.2-bb.3
sonarqube: 8.0.6-bb.3
tempo: 1.10.3-bb.0
thanos: 15.7.20-bb.0
twistlock: 0.16.0-bb.1
vault: 0.28.1-bb.2
velero: 7.1.5-bb.0

________________________________________________________
Executed in  392.03 millis    fish           external
   usr time   45.30 millis  113.00 micros   45.19 millis
   sys time   13.70 millis  475.00 micros   13.22 millis

Old

danieldides@BPH-MAC14 ~> time bbctl version -A
anchore: 2.9.0-bb.6
argocd: 7.4.0-bb.1
authservice: 1.0.1-bb.5
bigbang: 2.35.0
cluster-auditor: 1.5.0-bb.21
dogfood: 1.0.0
eck-operator: 2.14.0-bb.0
elasticsearch-kibana: 1.18.0-bb.0
fluentbit: 0.47.7-bb.0
fortify-ssc: 1.1.2320154-bb.17
gatekeeper: 3.16.3-bb.1
gitlab: 8.2.4-bb.0
gitlab-runner: 0.66.0-bb.1
grafana: 8.4.6-bb.1
harbor: 1.15.0-bb.1
istio: 1.22.4-bb.1
istio-operator: 1.22.4-bb.0
jaeger: 2.56.0-bb.0
keycloak: 2.4.3-bb.5
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
mattermost: 9.10.1-bb.4
mattermost-operator: 1.22.0-bb.5
minio-instance: 6.0.2-bb.3
minio-operator: 6.0.2-bb.2
monitoring: 62.1.0-bb.0
neuvector: 2.7.8-bb.1
nexus-repository-manager: 71.0.0-bb.0
promtail: 6.16.2-bb.3
sonarqube: 8.0.6-bb.3
tempo: 1.10.3-bb.0
thanos: 15.7.20-bb.0
twistlock: 0.16.0-bb.1
vault: 0.28.1-bb.2
velero: 7.1.5-bb.0

________________________________________________________
Executed in   56.88 secs    fish           external
   usr time    2.15 secs    0.19 millis    2.15 secs
   sys time    0.44 secs    1.79 millis    0.44 secs

Linked Issue

closes #262 (closed)

Upgrade Notices

N/A

Edited by Daniel Dides

Merge request reports