Skip to content

Commit 0e0658f

Browse files
committed
adjustments after main merge
1 parent 73515e2 commit 0e0658f

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

rust/stackable-cockpit/src/platform/demo/spec.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,14 @@ impl DemoSpec {
313313
.into_params(&self.parameters)
314314
.context(ParseParametersSnafu)?;
315315

316-
// We add the DEMO parameter, so that demos can use that to render e.g. the demo label
317-
parameters.insert("DEMO".to_owned(), install_parameters.demo_name.clone());
316+
// We add the STACK and DEMO parameter, so that demos can use that to render e.g. the demo label
317+
parameters.insert("STACK".to_owned(), install_parameters.stack_name);
318+
parameters.insert("DEMO".to_owned(), install_parameters.demo_name);
318319

319320
Self::install_manifests(
320321
&self.manifests,
321322
&parameters,
322323
&install_parameters.demo_namespace,
323-
&install_parameters.stack_name,
324-
Some(&install_parameters.demo_name),
325324
install_parameters.labels,
326325
client,
327326
transfer_client,

rust/stackable-cockpit/src/platform/manifests.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,11 @@ pub enum Error {
7373
pub trait InstallManifestsExt {
7474
// TODO (Techassi): This step shouldn't care about templating the manifests nor fetching them from remote
7575
#[instrument(skip_all, fields(%namespace, indicatif.pb_show = true))]
76-
#[allow(clippy::too_many_arguments, async_fn_in_trait)]
76+
#[allow(async_fn_in_trait)]
7777
async fn install_manifests(
7878
manifests: &[ManifestSpec],
7979
parameters: &HashMap<String, String>,
8080
namespace: &str,
81-
stack_name: &str,
82-
demo_name: Option<&str>,
8381
labels: Labels,
8482
client: &Client,
8583
transfer_client: &xfer::Client,
@@ -93,10 +91,6 @@ pub trait InstallManifestsExt {
9391
// We need some additional templating capabilities, e.g. the namespace, so that stacks/demos
9492
// can use that to render e.g. the fqdn service names [which contain the namespace].
9593
parameters.insert("NAMESPACE".to_owned(), namespace.to_owned());
96-
parameters.insert("STACK".to_owned(), stack_name.into());
97-
if let Some(demo_name) = demo_name {
98-
parameters.insert("DEMO".to_owned(), demo_name.into());
99-
}
10094

10195
for manifest in manifests {
10296
let parameters = parameters.clone();

rust/stackable-cockpit/src/platform/stack/spec.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,16 @@ impl StackSpec {
355355
.into_params(&self.parameters)
356356
.context(ParseParametersSnafu)?;
357357

358-
// We add the STACK parameter, so that stacks can use that to render e.g. the stack label
359-
parameters.insert("STACK".to_owned(), install_parameters.stack_name.clone());
358+
// We add the STACK and optionally DEMO parameter, so that stacks can use that to render e.g. the stack label
359+
parameters.insert("STACK".to_owned(), install_parameters.stack_name);
360+
if let Some(demo_name) = install_parameters.demo_name {
361+
parameters.insert("DEMO".to_owned(), demo_name);
362+
}
360363

361364
Self::install_manifests(
362365
&self.manifests,
363366
&parameters,
364367
&install_parameters.stack_namespace,
365-
&install_parameters.stack_name,
366-
install_parameters.demo_name.as_deref(),
367368
install_parameters.labels,
368369
client,
369370
transfer_client,

0 commit comments

Comments
 (0)