Skip to content

Commit 43ccff2

Browse files
committed
refactor!: use crd::openlineage module from op-rs
1 parent 24dfb75 commit 43ccff2

12 files changed

Lines changed: 345 additions & 306 deletions

File tree

Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ edition = "2024"
1010
repository = "https://github.com/stackabletech/spark-k8s-operator"
1111

1212
[workspace.dependencies]
13-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.113.3", features = ["webhook"] }
13+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.113.3", features = [
14+
"webhook",
15+
] }
1416

1517
anyhow = "1.0.103"
1618
built = { version = "0.8", features = ["chrono", "git2"] }
@@ -31,5 +33,5 @@ indoc = "2"
3133
regex = "1.12"
3234

3335
[patch."https://github.com/stackabletech/operator-rs.git"]
34-
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch="main" }
35-
# stackable-operator = { path = "../operator-rs/crates/stackable-operator" }
36+
# TODO: remove this before merge
37+
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "feat/openlineage-crd" }

crate-hashes.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/modules/spark-k8s/pages/usage-guide/openlineage.adoc

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ When configured, the operator injects everything required to make the https://op
1313
1414
== Enabling OpenLineage
1515

16-
The backend endpoint is configured directly on the `SparkApplication` through the `host` and `port` fields.
16+
The backend is configured through the `openLineage.connection`, which either inlines an OpenLineage
17+
connection or references a standalone `OpenLineageConnection` resource by name.
1718
The operator points the transport at `<scheme>://<host>:<port>`:
1819

1920
[source,yaml]
@@ -24,25 +25,41 @@ metadata:
2425
name: orders-by-nation
2526
spec:
2627
openLineage: # <1>
27-
host: marquez # <2>
28-
port: 5000 # <3>
29-
# namespace: orders-lineage # <4>
30-
# appName: orders-by-nation # <5>
31-
# tls: # <6>
32-
# verification:
33-
# server:
34-
# caCert:
35-
# secretClass: marquez-ca
28+
connection: # <2>
29+
inline:
30+
host: marquez
31+
port: 5000
32+
# tls:
33+
# verification:
34+
# server:
35+
# caCert:
36+
# secretClass: marquez-ca
37+
# namespace: orders-lineage # <3>
38+
# appName: orders-by-nation # <4>
3639
...
3740
----
3841
<1> Adding the `openLineage` block enables OpenLineage event emission. Omit it entirely to leave OpenLineage off (the default), in which case the operator emits nothing OpenLineage-related and behaviour is unchanged.
39-
<2> Host of the OpenLineage backend, for example the Marquez API service. Required.
40-
<3> Port of the OpenLineage backend. Required.
41-
<4> Optional. The OpenLineage namespace events are reported under.
42+
<2> The OpenLineage backend connection. Use `inline` (shown here) to define the connection directly,
43+
or `reference: <name>` to point at an `OpenLineageConnection` resource in the same namespace.
44+
Required.
45+
<3> Optional. The OpenLineage namespace events are reported under.
4246
Defaults to the application's Kubernetes namespace.
43-
<5> Optional. The stable OpenLineage job name (see <<job-name>>).
44-
<6> Optional. TLS configuration, mirroring the field of the same name on an S3 connection.
45-
When `tls.verification.server` is set the transport uses `https` instead of `http`.
47+
<4> Optional. The stable OpenLineage job name (see <<job-name>>).
48+
49+
The `OpenLineageConnection` resource (`openlineage.stackable.tech`) is a reusable definition of a
50+
connection to an OpenLineage backend, provided by the Stackable operator library. Reference it to
51+
share one backend definition across multiple applications:
52+
53+
[source,yaml]
54+
----
55+
apiVersion: openlineage.stackable.tech/v1alpha1
56+
kind: OpenLineageConnection
57+
metadata:
58+
name: marquez
59+
spec:
60+
host: marquez
61+
port: 5000
62+
----
4663

4764
The transport scheme is `https` when `tls.verification.server` is configured, otherwise `http`.
4865
Explicit certificate handling beyond selecting the scheme will be added later.

0 commit comments

Comments
 (0)