Skip to content

Commit d22031d

Browse files
Malewaresbernauer
andauthored
chore(opa): Bump to 1.0.0 (#677)
* chore(opa): Bump to 1.0.0 * Adding 0.67.1 dismissed by accident * Updating Changelog.md * Updating getting_started * Adressing some feedback * Update CHANGELOG.md Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de> * Update CHANGELOG.md Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de> * Addressing last part of feedbakc * happy pre-commit --------- Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
1 parent b512f32 commit d22031d

File tree

11 files changed

+35
-21
lines changed

11 files changed

+35
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- Run a `containerdebug` process in the background of each OPA container to collect debugging information ([#666]).
10+
- Added support for OPA `1.0.0` ([#677]).
1011
- Aggregate emitted Kubernetes events on the CustomResources ([#675]).
1112

1213
### Fixed
@@ -15,8 +16,13 @@ All notable changes to this project will be documented in this file.
1516
deployed in one namespace. Existing Stacklets will use the newly created ServiceAccounts after
1617
restart ([#656]).
1718

19+
### Removed
20+
21+
- Removed support for OPA `0.66.0` ([#677]).
22+
1823
[#656]: https://github.com/stackabletech/opa-operator/pull/656
1924
[#666]: https://github.com/stackabletech/opa-operator/pull/666
25+
[#677]: https://github.com/stackabletech/opa-operator/pull/677
2026
[#675]: https://github.com/stackabletech/opa-operator/pull/675
2127

2228
## [24.11.0] - 2024-11-18

docs/modules/opa/examples/getting_started/getting_started.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ sleep 5
7474

7575
request_hello() {
7676
# tag::request-hello[]
77-
curl -s http://localhost:8081/v1/data/test/hello
77+
curl -s http://localhost:8081/v1/data/test/hello -d '{"input": {}}'
7878
# end::request-hello[]
7979
}
8080

@@ -91,7 +91,7 @@ fi
9191

9292
request_world() {
9393
# tag::request-world[]
94-
curl -s http://localhost:8081/v1/data/test/world
94+
curl -s http://localhost:8081/v1/data/test/world -d '{"input": {}}'
9595
# end::request-world[]
9696
}
9797

docs/modules/opa/examples/getting_started/getting_started.sh.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ sleep 5
7474

7575
request_hello() {
7676
# tag::request-hello[]
77-
curl -s http://localhost:8081/v1/data/test/hello
77+
curl -s http://localhost:8081/v1/data/test/hello -d '{"input": {}}'
7878
# end::request-hello[]
7979
}
8080

@@ -91,7 +91,7 @@ fi
9191

9292
request_world() {
9393
# tag::request-world[]
94-
curl -s http://localhost:8081/v1/data/test/world
94+
curl -s http://localhost:8081/v1/data/test/world -d '{"input": {}}'
9595
# end::request-world[]
9696
}
9797

docs/modules/opa/examples/getting_started/opa.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
name: simple-opa
66
spec:
77
image:
8-
productVersion: "0.67.1"
8+
productVersion: "1.0.0"
99
servers:
1010
roleGroups:
1111
default: {}

docs/modules/opa/examples/getting_started/opa.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
name: simple-opa
66
spec:
77
image:
8-
productVersion: "0.67.1"
8+
productVersion: "1.0.0"
99
servers:
1010
roleGroups:
1111
default: {}

docs/modules/opa/examples/getting_started/simple-rule.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ data:
99
test.rego: |
1010
package test
1111
12-
hello {
12+
hello if {
1313
true
1414
}
1515
16-
world {
16+
world if {
1717
false
1818
}

docs/modules/opa/pages/usage-guide/user-info-fetcher.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ metadata:
1616
name: opa
1717
spec:
1818
image:
19-
productVersion: 0.67.1
19+
productVersion: 1.0.0
2020
clusterConfig:
2121
userInfo: # <1>
2222
backend:
@@ -132,8 +132,6 @@ For example, the following rule allows access for users in the `/admin` group:
132132
----
133133
package test
134134
135-
import rego.v1
136-
137135
default allow := false
138136
139137
allow if {

docs/modules/opa/partials/supported-versions.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// This is a separate file, since it is used by both the direct OPA documentation, and the overarching
33
// Stackable Platform documentation.
44

5-
* 0.67.1
6-
* 0.66.0 (deprecated)
5+
* 1.0.0
6+
* 0.67.1 (deprecated)

tests/templates/kuttl/smoke/10-install-opa.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ data:
99
test.rego: |
1010
package test
1111

12-
hello {
12+
hello if {
1313
true
1414
}
1515

16-
world {
16+
world if {
1717
false
1818
}
1919
---

tests/templates/kuttl/smoke/test-regorule.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,19 @@
2727
# --> {'hello': True}
2828

2929
# url = 'http://test-opa-svc:8081/v1/data/test'
30-
response = requests.post(args['url']).json()
30+
response = requests.post(args["url"], json={"input": {}}).json()
3131

32-
if "result" in response and "hello" in response["result"] and response["result"]["hello"]:
32+
if (
33+
"result" in response
34+
and "hello" in response["result"]
35+
and response["result"]["hello"]
36+
):
3337
print("Test successful!")
3438
exit(0)
3539
else:
36-
print("Error: received " + str(response) + " - expected: {'result': {'hello': True}}")
40+
print(
41+
"Error: received "
42+
+ str(response)
43+
+ " - expected: {'result': {'hello': True}}"
44+
)
3745
exit(-1)

0 commit comments

Comments
 (0)