helm_rs/command/release/install.rs
1use super::ReleaseName;
2use super::shared::release_command;
3use crate::backend::Command;
4use crate::command::ChartRef;
5use crate::release::Release;
6
7release_command! {
8 /// `helm install -o json` (`pkg/cmd/install.go`, `pkg/action/install.go`): installs a chart and
9 /// returns the release Helm recorded (with `dry_run` set, the one it would record).
10 Install, InstallBuilder, install_builder {
11 required {
12 /// The `NAME` argument, `--generate-name` or `--name-template`.
13 name: ReleaseName,
14 }
15 collections {}
16 flags {
17 /// Flag `--hide-notes`: leave the notes out of the output.
18 hide_notes: bool,
19 /// Flag `--hide-secret`: hide Secrets in a dry-run (Helm requires a dry-run mode with it).
20 hide_secret: bool,
21 /// Flag `--render-subchart-notes`: include the subcharts' notes.
22 render_subchart_notes: bool,
23 /// Flag `--replace`: reuse the name of a deleted release that is still in the history.
24 replace: bool,
25 /// Flag `--server-side`, a boolean here that Helm defaults to true.
26 server_side: Option<bool>,
27 }
28 }
29}
30
31impl Install {
32 /// An install of `chart` under `name` with every other setting left to Helm.
33 #[must_use]
34 pub fn new(name: ReleaseName, chart: ChartRef) -> Self {
35 Self::builder(name, chart).build()
36 }
37}
38
39impl Command for Install {
40 type Output = Release;
41}