Skip to content

Commit 2e24a41

Browse files
feat: Add OPA support (#573)
* test: Add integration test for OPA * test: Extend the OPA test * feat: Allow the configuration of OPA * chore: Update changelog * chore: Run pre-commit hook * chore: Update operator-rs * test(opa): Remove unnecessary test scripts * docs: Document the authorization with OPA * chore: Upgrade stackable-operator to version 0.86.0 * docs: Extend the OPA documentation * chore: Regenerate charts * docs: Fix link * test: Remove custom image from the test definitions * Regenerate Nix files * Fix merge commit slightly * Fix Clippy warning * test: Fix OPA integration test for Airflow 2.9.2 and 2.9.3 * test: Increase timeout in the logging integration test --------- Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com>
1 parent 02b9f97 commit 2e24a41

32 files changed

+1186
-36
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- Run a `containerdebug` process in the background of each Airflow container to collect debugging information ([#557]).
88
- Aggregate emitted Kubernetes events on the CustomResources ([#571]).
9+
- Add OPA support ([#573]).
910

1011
### Changed
1112

@@ -14,6 +15,7 @@
1415
[#557]: https://github.com/stackabletech/airflow-operator/pull/557
1516
[#571]: https://github.com/stackabletech/airflow-operator/pull/571
1617
[#572]: https://github.com/stackabletech/airflow-operator/pull/572
18+
[#573]: https://github.com/stackabletech/airflow-operator/pull/573
1719

1820
## [24.11.1] - 2025-01-09
1921

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/airflow-operator"
1111

1212
[workspace.dependencies]
1313
stackable-versioned = { git = "https://github.com/stackabletech/operator-rs.git", features = ["k8s"], tag = "stackable-versioned-0.5.0" }
14-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.85.0" }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.86.0" }
1515
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.7.0" }
1616

1717
anyhow = "1.0"

crate-hashes.json

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

deploy/helm/airflow-operator/crds/crds.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,42 @@ spec:
492492
- authenticationClass
493493
type: object
494494
type: array
495+
authorization:
496+
description: Authorization options. Learn more in the [Airflow authorization usage guide](https://docs.stackable.tech/home/nightly/airflow/usage-guide/security#_authorization).
497+
nullable: true
498+
properties:
499+
opa:
500+
description: Configure the OPA stacklet [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery) and the name of the Rego package containing your authorization rules. Consult the [OPA authorization documentation](https://docs.stackable.tech/home/nightly/concepts/opa) to learn how to deploy Rego authorization rules with OPA.
501+
nullable: true
502+
properties:
503+
cache:
504+
default:
505+
entryTimeToLive: 30s
506+
maxEntries: 10000
507+
description: Least Recently Used (LRU) cache with per-entry time-to-live (TTL) value.
508+
properties:
509+
entryTimeToLive:
510+
default: 30s
511+
description: Time to live per entry
512+
type: string
513+
maxEntries:
514+
default: 10000
515+
description: Maximum number of entries in the cache; If this threshold is reached then the least recently used item is removed.
516+
format: uint32
517+
minimum: 0.0
518+
type: integer
519+
type: object
520+
configMapName:
521+
description: The [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery) for the OPA stacklet that should be used for authorization requests.
522+
type: string
523+
package:
524+
description: The name of the Rego package containing the Rego rules for the product.
525+
nullable: true
526+
type: string
527+
required:
528+
- configMapName
529+
type: object
530+
type: object
495531
credentialsSecret:
496532
description: The name of the Secret object containing the admin user credentials and database connection details. Read the [getting started guide first steps](https://docs.stackable.tech/home/nightly/airflow/getting_started/first_steps) to find out more.
497533
type: string

0 commit comments

Comments
 (0)