Skip to content

Commit

Permalink
feat(helm-docs): add Prerequisites section
Browse files Browse the repository at this point in the history
  • Loading branch information
Joxit committed Mar 26, 2023
1 parent a4ad306 commit 1dc4869
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helm-docs/src/commands/readme.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::chart::Chart;
use crate::prerequisites::generate_prerequisites;
use crate::table::generate_table;
use crate::usage::generate_usage;
use std::path::PathBuf;
Expand All @@ -14,6 +15,10 @@ impl Readme {
pub fn exec(&self) {
let chart = Chart::from(self.directory.join("Chart.yaml"));
let values = self.directory.join("values.yaml");
println!("# {} Chart", chart.pretty_name);
println!("");
println!("## Prerequisites");
generate_prerequisites();
println!("## Usage");
generate_usage(chart);
println!("## Configuration");
Expand Down
1 change: 1 addition & 0 deletions helm-docs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use structopt::StructOpt;

mod chart;
mod commands;
mod prerequisites;
mod table;
mod usage;

Expand Down
9 changes: 9 additions & 0 deletions helm-docs/src/prerequisites.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const PREREQUISITES: &str = r#"
* **Helm 3.2+** (Helm 2 is not supported)
* **Kubernetes 1.19+** - This is the earliest version of Kubernetes tested.
It is possible that this chart works with earlier versions but it is untested.
"#;

pub fn generate_prerequisites() {
println!("{}", PREREQUISITES)
}

0 comments on commit 1dc4869

Please sign in to comment.