Module: Kerbi::Consts::CommandSchemas

Defined in:
lib/config/cli_schema.rb

Constant Summary collapse

VALUES_SUPER =
{
  name: "values",
  desc: "Command group for values actions (see $ kerbi values help)"
}.freeze
PROJECT_SUPER =
{
  name: "project",
  desc: "Command group for project actions (see $ kerbi project help)"
}.freeze
STATE_SUPER =
{
  name: "state",
  desc: "Command group for state actions (see $ kerbi state help)"
}.freeze
RELEASE_SUPER =
{
  name: "release",
  desc: "Command group for release actions (see $ kerbi release help)"
}.freeze
CONFIG_SUPER =
{
  name: "config",
  desc: "Command group for config actions (see $ kerbi config help)"
}.freeze
TEMPLATE =
{
  name: "template [RELEASE_NAME] [PROJECT_URI]",
  desc: "Templates to YAML/JSON, using [RELEASE_NAME] for state I/O",
  options: [
    OptionSchemas::PROJECT_ROOT,
    OptionSchemas::OUTPUT_FMT,
    *OptionSchemas::VALUES_OPTIONS,
    *OptionSchemas::KUBERNETES_OPTIONS
  ]
}.freeze
CONSOLE =
{
  name: "console",
  desc: "Opens an IRB console so you can play with your mixers",
  options: [
    OptionSchemas::PROJECT_ROOT,
    OptionSchemas::VALUE_FNAMES,
    OptionSchemas::INLINE_ASSIGNMENT
  ]
}.freeze
VERSION =
{
  name: "version",
  desc: "Prints the version of this RubyGem",
  options: []
}.freeze
NEW_PROJECT =
{
  name: "new",
  desc: "Create a new directory with boilerplate files",
  options: [
    OptionSchemas::RUBY_VER,
    OptionSchemas::VERBOSE
  ]
}.freeze
RELEASE_STATUS =
{
  name: "status [RELEASE_NAME]",
  desc: "Check readiness of release's ConfigMap/Secret backend.",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
    OptionSchemas::VERBOSE
  ]
}.freeze
RELEASE_LIST =
{
  name: "list",
  desc: "Lists all known Kerbi releases by scanning cluster" \
        " ConfigMaps/Secrets",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
    OptionSchemas::VERBOSE
  ]
}.freeze
RELEASE_DELETE =
{
  name: "delete [RELEASE_NAME]",
  desc: "Delete the ConfigMap/Secret storing states for"\
        " this release",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
    OptionSchemas::PRE_CONFIRM
  ]
}.freeze
LIST_STATE =
{
  name: "list [RELEASE_NAME]",
  desc: "Print all recorded states for [RELEASE_NAME]",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
    OptionSchemas::OUTPUT_FMT
  ],
  defaults: OptionDefaults::LIST_STATE
}.freeze
INIT_RELEASE =
{
  name: "init [RELEASE_NAME]",
  desc: "Provision the resources for persisting the state",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
    OptionSchemas::VERBOSE
  ]
}.freeze
SHOW_STATE =
{
  name: "show [RELEASE_NAME] [TAG]",
  desc: "Print summary of state identified by [TAG]",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
    OptionSchemas::OUTPUT_FMT
  ],
  defaults: OptionDefaults::LIST_STATE
}.freeze
RETAG_STATE =
{
  name: "retag [RELEASE_NAME] [OLD_TAG] [NEW_TAG]",
  desc: "Updates entry's tag given by [OLD_TAG] to [NEW_TAG]",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
    OptionSchemas::OUTPUT_FMT
  ],
  defaults: OptionDefaults::LIST_STATE
}.freeze
PROMOTE_STATE =
{
  name: "promote [RELEASE_NAME] [TAG]",
  desc: "Removes the [cand]- prefix from the given entry,
         removing its candidate status.",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
  ],
  defaults: OptionDefaults::LIST_STATE
}.freeze
DEMOTE_STATE =
{
  name: "promote [RELEASE_NAME] [TAG]",
  desc: "Adds the [cand]- prefix from the given entry,
         giving it candidate status.",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
  ],
  defaults: OptionDefaults::LIST_STATE
}.freeze
DELETE_STATE =
{
  name: "delete [RELEASE_NAME] [TAG]",
  desc: "Deletes the state entry given by [TAG]",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
  ]
}.freeze
SET_STATE_ATTR =
{
  name: "set [RELEASE_NAME] [TAG] [ATTR_NAME] [NEW_VALUE]",
  desc: "Updates state entry [TAG], attribute "\
        "[ATTR_NAME] to value [NEW_VALUE]",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
  ]
}.freeze
PRUNE_CANDIDATES_STATE =
{
  name: "prune-candidates [RELEASE_NAME]",
  desc: "Deletes all state entries flagged as candidates",
  options: [
    *OptionSchemas::KUBERNETES_OPTIONS,
  ]
}.freeze
SHOW_VERSION =
{
  name: "version",
  desc: "Print the kerbi gem's version.",
  options: []
}.freeze
SHOW_VALUES =
{
  name: "show",
  desc: "Prints the final compiled values for the given sources",
  options: [
    OptionSchemas::OUTPUT_FMT,
    OptionSchemas::PROJECT_ROOT,
    OptionSchemas::RELEASE_NAME,
    *OptionSchemas::VALUES_OPTIONS,
    *OptionSchemas::KUBERNETES_OPTIONS
  ]
}.freeze
CONFIG_LOCATION =
{
  name: "location",
  desc: "Prints out filesystem path for global Kerbi config"
}.freeze
CONFIG_SET =
{
  name: "set [KEY] [VALUE]",
  desc: "Writes an x=y configuration to the global kerbi config"
}.freeze
CONFIG_GET =
{
  name: "get [KEY]",
  desc: "Prints out the value of KEY as loaded into the options"
}.freeze
CONFIG_SHOW =
{
  name: "show",
  desc: "Prints out the value of KEY as loaded into the options",
  options: [
    OptionSchemas::OUTPUT_FMT
  ]
}.freeze
CONFIG_RESET =
{
  name: "reset",
  desc: "Resets the config file to its default state",
  options: []
}.freeze