Module: Kerbi::Consts::OptionSchemas

Defined in:
lib/config/cli_schema.rb

Constant Summary collapse

PROJECT_ROOT =
{
  key: OptionKeys::PROJECT_ROOT,
  desc: "Project root. An abs path, a rel path, or remote (/foo, foo, @foo/bar)",
  aliases: "-p"
}
K8S_AUTH_TYPE =
{
  key: OptionKeys::K8S_AUTH_TYPE,
  desc: "Strategy for connecting to target cluster (defaults to kube-config)",
  enum: %w[kube-config in-cluster basic token]
}.freeze
KUBE_CONFIG_PATH =
{
  key: OptionKeys::KUBE_CONFIG_PATH,
  desc: "path to your kube-config file, defaults to ~/.kube/config"
}.freeze
KUBE_CONFIG_CONTEXT =
{
  key: OptionKeys::KUBE_CONFIG_CONTEXT,
  desc: "context to use in your kube config,
defaults to $(kubectl config current-context)"
}.freeze
K8S_USERNAME =
{
  key: OptionKeys::K8S_USERNAME,
  desc: "Kubernetes auth username for basic password auth"
}.freeze
K8S_PASSWORD =
{
  key: OptionKeys::K8S_PASSWORD,
  desc: "Kubernetes auth password for basic password auth"
}.freeze
LOAD_DEFAULT_VALUES =
{
  key: OptionKeys::LOAD_DEFAULT_VALUES,
  desc: "Automatically load values.yaml. Defaults to true.",
  type: "boolean",
  default: true
}.freeze
K8S_TOKEN =
{
  key: OptionKeys::K8S_TOKEN,
  desc: "Kubernetes auth bearer token for token auth"
}.freeze
STATE_BACKEND_TYPE =
{
  key: OptionKeys::STATE_BACKEND_TYPE,
  desc: "Persistent store to keep track of applied values (configmap, secret)",
  enum: %w[configmap secret]
}.freeze
OUTPUT_FMT =
{
  key: OptionKeys::OUTPUT_FMT,
  aliases: "-o",
  desc: "Specify YAML, JSON, or table",
  enum: %w[yaml json table]
}.freeze
INLINE_ASSIGNMENT =
{
  key: OptionKeys::INLINE_ASSIGNMENT,
  aliases: "--set",
  desc: "An inline variable assignment, e.g --set x.y=foo --set x.z=bar",
  repeatable: true
}.freeze
READ_STATE =
{
  key: OptionKeys::READ_STATE,
  desc: "Merge values from given state record into final values.",
}.freeze
STRICT_READ_STATE =
{
  key: OptionKeys::STRICT_READ_STATE,
  desc: "Makes read-state operations fail if the state does not exist for the given tag",
}.freeze
WRITE_STATE =
{
  key: OptionKeys::WRITE_STATE,
  desc: "write compiled values into given state record"
}.freeze
NAMESPACE =
{
  key: OptionKeys::NAMESPACE,
  aliases: "-n",
  desc: "for state operations, tell kerbi that the state
         configmap/secret is in this namespace"
}.freeze
VALUE_FNAMES =
{
  key: OptionKeys::VALUE_FNAMES,
  aliases: "-f",
  desc: "Name of a values file to be loaded.",
  repeatable: true
}.freeze
RUBY_VER =
{
  key: OptionKeys::RUBY_VER,
  desc: "Specify ruby version for Gemfile in a new project"
}.freeze
VERBOSE =
{
  key: OptionKeys::VERBOSE,
  desc: "Run in verbose mode",
  enum: %w[true false]
}.freeze
KUBERNETES_OPTIONS =
[
  NAMESPACE,
  STATE_BACKEND_TYPE,
  READ_STATE,
  WRITE_STATE,
  K8S_AUTH_TYPE,
  KUBE_CONFIG_PATH,
  KUBE_CONFIG_CONTEXT
].freeze
VALUES_OPTIONS =
[
  VALUE_FNAMES,
  INLINE_ASSIGNMENT,
  LOAD_DEFAULT_VALUES,
].freeze