From de3c8c12664c5b8ff55ebd455f48806a9c4d98ac Mon Sep 17 00:00:00 2001 From: Stacky McStackface Date: Mon, 11 May 2026 08:50:52 +0000 Subject: [PATCH] chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@6f8308216211cd88a8295b58cf3a781cbca672fa Reference-to: stackabletech/operator-templating@6f83082 (Part of https://github.com/stackabletech/issues/issues/716) --- Tiltfile | 23 ++++++++++++++----- .../commons-operator/templates/_helpers.tpl | 2 +- .../templates/deployment.yaml | 4 ++-- docker/Dockerfile | 2 +- rustfmt.toml | 2 +- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Tiltfile b/Tiltfile index 58c6430..02508e5 100644 --- a/Tiltfile +++ b/Tiltfile @@ -2,13 +2,22 @@ meta = read_json('nix/meta.json') operator_name = meta['operator']['name'] -# If tilt_options.json exists read it and load the default_registry and default_repository value from it +# If tilt_options.json exists read it and load the default_registry, default_operator_repository, +# and default_product_repository value from it settings = read_json('tilt_options.json', default={}) registry = settings.get('default_registry', 'oci.stackable.tech') -repository = settings.get('default_repository', registry + '/' + 'sdp') -operator_image_name = repository + '/' + operator_name -# Configure default registry either read from config file above, or with default value of "oci.stackable.tech" +# Construct the operator image repository. It uses the "sandbox" instead of the "sdp" namespace to +# separate "testing/local" images from official (published) images. +operator_repository = settings.get('default_operator_repository', registry + '/' + 'sandbox') +operator_image_name = operator_repository + '/' + operator_name + +# For the product image, we wanna use the images in the "sdp" namespace, because "sandbox" doesn't +# contain those images (by default). +product_repository = settings.get('default_product_repository', registry + '/' + 'sdp') + +# Configure default registry either read from config file above, or with default value of +# "oci.stackable.tech" default_registry(registry) custom_build( @@ -31,14 +40,16 @@ k8s_kind('DaemonSet', image_json_path='{.spec.template.metadata.annotations.inte # supported by helm(set). helm_values = settings.get('helm_values', None) -helm_override_image_repository = 'image.repository=' + repository +helm_override_operator_image_repository = 'image.repository=' + operator_repository +helm_override_product_image_repository = 'image.productRepository=' + product_repository k8s_yaml(helm( 'deploy/helm/' + operator_name, name=operator_name, namespace="stackable-operators", set=[ - helm_override_image_repository, + helm_override_operator_image_repository, + helm_override_product_image_repository, ], values=helm_values, )) diff --git a/deploy/helm/commons-operator/templates/_helpers.tpl b/deploy/helm/commons-operator/templates/_helpers.tpl index 9d7b189..7d4d39d 100644 --- a/deploy/helm/commons-operator/templates/_helpers.tpl +++ b/deploy/helm/commons-operator/templates/_helpers.tpl @@ -79,7 +79,7 @@ helm.sh/test: {{ include "operator.chart" . }} {{- end }} {{/* -Build the full container image reference. +Build the full operator container image reference. */}} {{- define "operator.image" -}} {{- printf "%s/%s:%s" .Values.image.repository .Chart.Name (.Values.image.tag | default .Chart.AppVersion) -}} diff --git a/deploy/helm/commons-operator/templates/deployment.yaml b/deploy/helm/commons-operator/templates/deployment.yaml index 10c39df..d0cecba 100644 --- a/deploy/helm/commons-operator/templates/deployment.yaml +++ b/deploy/helm/commons-operator/templates/deployment.yaml @@ -70,9 +70,9 @@ spec: - name: OPERATOR_SERVICE_NAME value: {{ include "operator.fullname" . }} - # The image repository, like "oci.stackable.tech/sdp" + # The product image repository, like "oci.stackable.tech/sdp". - name: IMAGE_REPOSITORY - value: {{ .Values.image.repository }} + value: {{ .Values.image.productRepository | default .Values.image.repository }} # Operators need to know the node name they are running on, to e.g. discover the # Kubernetes domain name from the kubelet API. diff --git a/docker/Dockerfile b/docker/Dockerfile index a35e776..4ed550b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -37,7 +37,7 @@ ARG STACKABLE_USER_NAME="stackable" # "-c": Allows the execution of commands passed as a string SHELL ["/bin/bash", "-euo", "pipefail", "-c"] -# These labels have mostly been superceded by the OpenContainer spec annotations below but it doesn't hurt to include them +# These labels have mostly been superseded by the OpenContainer spec annotations below but it doesn't hurt to include them # http://label-schema.org/rc1/ LABEL name="Stackable Operator for Stackable Commons" LABEL maintainer="info@stackable.tech" diff --git a/rustfmt.toml b/rustfmt.toml index 07217b2..03d21a4 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,5 +1,5 @@ # This file includes unstable features, so you need to run "cargo +nightly fmt" to format your code. -# It's also ok to use the stable toolchain by simple running "cargo fmt", but using the nigthly formatter is prefered. +# It's also ok to use the stable toolchain by simple running "cargo fmt", but using the nightly formatter is preferred. # https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rustfmt-style-edition.html style_edition = "2024"