Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Updated code to adhere to ADR018 #293

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
- `operator-rs` `0.10.0` -> `0.15.0` ([#241], [#244], [#273]).
- BREAKING: Renamed custom resource from `OpenPolicyAgent` to `OpaCluster` ([#244]).
- Replace the `tempdir` crate with `tempfile` ([#287]).
- [BREAKING] Specifying the product version has been changed to adhere to [ADR018](https://docs.stackable.tech/home/contributor/adr/ADR018-product_image_versioning.html) instead of just specifying the product version you will now have to add the Stackable image version as well, so `version: 3.5.8` becomes (for example) `version: 3.5.8-stackable0.1.0` ([#293])

### Removed

Expand All @@ -33,6 +34,7 @@ All notable changes to this project will be documented in this file.
[#273]: https://github.com/stackabletech/opa-operator/pull/273
[#287]: https://github.com/stackabletech/opa-operator/pull/287
[#289]: https://github.com/stackabletech/opa-operator/pull/289
[#293]: https://github.com/stackabletech/opa-operator/pull/293

## [0.8.0] - 2022-02-14

Expand Down
7 changes: 6 additions & 1 deletion docs/modules/ROOT/pages/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To create a single node OPA (v0.37.2) cluster with Prometheus metrics exposed on
metadata:
name: simple-opa
spec:
version: "0.37.2"
version: "0.37.2-stackable0.2.0"
servers:
roleGroups:
default:
Expand All @@ -25,6 +25,11 @@ To create a single node OPA (v0.37.2) cluster with Prometheus metrics exposed on
kubernetes.io/os: linux
----

Please note that the version you need to specify is not only the version of OPA which you want to roll out, but has to be amended with a Stackable version as shown.
This Stackable version is the version of the underlying container image which is used to execute the processes.
For a list of available versions please check our https://repo.stackable.tech/#browse/browse:docker:v2%2Fstackable%2Fdruid%2Ftags[image registry].
It should generally be safe to simply use the latest image version that is available.

== Bundle Sources

OPA bundles are generated from `ConfigMap` objects by a side car container running along side the OPA server.
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-opa-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: OpaCluster
metadata:
name: simple-opa
spec:
version: "0.37.2"
version: "0.37.2-stackable0.2.0"
servers:
roleGroups:
default:
Expand Down
5 changes: 1 addition & 4 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,7 @@ fn build_server_rolegroup_daemonset(
server_config: &HashMap<PropertyNameKind, BTreeMap<String, String>>,
) -> Result<DaemonSet> {
let opa_version = opa_version(opa)?;
let image = format!(
"docker.stackable.tech/stackable/opa:{}-stackable0",
opa_version
);
let image = format!("docker.stackable.tech/stackable/opa:{}", opa_version);
let sa_name = format!(
"{}-{}",
opa.metadata.name.as_ref().unwrap(),
Expand Down
2 changes: 1 addition & 1 deletion tests/test-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
dimensions:
- name: opa
values:
- 0.37.2
- 0.37.2-stackable0.2.0
tests:
- name: smoke
dimensions:
Expand Down