Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/opa/examples/getting_started/getting_started.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
}

Expand All @@ -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[]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
}

Expand All @@ -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[]
}

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/opa/examples/getting_started/opa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: simple-opa
spec:
image:
productVersion: "0.67.1"
productVersion: "1.0.0"
servers:
roleGroups:
default: {}
2 changes: 1 addition & 1 deletion docs/modules/opa/examples/getting_started/opa.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: simple-opa
spec:
image:
productVersion: "0.67.1"
productVersion: "1.0.0"
servers:
roleGroups:
default: {}
4 changes: 2 additions & 2 deletions docs/modules/opa/examples/getting_started/simple-rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ data:
test.rego: |
package test

hello {
hello if {
true
}

world {
world if {
false
}
4 changes: 1 addition & 3 deletions docs/modules/opa/pages/usage-guide/user-info-fetcher.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
name: opa
spec:
image:
productVersion: 0.67.1
productVersion: 1.0.0
clusterConfig:
userInfo: # <1>
backend:
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/opa/partials/supported-versions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions tests/templates/kuttl/smoke/10-install-opa.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ data:
test.rego: |
package test

hello {
hello if {
true
}

world {
world if {
false
}
---
Expand Down
14 changes: 11 additions & 3 deletions tests/templates/kuttl/smoke/test-regorule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 5 additions & 3 deletions tests/test-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading