Skip to content

Commit 6d2c36e

Browse files
authored
[Feature] Add DebugPackage to the OPS Binary (#1771)
1 parent 33a4775 commit 6d2c36e

File tree

5 files changed

+48
-7
lines changed

5 files changed

+48
-7
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- (Feature) (Scheduler) Deployment Scale Functionality
2525
- (Feature) (Platform) Chart Integration
2626
- (Maintenance) Switch to google.golang.org/protobuf
27+
- (Feature) Add DebugPackage to the OPS Binary
2728

2829
## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
2930
- (Feature) ArangoRoute CRD

cmd/debug.go

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ func init() {
3434
cmdMain.AddCommand(debugPackage)
3535
cmdMain.AddCommand(debugPackageV2)
3636

37+
cmdOps.AddCommand(debugPackage)
38+
cmdOps.AddCommand(debugPackageV2)
39+
3740
debugPackage.Flags().StringVarP(&debugPackageInput.Output, "output", "o", "out.tar.gz", "Output of the result gz file. If set to `-` then stdout is used")
3841
debugPackageV2.Flags().StringVarP(&debugPackageInput.Output, "output", "o", "out.tar.gz", "Output of the result gz file. If set to `-` then stdout is used")
3942

docs/cli/arangodb_operator.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Usage:
1515
Available Commands:
1616
admin Administration operations
1717
completion Generate the autocompletion script for the specified shell
18-
crd CRD operations
19-
debug-package Generate debug package for debugging
18+
crd CRD operations
19+
debug-package Generate debug package for debugging
2020
exporter
2121
features Describe all operator features
2222
help Help about any command
2323
integration
2424
storage
25-
task
25+
task
2626
version
2727
2828
Flags:

docs/cli/arangodb_operator_ops.md

+35-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ Usage:
1313
arangodb_operator_ops [command]
1414
1515
Available Commands:
16-
completion Generate the autocompletion script for the specified shell
17-
crd CRD operations
18-
help Help about any command
19-
task
16+
completion Generate the autocompletion script for the specified shell
17+
crd CRD operations
18+
debug-package Generate debug package for debugging
19+
help Help about any command
20+
task
2021
2122
Flags:
2223
-h, --help help for arangodb_operator_ops
@@ -86,3 +87,33 @@ Global Flags:
8687
--crd.validation-schema stringArray Controls which CRD should have validation schema <crd-name>=<true/false>.
8788
```
8889
[END_INJECT]: # (arangodb_operator_ops_cmd_crd_generate)
90+
91+
# ArangoDB Operator Ops CRD Install Subcommand
92+
93+
[START_INJECT]: # (arangodb_operator_ops_cmd_debug_package)
94+
```
95+
Generate debug package for debugging
96+
97+
Usage:
98+
arangodb_operator_ops debug-package [flags]
99+
100+
Flags:
101+
--generator.agency-dump Define if generator agency-dump is enabled (default true)
102+
--generator.analytics Define if generator analytics is enabled (default true)
103+
--generator.backupBackup Define if generator backupBackup is enabled (default true)
104+
--generator.deployments Define if generator deployments is enabled (default true)
105+
--generator.kubernetes-events Define if generator kubernetes-events is enabled (default true)
106+
--generator.kubernetes-pods Define if generator kubernetes-pods is enabled (default true)
107+
--generator.kubernetes-secrets Define if generator kubernetes-secrets is enabled (default true)
108+
--generator.kubernetes-services Define if generator kubernetes-services is enabled (default true)
109+
--generator.ml Define if generator ml is enabled (default true)
110+
--generator.networking Define if generator networking is enabled (default true)
111+
--generator.platform Define if generator platform is enabled (default true)
112+
--generator.scheduler Define if generator scheduler is enabled (default true)
113+
-h, --help help for debug-package
114+
--hide-sensitive-data Hide sensitive data (default true)
115+
-n, --namespace string Kubernetes namespace (default "default")
116+
-o, --output - Output of the result gz file. If set to - then stdout is used (default "out.tar.gz")
117+
--pod-logs Collect pod logs (default true)
118+
```
119+
[END_INJECT]: # (arangodb_operator_ops_cmd_debug_package)

internal/readme_cli.go

+6
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ func GenerateCLIArangoDBOperatorOpsReadme(root string) error {
7171
readmeSections["arangodb_operator_ops_cmd_crd_generate"] = section
7272
}
7373

74+
if section, err := GenerateHelpQuoted(cmd.CommandOps(), "debug-package"); err != nil {
75+
return err
76+
} else {
77+
readmeSections["arangodb_operator_ops_cmd_debug_package"] = section
78+
}
79+
7480
if err := md.ReplaceSectionsInFile(path.Join(root, "docs", "cli", "arangodb_operator_ops.md"), readmeSections); err != nil {
7581
return err
7682
}

0 commit comments

Comments
 (0)