Skip to content

[Feature] Add DebugPackage to the OPS Binary #1771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- (Feature) (Scheduler) Deployment Scale Functionality
- (Feature) (Platform) Chart Integration
- (Maintenance) Switch to google.golang.org/protobuf
- (Feature) Add DebugPackage to the OPS Binary

## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
- (Feature) ArangoRoute CRD
Expand Down
3 changes: 3 additions & 0 deletions cmd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ func init() {
cmdMain.AddCommand(debugPackage)
cmdMain.AddCommand(debugPackageV2)

cmdOps.AddCommand(debugPackage)
cmdOps.AddCommand(debugPackageV2)

debugPackage.Flags().StringVarP(&debugPackageInput.Output, "output", "o", "out.tar.gz", "Output of the result gz file. If set to `-` then stdout is used")
debugPackageV2.Flags().StringVarP(&debugPackageInput.Output, "output", "o", "out.tar.gz", "Output of the result gz file. If set to `-` then stdout is used")

Expand Down
6 changes: 3 additions & 3 deletions docs/cli/arangodb_operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Usage:
Available Commands:
admin Administration operations
completion Generate the autocompletion script for the specified shell
crd CRD operations
debug-package Generate debug package for debugging
crd CRD operations
debug-package Generate debug package for debugging
exporter
features Describe all operator features
help Help about any command
integration
storage
task
task
version

Flags:
Expand Down
39 changes: 35 additions & 4 deletions docs/cli/arangodb_operator_ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ Usage:
arangodb_operator_ops [command]

Available Commands:
completion Generate the autocompletion script for the specified shell
crd CRD operations
help Help about any command
task
completion Generate the autocompletion script for the specified shell
crd CRD operations
debug-package Generate debug package for debugging
help Help about any command
task

Flags:
-h, --help help for arangodb_operator_ops
Expand Down Expand Up @@ -86,3 +87,33 @@ Global Flags:
--crd.validation-schema stringArray Controls which CRD should have validation schema <crd-name>=<true/false>.
```
[END_INJECT]: # (arangodb_operator_ops_cmd_crd_generate)

# ArangoDB Operator Ops CRD Install Subcommand

[START_INJECT]: # (arangodb_operator_ops_cmd_debug_package)
```
Generate debug package for debugging

Usage:
arangodb_operator_ops debug-package [flags]

Flags:
--generator.agency-dump Define if generator agency-dump is enabled (default true)
--generator.analytics Define if generator analytics is enabled (default true)
--generator.backupBackup Define if generator backupBackup is enabled (default true)
--generator.deployments Define if generator deployments is enabled (default true)
--generator.kubernetes-events Define if generator kubernetes-events is enabled (default true)
--generator.kubernetes-pods Define if generator kubernetes-pods is enabled (default true)
--generator.kubernetes-secrets Define if generator kubernetes-secrets is enabled (default true)
--generator.kubernetes-services Define if generator kubernetes-services is enabled (default true)
--generator.ml Define if generator ml is enabled (default true)
--generator.networking Define if generator networking is enabled (default true)
--generator.platform Define if generator platform is enabled (default true)
--generator.scheduler Define if generator scheduler is enabled (default true)
-h, --help help for debug-package
--hide-sensitive-data Hide sensitive data (default true)
-n, --namespace string Kubernetes namespace (default "default")
-o, --output - Output of the result gz file. If set to - then stdout is used (default "out.tar.gz")
--pod-logs Collect pod logs (default true)
```
[END_INJECT]: # (arangodb_operator_ops_cmd_debug_package)
6 changes: 6 additions & 0 deletions internal/readme_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ func GenerateCLIArangoDBOperatorOpsReadme(root string) error {
readmeSections["arangodb_operator_ops_cmd_crd_generate"] = section
}

if section, err := GenerateHelpQuoted(cmd.CommandOps(), "debug-package"); err != nil {
return err
} else {
readmeSections["arangodb_operator_ops_cmd_debug_package"] = section
}

if err := md.ReplaceSectionsInFile(path.Join(root, "docs", "cli", "arangodb_operator_ops.md"), readmeSections); err != nil {
return err
}
Expand Down