Skip to content

Commit f2f25ca

Browse files
committed
refactor(operator): Align code with decision
This implements the decision taken in stackabletech/decisions#85
1 parent 3a13c9d commit f2f25ca

3 files changed

Lines changed: 114 additions & 127 deletions

File tree

crates/stackable-operator/crds/DummyCluster.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,9 +1781,9 @@ spec:
17811781
properties:
17821782
custom:
17831783
description: |-
1784-
Overwrite the container image.
1784+
Provide a custom container image.
17851785
1786-
Specify the full container image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
1786+
Specify the full container image name, e.g. `oci.example.tech/namespace/superset:1.4.1-my-tag`
17871787
type: string
17881788
productVersion:
17891789
description: Version of the product, e.g. `1.4.1`.
@@ -1809,18 +1809,10 @@ spec:
18091809
type: object
18101810
nullable: true
18111811
type: array
1812-
registry:
1813-
description: |-
1814-
The container image registry, e.g. `oci.stackable.tech`.
1815-
1816-
If not specified, the operator will use the image registry provided via the operator
1817-
environment options.
1818-
nullable: true
1819-
type: string
1820-
repository:
1812+
repo:
18211813
description: |-
18221814
The repository on the container image registry where the container image is located, e.g.
1823-
`sdp/airflow`.
1815+
`oci.example.com/namespace`.
18241816
18251817
If not specified, the operator will use the image registry provided via the operator
18261818
environment options.

crates/stackable-operator/src/cli/environment.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,13 @@ pub struct OperatorEnvironmentOptions {
1414
#[arg(long, env)]
1515
pub operator_service_name: String,
1616

17-
/// The image registry which should be used when resolving images provisioned by the operator.
17+
/// The image repository which should be used when resolving images provisioned by the operator.
1818
///
19-
/// Example values include: `127.0.0.1` or `oci.example.org`.
19+
/// This argument expects a valid registry host and path. Valid values include:
20+
/// `oci.example.org/my/namespace` or `quay.io/organization`
2021
///
2122
/// Note that when running the operator on Kubernetes we recommend to provide this value via
2223
/// the deployment mechanism, like Helm.
23-
#[arg(long, env, value_parser = url::Host::parse)]
24-
pub image_registry: url::Host,
25-
26-
/// The image repository used in conjunction with the `image_registry` to form the final image
27-
/// name.
28-
///
29-
/// Example values include: `airflow-operator` or `path/to/hbase-operator`.
30-
///
31-
/// Note that when running the operator on Kubernetes we recommend to provide this value via
32-
/// the deployment mechanism, like Helm. Additionally, care must be taken when this value is
33-
/// used as part of the product image selection, as it (most likely) includes the `-operator`
34-
/// suffix.
3524
#[arg(long, env)]
3625
pub image_repository: String,
3726
}

0 commit comments

Comments
 (0)