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

chore: Replace nexus references with oci #945

Merged
merged 3 commits into from
Jan 28, 2025
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 crates/stackable-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Changed

- Change constant used for product image selection so that it defaults to OCI ([#945]).

[#945]: https://github.com/stackabletech/operator-rs/pull/945

## [0.84.1] - 2025-01-22

### Fixed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Partly taken from https://github.com/stackabletech/zookeeper-operator/blob/main/deploy/helm/zookeeper-operator/values.yaml
---
image:
repository: docker.stackable.tech/stackable/zookeeper-operator
repository: oci.stackable.tech/sdp/zookeeper-operator
pullPolicy: IfNotPresent
pullSecrets: []
nameOverride: ''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Partly taken from https://github.com/stackabletech/zookeeper-operator/blob/main/deploy/helm/zookeeper-operator/values.yaml
---
image:
repository: docker.stackable.tech/stackable/zookeeper-operator
repository: oci.stackable.tech/sdp/zookeeper-operator
pullPolicy: IfNotPresent
pullSecrets: []
nameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion crates/stackable-operator/fixtures/helm/output.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
image:
repository: docker.stackable.tech/stackable/zookeeper-operator
repository: oci.stackable.tech/sdp/zookeeper-operator
pullPolicy: IfNotPresent
pullSecrets: []
nameOverride: ''
Expand Down
20 changes: 10 additions & 10 deletions crates/stackable-operator/src/commons/product_image_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use strum::AsRefStr;
#[cfg(doc)]
use crate::kvp::Labels;

pub const STACKABLE_DOCKER_REPO: &str = "docker.stackable.tech/stackable";
pub const STACKABLE_DOCKER_REPO: &str = "oci.stackable.tech/sdp";

/// Specify which image to use, the easiest way is to only configure the `productVersion`.
/// You can also configure a custom image registry to pull from, as well as completely custom
Expand Down Expand Up @@ -43,7 +43,7 @@ pub enum ProductImageSelection {
#[serde(rename_all = "camelCase")]
pub struct ProductImageCustom {
/// Overwrite the docker image.
/// Specify the full docker image name, e.g. `docker.stackable.tech/stackable/superset:1.4.1-stackable2.1.0`
/// Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
custom: String,
/// Version of the product, e.g. `1.4.1`.
product_version: String,
Expand All @@ -58,7 +58,7 @@ pub struct ProductImageStackableVersion {
/// If not specified, the operator will use its own version, e.g. `23.4.1`.
/// When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.
stackable_version: Option<String>,
/// Name of the docker repo, e.g. `docker.stackable.tech/stackable`
/// Name of the docker repo, e.g. `oci.stackable.tech/sdp`
repo: Option<String>,
}

Expand All @@ -70,7 +70,7 @@ pub struct ResolvedProductImage {
/// App version as formatted for [`Labels::recommended`]
pub app_version_label: String,

/// Image to be used for the product image e.g. `docker.stackable.tech/stackable/superset:1.4.1-stackable2.1.0`
/// Image to be used for the product image e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
pub image: String,

/// Image pull policy for the containers using the product image
Expand Down Expand Up @@ -190,7 +190,7 @@ mod tests {
productVersion: 1.4.1
"#,
ResolvedProductImage {
image: "docker.stackable.tech/stackable/superset:1.4.1-stackable23.7.42".to_string(),
image: "oci.stackable.tech/sdp/superset:1.4.1-stackable23.7.42".to_string(),
app_version_label: "1.4.1-stackable23.7.42".to_string(),
product_version: "1.4.1".to_string(),
image_pull_policy: "Always".to_string(),
Expand All @@ -204,7 +204,7 @@ mod tests {
productVersion: 1.4.1
"#,
ResolvedProductImage {
image: "docker.stackable.tech/stackable/superset:1.4.1-stackable0.0.0-dev".to_string(),
image: "oci.stackable.tech/sdp/superset:1.4.1-stackable0.0.0-dev".to_string(),
app_version_label: "1.4.1-stackable0.0.0-dev".to_string(),
product_version: "1.4.1".to_string(),
image_pull_policy: "Always".to_string(),
Expand All @@ -218,7 +218,7 @@ mod tests {
productVersion: 1.4.1
"#,
ResolvedProductImage {
image: "docker.stackable.tech/stackable/superset:1.4.1-stackable0.0.0-dev".to_string(),
image: "oci.stackable.tech/sdp/superset:1.4.1-stackable0.0.0-dev".to_string(),
app_version_label: "1.4.1-stackable0.0.0-dev".to_string(),
product_version: "1.4.1".to_string(),
image_pull_policy: "Always".to_string(),
Expand All @@ -233,7 +233,7 @@ mod tests {
stackableVersion: 2.1.0
"#,
ResolvedProductImage {
image: "docker.stackable.tech/stackable/superset:1.4.1-stackable2.1.0".to_string(),
image: "oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0".to_string(),
app_version_label: "1.4.1-stackable2.1.0".to_string(),
product_version: "1.4.1".to_string(),
image_pull_policy: "Always".to_string(),
Expand Down Expand Up @@ -320,11 +320,11 @@ mod tests {
"superset",
"23.7.42",
r#"
custom: docker.stackable.tech/stackable/superset@sha256:85fa483aa99b9997ce476b86893ad5ed81fb7fd2db602977eb8c42f76efc1098
custom: oci.stackable.tech/sdp/superset@sha256:85fa483aa99b9997ce476b86893ad5ed81fb7fd2db602977eb8c42f76efc1098
productVersion: 1.4.1
"#,
ResolvedProductImage {
image: "docker.stackable.tech/stackable/superset@sha256:85fa483aa99b9997ce476b86893ad5ed81fb7fd2db602977eb8c42f76efc1098".to_string(),
image: "oci.stackable.tech/sdp/superset@sha256:85fa483aa99b9997ce476b86893ad5ed81fb7fd2db602977eb8c42f76efc1098".to_string(),
app_version_label: "1.4.1-sha256:85fa483aa99b9997ce476b86893ad5ed81fb7fd2db602977eb".to_string(),
product_version: "1.4.1".to_string(),
image_pull_policy: "Always".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions crates/stackable-operator/src/product_logging/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ sinks:
/// # let resolved_product_image = ResolvedProductImage {
/// # product_version: "1.0.0".into(),
/// # app_version_label: "1.0.0".into(),
/// # image: "docker.stackable.tech/stackable/my-product:1.0.0-stackable1.0.0".into(),
/// # image: "oci.stackable.tech/sdp/my-product:1.0.0-stackable1.0.0".into(),
/// # image_pull_policy: "Always".into(),
/// # pull_secrets: None,
/// # };
Expand Down Expand Up @@ -1503,7 +1503,7 @@ kill $vector_pid
///
/// let container = ContainerBuilder::new("init")
/// .unwrap()
/// .image("docker.stackable.tech/stackable/my-product:1.0.0-stackable1.0.0")
/// .image("oci.stackable.tech/sdp/my-product:1.0.0-stackable1.0.0")
/// .command(vec!["bash".to_string(), "-c".to_string()])
/// .args(vec![args.join(" && ")])
/// .add_volume_mount("log", STACKABLE_LOG_DIR)
Expand Down
4 changes: 2 additions & 2 deletions crates/stackable-operator/src/utils/crds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mod tests {
spec:
containers:
- name: nifi
image: docker.stackable.tech/stackable/nifi:1.23.2-stackable23.11.0
image: oci.stackable.tech/sdp/nifi:1.23.2-stackable23.11.0
volumeMounts:
- name: jar
mountPath: /stackable/nifi/lib/wifi.png
Expand All @@ -116,7 +116,7 @@ mod tests {
podOverrides:
spec:
containers:
- image: docker.stackable.tech/stackable/nifi:1.23.2-stackable23.11.0
- image: oci.stackable.tech/sdp/nifi:1.23.2-stackable23.11.0
"#;

// FIXME: Ideally we would require the names of the containers to be set. We had users using podOverrides
Expand Down
Loading