Skip to content

Commit 772346f

Browse files
committed
feat: install openlineage crd
1 parent cbf5012 commit 772346f

7 files changed

Lines changed: 145 additions & 34 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: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ edition = "2024"
1010
repository = "https://github.com/stackabletech/commons-operator"
1111

1212
[workspace.dependencies]
13-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.113.3", features = ["crds", "webhook"] }
13+
# TODO: Temporary branch reference to pull in the OpenLineageConnection CRD from the
14+
# unmerged draft PR https://github.com/stackabletech/operator-rs/pull/1250. Revert to a
15+
# version tag once the PR is merged and a new stackable-operator release is tagged.
16+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", branch = "feat/openlineage-crd", features = ["crds", "webhook"] }
1417

1518
anyhow = "1.0"
1619
built = { version = "0.8", features = ["chrono", "git2"] }

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.

extra/crds.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,3 +709,103 @@ spec:
709709
served: true
710710
storage: true
711711
subresources: {}
712+
---
713+
apiVersion: apiextensions.k8s.io/v1
714+
kind: CustomResourceDefinition
715+
metadata:
716+
name: openlineageconnections.openlineage.stackable.tech
717+
spec:
718+
group: openlineage.stackable.tech
719+
names:
720+
categories: []
721+
kind: OpenLineageConnection
722+
plural: openlineageconnections
723+
shortNames: []
724+
singular: openlineageconnection
725+
scope: Namespaced
726+
versions:
727+
- additionalPrinterColumns: []
728+
name: v1alpha1
729+
schema:
730+
openAPIV3Schema:
731+
description: A reusable definition of a connection to an OpenLineage backend.
732+
properties:
733+
spec:
734+
description: |-
735+
OpenLineage connection definition as a resource.
736+
Learn more about [OpenLineage](https://openlineage.io/).
737+
properties:
738+
authenticationClassRef:
739+
description: |-
740+
Name of an [`AuthenticationClass`](https://docs.stackable.tech/home/nightly/concepts/authentication) used
741+
to authenticate against the OpenLineage backend. The `AuthenticationClass` is cluster-scoped
742+
and referenced by name; it is resolved at runtime via
743+
[`OpenLineageConnectionSpec::resolve_authentication_class`]. If not specified, no
744+
authentication is used.
745+
nullable: true
746+
type: string
747+
host:
748+
description: 'Host of the OpenLineage backend without any protocol or port. For example: `marquez`.'
749+
type: string
750+
port:
751+
description: 'Port the OpenLineage backend listens on. For example: `5000`.'
752+
format: uint16
753+
maximum: 65535.0
754+
minimum: 0.0
755+
type: integer
756+
tls:
757+
description: Use a TLS connection. If not specified no TLS will be used.
758+
nullable: true
759+
properties:
760+
verification:
761+
description: The verification method used to verify the certificates of the server and/or the client.
762+
oneOf:
763+
- required:
764+
- none
765+
- required:
766+
- server
767+
properties:
768+
none:
769+
description: Use TLS but don't verify certificates.
770+
type: object
771+
server:
772+
description: Use TLS and a CA certificate to verify the server.
773+
properties:
774+
caCert:
775+
description: CA cert to verify the server.
776+
oneOf:
777+
- required:
778+
- webPki
779+
- required:
780+
- secretClass
781+
properties:
782+
secretClass:
783+
description: |-
784+
Name of the [SecretClass](https://docs.stackable.tech/home/nightly/secret-operator/secretclass) which will provide the CA certificate.
785+
Note that a SecretClass does not need to have a key but can also work with just a CA certificate,
786+
so if you got provided with a CA cert but don't have access to the key you can still use this method.
787+
type: string
788+
webPki:
789+
description: |-
790+
Use TLS and the CA certificates trusted by the common web browsers to verify the server.
791+
This can be useful when you e.g. use public AWS S3 or other public available services.
792+
type: object
793+
type: object
794+
required:
795+
- caCert
796+
type: object
797+
type: object
798+
required:
799+
- verification
800+
type: object
801+
required:
802+
- host
803+
- port
804+
type: object
805+
required:
806+
- spec
807+
title: OpenLineageConnection
808+
type: object
809+
served: true
810+
storage: true
811+
subresources: {}

rust/operator-binary/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use stackable_operator::{
1111
cli::{Command, RunArguments},
1212
crd::{
1313
authentication::core::{AuthenticationClass, AuthenticationClassVersion},
14+
openlineage::{OpenLineageConnection, OpenLineageConnectionVersion},
1415
s3::{S3Bucket, S3BucketVersion, S3Connection, S3ConnectionVersion},
1516
},
1617
eos::EndOfSupportChecker,
@@ -62,6 +63,8 @@ async fn main() -> anyhow::Result<()> {
6263
.print_yaml_schema(built_info::PKG_VERSION, &SerializeOptions::default())?;
6364
S3Bucket::merged_crd(S3BucketVersion::V1Alpha1)?
6465
.print_yaml_schema(built_info::PKG_VERSION, &SerializeOptions::default())?;
66+
OpenLineageConnection::merged_crd(OpenLineageConnectionVersion::V1Alpha1)?
67+
.print_yaml_schema(built_info::PKG_VERSION, &SerializeOptions::default())?;
6568
}
6669
Command::Run(CommonsOperatorRunArguments {
6770
common:

rust/operator-binary/src/webhooks/conversion.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use stackable_operator::{
22
crd::{
33
authentication::core::{AuthenticationClass, AuthenticationClassVersion},
4+
openlineage::{OpenLineageConnection, OpenLineageConnectionVersion},
45
s3::{S3Bucket, S3BucketVersion, S3Connection, S3ConnectionVersion},
56
},
67
kube::Client,
@@ -23,6 +24,10 @@ pub fn create_webhook(disable_crd_maintenance: bool, client: Client) -> Box<impl
2324
S3Bucket::merged_crd(S3BucketVersion::V1Alpha1).unwrap(),
2425
S3Bucket::try_convert as fn(_) -> _,
2526
),
27+
(
28+
OpenLineageConnection::merged_crd(OpenLineageConnectionVersion::V1Alpha1).unwrap(),
29+
OpenLineageConnection::try_convert as fn(_) -> _,
30+
),
2631
];
2732

2833
let conversion_webhook_options = ConversionWebhookOptions {

0 commit comments

Comments
 (0)