Skip to content

Commit 7d4e91e

Browse files
committed
Adding documentation for new run-data-extract command collect-helm-releases
1 parent be7d0fe commit 7d4e91e

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed

articles/operator-nexus/howto-baremetal-run-data-extract.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ The current list of supported commands are
189189
Command Name: `cluster-cve-report`\
190190
Arguments: None
191191

192+
- [Collect Helm Releases](#collect-helm-releases)\
193+
Command Name: `collect-helm-releases`\
194+
Arguments: None
195+
192196
The command syntax is:
193197

194198
```azurecli-interactive
@@ -662,6 +666,119 @@ https://cmkfjft8twwpst.blob.core.windows.net/bmm-run-command-output/20b217b5-ea3
662666

663667
The CVE data is refreshed per container image every 24 hours or when there's a change to the Kubernetes resource referencing the image.
664668

669+
### Collect Helm Releases
670+
671+
Helm release data is collected with the `collect-helm-releases` command and formatted as json to `{year}-{month}-{day}-helm-releases.json`. The JSON file is found in the data extract zip file located in the storage account. The data collected includes all helm release information from the cluster, which consists of the standard data returned when running the command `helm list`.
672+
673+
This example executes the `collect-helm-releases` command without arguments.
674+
675+
> [!NOTE]
676+
> The target machine must be a control-plane node or the action will not execute.
677+
678+
```azurecli
679+
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
680+
--resource-group "cluster_MRG" \
681+
--subscription "subscription" \
682+
--commands '[{"command":"collect-helm-releases"}]' \
683+
--limit-time-seconds 600
684+
```
685+
686+
**`collect-helm-releases` Output**
687+
688+
```azurecli
689+
====Action Command Output====
690+
Helm releases report saved.
691+
692+
693+
================================
694+
Script execution result can be found in storage account:
695+
https://cmcr5xp3mbn7st.blob.core.windows.net/bmm-run-command-output/a29dcbdb-5524-4172-8b55-88e0e5ec93ff-action-bmmdataextcmd.tar.gz?se=2024-10-30T02%3A09%3A54Z&sig=v6cjiIDBP9viEijs%2B%2BwJDrHIAbLEmuiVmCEEDHEi%2FEc%3D&sp=r&spr=https&sr=b&st=2024-10-29T22%3A09%3A54Z&sv=2023-11-03
696+
```
697+
698+
**Helm Release Schema**
699+
700+
```JSON
701+
{
702+
"$schema": "http://json-schema.org/schema#",
703+
"type": "object",
704+
"properties": {
705+
"metadata": {
706+
"type": "object",
707+
"properties": {
708+
"dateRetrieved": {
709+
"type": "string"
710+
},
711+
"platform": {
712+
"type": "string"
713+
},
714+
"resource": {
715+
"type": "string"
716+
},
717+
"clusterId": {
718+
"type": "string"
719+
},
720+
"runtimeVersion": {
721+
"type": "string"
722+
},
723+
"managementVersion": {
724+
"type": "string"
725+
}
726+
},
727+
"required": [
728+
"clusterId",
729+
"dateRetrieved",
730+
"managementVersion",
731+
"platform",
732+
"resource",
733+
"runtimeVersion"
734+
]
735+
},
736+
"helmReleases": {
737+
"type": "array",
738+
"items": {
739+
"type": "object",
740+
"properties": {
741+
"name": {
742+
"type": "string"
743+
},
744+
"namespace": {
745+
"type": "string"
746+
},
747+
"revision": {
748+
"type": "string"
749+
},
750+
"updated": {
751+
"type": "string"
752+
},
753+
"status": {
754+
"type": "string"
755+
},
756+
"chart": {
757+
"type": "string"
758+
},
759+
"app_version": {
760+
"type": "string"
761+
}
762+
},
763+
"required": [
764+
"app_version",
765+
"chart",
766+
"name",
767+
"namespace",
768+
"revision",
769+
"status",
770+
"updated"
771+
]
772+
}
773+
}
774+
},
775+
"required": [
776+
"helmReleases",
777+
"metadata"
778+
]
779+
}
780+
```
781+
665782
## Viewing the output
666783

667784
The command provides a link (if using cluster manager storage) or another command (if using user provided storage) to download the full output. The tar.gz file also contains the zipped extract command file outputs. Download the output file from the storage blob to a local directory by specifying the directory path in the optional argument `--output-directory`.

0 commit comments

Comments
 (0)