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"
}
REVISION_TAG =
{
  key: OptionKeys::REVISION_TAG,
  desc: "Use this version of the Kerbi templating "\
        "engine (given by [PROJECT_URI]).",
  aliases: "-p"
}
K8S_AUTH_TYPE =
{
  key: OptionKeys::K8S_AUTH_TYPE,
  desc: "Kubernetes cluster authentication type. Uses " \
        "kube-config if unspecified.",
  enum: %w[kube-config in-cluster token]
}.freeze
KUBE_CONFIG_PATH =
{
  key: OptionKeys::KUBE_CONFIG_PATH,
  desc: "Path to your kube-config file. Uses " \
         "~/.kube/config if unspecified."
}.freeze
KUBE_CONFIG_CONTEXT =
{
  key: OptionKeys::KUBE_CONFIG_CONTEXT,
  desc: "Context to use in your kube config. "\
        "Uses current context if unspecified."
}.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: "Whether or not to automatically load values.yaml.",
  type: "boolean",
  default: true
}.freeze
K8S_TOKEN =
{
  key: OptionKeys::K8S_TOKEN,
  desc: "Kubernetes auth bearer token for token auth"
}.freeze
RELEASE_NAME =
{
  key: OptionKeys::RELEASE_NAME,
  desc: "Release name for commands where state I/O is optional"
}
STATE_BACKEND_TYPE =
{
  key: OptionKeys::STATE_BACKEND_TYPE,
  desc: "Type of persistent store to read/write this release's state.",
  enum: %w[configmap secret]
}.freeze
OUTPUT_FMT =
{
  key: OptionKeys::OUTPUT_FMT,
  aliases: "-o",
  desc: "In what format resulting data should be printed",
  enum: %w[yaml json table]
}.freeze
INLINE_ASSIGNMENT =
{
  key: OptionKeys::INLINE_ASSIGNMENT,
  aliases: "--set",
  desc: "Merge value from this assignment, "\
        "e.g --set x.y=foo. Multiple --set are allowed.",
  repeatable: true
}.freeze
READ_STATE =
{
  key: OptionKeys::READ_STATE,
  desc: "Merge values from state with this tag.",
}.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 new or existing state record" \
        "with this tag."
}.freeze
NAMESPACE =
{
  key: OptionKeys::NAMESPACE,
  aliases: "-n",
  desc: "Use this Kubernetes namespace instead of [RELEASE_NAME] "\
        "for state I/O."
}.freeze
VALUE_FNAMES =
{
  key: OptionKeys::VALUE_FNAMES,
  aliases: "-f",
  desc: "Merge all values read from this file. Multiple " \
        "-f are allowed.",
  repeatable: true
}.freeze
RUBY_VER =
{
  key: OptionKeys::RUBY_VER,
  desc: "Ruby version semver for autogenerated " \
        "Gemfile."
}.freeze
VERBOSE =
{
  key: OptionKeys::VERBOSE,
  desc: "Run in verbose mode",
  type: "boolean"
}.freeze
PRE_CONFIRM =
{
  key: OptionKeys::PRE_CONFIRM,
  desc: "Skip any CLI confirmation prompts",
  type: "boolean"
}.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