diff --git a/CHANGELOG.md b/CHANGELOG.md index 27a2da07..fdde0227 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. ### Added - Run a `containerdebug` process in the background of each OPA container to collect debugging information ([#666]). +- Added support for OPA `1.0.0` ([#677]). - Aggregate emitted Kubernetes events on the CustomResources ([#675]). ### Fixed @@ -15,8 +16,13 @@ All notable changes to this project will be documented in this file. deployed in one namespace. Existing Stacklets will use the newly created ServiceAccounts after restart ([#656]). +### Removed + +- Removed support for OPA `0.66.0` ([#677]). + [#656]: https://github.com/stackabletech/opa-operator/pull/656 [#666]: https://github.com/stackabletech/opa-operator/pull/666 +[#677]: https://github.com/stackabletech/opa-operator/pull/677 [#675]: https://github.com/stackabletech/opa-operator/pull/675 ## [24.11.0] - 2024-11-18 diff --git a/docs/modules/opa/examples/getting_started/getting_started.sh b/docs/modules/opa/examples/getting_started/getting_started.sh index 317b53c8..ef33dd75 100755 --- a/docs/modules/opa/examples/getting_started/getting_started.sh +++ b/docs/modules/opa/examples/getting_started/getting_started.sh @@ -74,7 +74,7 @@ sleep 5 request_hello() { # tag::request-hello[] -curl -s http://localhost:8081/v1/data/test/hello +curl -s http://localhost:8081/v1/data/test/hello -d '{"input": {}}' # end::request-hello[] } @@ -91,7 +91,7 @@ fi request_world() { # tag::request-world[] -curl -s http://localhost:8081/v1/data/test/world +curl -s http://localhost:8081/v1/data/test/world -d '{"input": {}}' # end::request-world[] } diff --git a/docs/modules/opa/examples/getting_started/getting_started.sh.j2 b/docs/modules/opa/examples/getting_started/getting_started.sh.j2 index fdf90955..17648844 100755 --- a/docs/modules/opa/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/opa/examples/getting_started/getting_started.sh.j2 @@ -74,7 +74,7 @@ sleep 5 request_hello() { # tag::request-hello[] -curl -s http://localhost:8081/v1/data/test/hello +curl -s http://localhost:8081/v1/data/test/hello -d '{"input": {}}' # end::request-hello[] } @@ -91,7 +91,7 @@ fi request_world() { # tag::request-world[] -curl -s http://localhost:8081/v1/data/test/world +curl -s http://localhost:8081/v1/data/test/world -d '{"input": {}}' # end::request-world[] } diff --git a/docs/modules/opa/examples/getting_started/opa.yaml b/docs/modules/opa/examples/getting_started/opa.yaml index c1853f64..b2e191cd 100644 --- a/docs/modules/opa/examples/getting_started/opa.yaml +++ b/docs/modules/opa/examples/getting_started/opa.yaml @@ -5,7 +5,7 @@ metadata: name: simple-opa spec: image: - productVersion: "0.67.1" + productVersion: "1.0.0" servers: roleGroups: default: {} diff --git a/docs/modules/opa/examples/getting_started/opa.yaml.j2 b/docs/modules/opa/examples/getting_started/opa.yaml.j2 index c1853f64..b2e191cd 100644 --- a/docs/modules/opa/examples/getting_started/opa.yaml.j2 +++ b/docs/modules/opa/examples/getting_started/opa.yaml.j2 @@ -5,7 +5,7 @@ metadata: name: simple-opa spec: image: - productVersion: "0.67.1" + productVersion: "1.0.0" servers: roleGroups: default: {} diff --git a/docs/modules/opa/examples/getting_started/simple-rule.yaml b/docs/modules/opa/examples/getting_started/simple-rule.yaml index 3a3914aa..3d1ce379 100644 --- a/docs/modules/opa/examples/getting_started/simple-rule.yaml +++ b/docs/modules/opa/examples/getting_started/simple-rule.yaml @@ -9,10 +9,10 @@ data: test.rego: | package test - hello { + hello if { true } - world { + world if { false } diff --git a/docs/modules/opa/pages/usage-guide/user-info-fetcher.adoc b/docs/modules/opa/pages/usage-guide/user-info-fetcher.adoc index 81cf5048..6c9f90ba 100644 --- a/docs/modules/opa/pages/usage-guide/user-info-fetcher.adoc +++ b/docs/modules/opa/pages/usage-guide/user-info-fetcher.adoc @@ -16,7 +16,7 @@ metadata: name: opa spec: image: - productVersion: 0.67.1 + productVersion: 1.0.0 clusterConfig: userInfo: # <1> backend: @@ -132,8 +132,6 @@ For example, the following rule allows access for users in the `/admin` group: ---- package test -import rego.v1 - default allow := false allow if { diff --git a/docs/modules/opa/partials/supported-versions.adoc b/docs/modules/opa/partials/supported-versions.adoc index f7b0d816..f221808e 100644 --- a/docs/modules/opa/partials/supported-versions.adoc +++ b/docs/modules/opa/partials/supported-versions.adoc @@ -2,5 +2,5 @@ // This is a separate file, since it is used by both the direct OPA documentation, and the overarching // Stackable Platform documentation. -* 0.67.1 -* 0.66.0 (deprecated) +* 1.0.0 +* 0.67.1 (deprecated) diff --git a/tests/templates/kuttl/smoke/10-install-opa.yaml.j2 b/tests/templates/kuttl/smoke/10-install-opa.yaml.j2 index cc96013b..78b443bb 100644 --- a/tests/templates/kuttl/smoke/10-install-opa.yaml.j2 +++ b/tests/templates/kuttl/smoke/10-install-opa.yaml.j2 @@ -9,11 +9,11 @@ data: test.rego: | package test - hello { + hello if { true } - world { + world if { false } --- diff --git a/tests/templates/kuttl/smoke/test-regorule.py b/tests/templates/kuttl/smoke/test-regorule.py index 0727ae8e..3e2a78b6 100755 --- a/tests/templates/kuttl/smoke/test-regorule.py +++ b/tests/templates/kuttl/smoke/test-regorule.py @@ -27,11 +27,19 @@ # --> {'hello': True} # url = 'http://test-opa-svc:8081/v1/data/test' - response = requests.post(args['url']).json() + response = requests.post(args["url"], json={"input": {}}).json() - if "result" in response and "hello" in response["result"] and response["result"]["hello"]: + if ( + "result" in response + and "hello" in response["result"] + and response["result"]["hello"] + ): print("Test successful!") exit(0) else: - print("Error: received " + str(response) + " - expected: {'result': {'hello': True}}") + print( + "Error: received " + + str(response) + + " - expected: {'result': {'hello': True}}" + ) exit(-1) diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index 0ec62395..aa2bdfe0 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -3,12 +3,14 @@ dimensions: - name: opa values: # To use a custom image, add a comma and the full name after the product version - - 0.67.1,docker.stackable.tech/stackable/opa:0.67.1-stackable0.0.0-dev - - 0.66.0,docker.stackable.tech/stackable/opa:0.66.0-stackable0.0.0-dev + # 0.67.1,docker.stackable.tech/stackable/opa:0.67.1-stackable0.0.0-dev + - 0.67.1 + - 1.0.0 - name: opa-latest values: # To use a custom image, add a comma and the full name after the product version - - 0.67.1,docker.stackable.tech/stackable/opa:0.67.1-stackable0.0.0-dev + # 0.67.1,docker.stackable.tech/stackable/opa:0.67.1-stackable0.0.0-dev + - 1.0.0 - name: keycloak values: - 23.0.1