Skip to content

Commit

Permalink
chore(bors): merge pull request #870
Browse files Browse the repository at this point in the history
870: fix(topology): remove the internal labels while displaying r=sinhaashish a=sinhaashish

This OPr removes the internal label while labeling a pool

The develop code was like 
```
$ ./target/debug/kubectl-mayastor label pool pool-on-node-one A=B -n openebs
Pool pool-on-node-one labelled successfully. Current labels: {"A": "B", "openebs.io/created-by": "operator-diskpool"}
```

After this PR 

```
$ ./target/debug/kubectl-mayastor label pool pool-on-node-one C=D -n openebs
Pool pool-on-node-one labelled successfully. Current labels: {"C": "D", "A": "B"}
```

Co-authored-by: sinhaashish <[email protected]>
  • Loading branch information
mayastor-bors and sinhaashish committed Oct 3, 2024
2 parents 86a7739 + 18dd2a0 commit f88eef4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion control-plane/plugin/src/resources/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ impl Label for Pool {
}
OutputFormat::None => {
// In case the output format is not specified, show a success message.
let labels = pool.spec.unwrap().labels.unwrap_or_default();
let mut labels = pool.spec.unwrap().labels.unwrap_or_default();
let internal_label = external_utils::dsp_created_by_key();
labels.remove(&internal_label);
println!("Pool {id} labelled successfully. Current labels: {labels:?}");
}
}
Expand Down

0 comments on commit f88eef4

Please sign in to comment.