Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple filenames in krane deploy #606

Merged
merged 3 commits into from
Oct 28, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/krane/cli/deploy_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DeployCommand
"bindings" => { type: :array, banner: "foo=bar abc=def",
desc: "Expose additional variables to ERB templates (format: k1=v1 k2=v2, JSON string or file "\
"(JSON or YAML) path prefixed by '@')" },
"filenames" => { type: :string, banner: '/tmp/my-resource.yml', aliases: :f, required: true,
"filenames" => { type: :array, banner: '/tmp/my-resource.yml', aliases: :f, required: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nit (scope might be beyond this PR): The formatting for each X_command.rb is different for each command. E.g. render uses symbolized keys, run uses line-per-field, etc. Would be nice to have these be consistent

desc: "Path to file or directory that contains the configuration to apply" },
"global-timeout" => { type: :string, banner: "duration", default: DEFAULT_DEPLOY_TIMEOUT,
desc: "Max duration to monitor workloads correctly deployed" },
Expand Down Expand Up @@ -51,7 +51,7 @@ def self.from_options(namespace, context, options)
protected_namespaces = []
end

KubernetesDeploy::OptionsHelper.with_processed_template_paths([options[:filenames]],
KubernetesDeploy::OptionsHelper.with_processed_template_paths(options[:filenames],
require_explicit_path: true) do |paths|
deploy = ::Krane::DeployTask.new(
namespace: namespace,
Expand Down