Skip to content

Commit ecbcd01

Browse files
authored
Adding --kubeconifg to take kubeconfig from a file (#81)
Signed-off-by: Daniel Guns <danbguns@gmail.com>
1 parent b3f2647 commit ecbcd01

8 files changed

Lines changed: 458 additions & 34 deletions

File tree

docs/content/getting-started/_index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ Choose your preferred installation method from the [Installation Guide](/getting
3030
flux9s
3131
```
3232

33+
Or use a specific kubeconfig file:
34+
35+
```bash
36+
flux9s --kubeconfig /path/to/kubeconfig
37+
```
38+
3339
By default, `flux9s` watches the `flux-system` namespace. Use `:ns all` to view all namespaces or `:ns <namespace>` to switch to a specific namespace.
3440

3541
{{% alert title="Note" color="info" %}}

docs/content/user-guide/_index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ Perform actions on selected resources:
5656
Configure flux9s from the command line:
5757

5858
```bash
59+
# Use a specific kubeconfig file
60+
flux9s --kubeconfig /path/to/kubeconfig
61+
5962
# Show all config options
6063
flux9s config --help
6164

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! CLI command handlers
1+
//! Configuration command handlers
22
33
use anyhow::{Context, Result};
44
use clap::Subcommand;
@@ -7,15 +7,6 @@ use std::path::PathBuf;
77
use crate::config::schema::Config;
88
use crate::config::{paths, ConfigLoader, ThemeLoader};
99

10-
/// Display version information
11-
pub fn display_version() {
12-
println!("flux9s {}", env!("CARGO_PKG_VERSION"));
13-
println!(" {}", env!("CARGO_PKG_DESCRIPTION"));
14-
println!(" {}", env!("CARGO_PKG_AUTHORS"));
15-
println!(" License: {}", env!("CARGO_PKG_LICENSE"));
16-
println!(" Repository: {}", env!("CARGO_PKG_REPOSITORY"));
17-
}
18-
1910
/// Skins management subcommands
2011
#[derive(Subcommand, Debug)]
2112
pub enum SkinsSubcommand {

src/cli/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
//!
33
//! Handles all CLI subcommands and argument parsing.
44
5-
mod commands;
5+
mod config;
66
mod logging;
7+
mod version;
78

8-
pub use commands::*;
9+
pub use config::{handle_config_command, ConfigSubcommand};
910
pub use logging::*;
11+
pub use version::display_version;

src/cli/version.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//! Version command handler
2+
3+
/// Display version information
4+
pub fn display_version() {
5+
println!("flux9s {}", env!("CARGO_PKG_VERSION"));
6+
println!(" {}", env!("CARGO_PKG_DESCRIPTION"));
7+
println!(" {}", env!("CARGO_PKG_AUTHORS"));
8+
println!(" License: {}", env!("CARGO_PKG_LICENSE"));
9+
println!(" Repository: {}", env!("CARGO_PKG_REPOSITORY"));
10+
}

0 commit comments

Comments
 (0)