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
27 lines
869 B
YAML
27 lines
869 B
YAML
# flink-job-instance.yaml
|
|
apiVersion: flink.logicamp.dev/v1alpha1
|
|
kind: FlinkJob
|
|
metadata:
|
|
name: my-flink-job
|
|
spec:
|
|
key: word-count
|
|
name: "Word Count Example"
|
|
entryClass: "tech.logicamp.logiline.FacilityEnrichment"
|
|
parallelism: 1
|
|
jarUri: "https://git.logicamp.tech/api/packages/logiline/generic/facility-enrichment/1.0.0/facility-enrichment.jar"
|
|
jarURIBasicAuthUsername: logiline-actrunner
|
|
jarURIBasicAuthPassword: daeweeb7ohpaiw3oojiCoong
|
|
# args accepts two formats:
|
|
# Map (recommended):
|
|
args:
|
|
kafka-host: kafka.pg-release:9092
|
|
kafka-group-id: batch-sales-config-dedup-processor
|
|
# List (also valid):
|
|
# args:
|
|
# - "--kafka-host"
|
|
# - kafka.pg-release:9092
|
|
# - "--kafka-group-id"
|
|
# - batch-sales-config-dedup-processor
|
|
flinkConfiguration:
|
|
taskmanager.numberOfTaskSlots: "1"
|
|
parallelism.default: "1" |