feat: add scheduler-k3s:charts:set and :charts:report
Helm chart overrides on the scheduler-k3s plugin were previously set through the generic `scheduler-k3s:set --global chart.<chart>.<property>` interface, which mixed chart-level configuration into the same command that manages scheduler properties and offered no focused way to inspect which overrides were configured. A dedicated `scheduler-k3s:charts:set` sets and clears chart-specific helm values, and a complementary `scheduler-k3s:charts:report` surfaces configured overrides per chart with optional JSON output and single-field flag queries. The legacy form on `scheduler-k3s:set` continues to work but now emits a deprecation warning pointing users at the new subcommand.
This commit is contained in:
6 files changed
+294
-6
No files matched your search
@@ -54,6 +54,23 @@ func main() {
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
err = scheduler_k3s.CommandAutoscalingAuthReport(appName, *format, *global, *includeMetadata)
|
||||
case "charts:set":
|
||||
args := flag.NewFlagSet("scheduler-k3s:charts:set", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
property := args.Arg(0)
|
||||
value := args.Arg(1)
|
||||
err = scheduler_k3s.CommandChartsSet(property, value)
|
||||
case "charts:report":
|
||||
args := flag.NewFlagSet("scheduler-k3s:charts:report", flag.ExitOnError)
|
||||
format := args.String("format", "stdout", "format: [ stdout | json ]")
|
||||
reportArgs, flagErr := common.ParseReportArgs("scheduler-k3s-charts", os.Args[2:])
|
||||
if flagErr == nil {
|
||||
args.Parse(reportArgs.OSArgs)
|
||||
chartName := args.Arg(0)
|
||||
err = scheduler_k3s.CommandChartsReport(chartName, *format, reportArgs.InfoFlag)
|
||||
} else {
|
||||
err = flagErr
|
||||
}
|
||||
case "cluster:add":
|
||||
args := flag.NewFlagSet("scheduler-k3s:cluster:add", flag.ExitOnError)
|
||||
allowUknownHosts := args.Bool("insecure-allow-unknown-hosts", false, "insecure-allow-unknown-hosts: allow unknown hosts")
|
||||
|
||||
Reference in new issue
Block a user