feat(crd): add dual-format Args field supporting map and list
Add a custom Args type that accepts both a key-value map and a flat
CLI-style list, normalizing internally to []string so downstream code
requires no changes.
- Args: new []string alias with UnmarshalJSON (map + list) and
MarshalJSON (map) — keys are sorted for deterministic ordering
- CRD schema: switch args from typed array to
x-kubernetes-preserve-unknown-fields to accept either shape
- Bump go-flink-client to v0.2.2 (fix: programArgsList → programArg
query parameter name for Flink REST API)
Args can now be written as:
args:
kafka-host: broker:9092
kafka-group-id: my-group
Or the existing list format:
args:
- "--kafka-host"
- broker:9092
This commit is contained in:
2
go.mod
2
go.mod
@@ -5,7 +5,7 @@ go 1.23.2
|
||||
require (
|
||||
github.com/danielgtaylor/huma/v2 v2.27.0
|
||||
github.com/gofiber/fiber/v2 v2.52.6
|
||||
github.com/logi-camp/go-flink-client v0.2.1
|
||||
github.com/logi-camp/go-flink-client v0.2.2
|
||||
github.com/samber/lo v1.47.0
|
||||
go.uber.org/zap v1.27.0
|
||||
k8s.io/apimachinery v0.31.3
|
||||
|
||||
Reference in New Issue
Block a user