[Draft]Convert bash script to GoLang - #590
kapjain-rh wants to merge 4 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Kapil Jain <kapjain@redhat.com>
3eb249d to
6c0e2ed
Compare
Signed-off-by: Kapil Jain <kapjain@redhat.com>
Signed-off-by: Kapil Jain <kapjain@redhat.com>
Signed-off-by: Kapil Jain <kapjain@redhat.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #590 +/- ##
===========================================
+ Coverage 21.47% 32.79% +11.31%
===========================================
Files 26 36 +10
Lines 3115 4269 +1154
===========================================
+ Hits 669 1400 +731
- Misses 2374 2680 +306
- Partials 72 189 +117
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
I would restructure files to avoid having everything under internal/pkg/plugin. Something like:
internal/
cli/ # Public commands, argument compatibility, prompts
capture/ # Capture requests, sessions, orchestration
kube/ # Kubernetes clients, deployment, exec, logs
manifests/ # Resource and pipeline construction
collector/ # Receiving records, limits, processing
artifacts/ # JSON, SQLite, PCAPNG, JSONL, transfer
terminal/ # Interactive views and presentation
tlsresolver/ # Existing TLS profile resolution
WDYT ?
|
|
||
| GOLANGCI_LINT_VERSION = v2.12.2 | ||
| BASH_VERSION = v4.2.0 | ||
| YQ_VERSION = v4.45.1 |
There was a problem hiding this comment.
Do we still need YQ ? We should handle everything in golang
| type option struct{ key, value string } | ||
| type options struct { | ||
| raw []string | ||
| mode, namespace, kubeconfig, context, output, copy, logLevel string | ||
| maxTime time.Duration | ||
| maxBytes int64 | ||
| background, headless, yaml, subnets bool | ||
| values []option | ||
| filters []map[string]any | ||
| } |
There was a problem hiding this comment.
That deserve a real golang type like
type CaptureRequest struct {
Kind CaptureKind
Connection ConnectionOptions
Execution ExecutionOptions
Agent AgentConfig
Filters []FilterGroup
Queries []string
Limits CaptureLimits
Output OutputOptions
}
We should try to reuse as most as possible types from operator there
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Description
Dependencies
n/a
Checklist