Skip to content

Instantly share code, notes, and snippets.

@clok
Created August 6, 2020 16:46
Show Gist options
  • Save clok/ca1452874e372b02fe597f8ad65ca7f2 to your computer and use it in GitHub Desktop.
Save clok/ca1452874e372b02fe597f8ad65ca7f2 to your computer and use it in GitHub Desktop.

% gwsm 8

NAME

gwsm - interact with config map and secret manager variables

SYNOPSIS

gwsm

Usage:

gwsm [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...]

COMMANDS

version, v

Print version info

s3

simple S3 commands

get

[object path] [destination path]

secretsmanager, sm

Secrets Manager commands

--binary, -b: get the SecretBinary value

list

display table of all secrets with meta data

describe

print description of secret to STDOUT

--secret-id, -s="": Specific Secret to describe, will bypass select/search

get, view

select from list or pass in specific secret

--secret-id, -s="": Specific Secret to view, will bypass select/search

edit, e

interactive edit of a secret String Value

--secret-id, -s="": Specific Secret to edit, will bypass select/search

create, c

create new secret in Secrets Manager

--description, --desc="": Additional description text.

--interactive, -i: Open interactive editor to create secret value.

--secret-id, -s="": Secret name

--tags="": key=value tags (CSV list)

--value, -v="": Secret Value. Will store as a string, unless binary flag is set.

put

non-interactive update to a specific secret

--description, --desc="": Additional description text.

--interactive, -i: Open interactive editor to create secret value.

--secret-id, -s="": Secret name

--tags="": key=value tags (CSV list)

--value, -v="": Secret Value. Will store as a string, unless binary flag is set.

delete, del

delete a specific secret

--force, -f: Bypass recovery window (30 days) and immediately delete Secret.

--secret-id, -s="": Specific Secret to delete

local, l

Interact with local env files

view, v

View values based on local settings

--configmap, -c="": Path to configmap.yaml

--secret-suffix="": Suffix used to find ENV variables that denote the Secret Manager Secrets to lookup (default: _NAME)

--secrets, -s="": Path to secrets.yml (default: .docker/secrets.yml)

ansible, legacy, a

View value from ansible-vault encrypted Kube Secret file.

--accessor, -a="": Accessor key to pull data out of Data block. (default: .env)

--encrypted-env-file, -e="": Path to encrypted Kube Secret file

--vault-password-file="": vault password file VAULT_PASSWORD_FILE

namespace, ns

Interact with env on a running Pod within a Namespace

view, v

View values configured withing a namespace

--cmd="": Command to inspect (default: node)

--exclude="": List (csv) of specific env vars to exclude values from display. Set to "" to remove any exclusions. (default: PATH,SHLVL,HOSTNAME)

--filter-prefix, -f="": List of prefixes (csv) used to filter values from display. Set to "" to remove any filters. (default: npm_,KUBERNETES_,API_PORT)

--namespace, -n="": Kube Namespace list Pods from

diff, d

View diff of local vs. namespace

--cmd="": Command to inspect (default: node)

--configmap, -c="": Path to configmap.yaml

--exclude="": List (csv) of specific env vars to exclude values from display. Set to "" to remove any exclusions. (default: PATH,SHLVL,HOSTNAME)

--filter-prefix, -f="": List of prefixes (csv) used to filter values from display. Set to "" to remove any filters. (default: npm_,KUBERNETES_,API_PORT)

--namespace, -n="": Kube Namespace list Pods from

--secret-suffix="": Suffix used to find ENV variables that denote the Secret Manager Secrets to lookup (default: _NAME)

--secrets, -s="": Path to secrets.yml (default: .docker/secrets.yml)

diff:legacy, diff:ansible

View diff of local (ansible encrypted) vs. namespace

--accessor, -a="": Accessor key to pull data out of Data block. (default: .env)

--dotenv="": Path to .env file on Pod (default: $PWD/.env)

--encrypted-env-file, -e="": Path to encrypted Kube Secret file

--namespace, -n="": Kube Namespace list Pods from

--vault-password-file="": vault password file VAULT_PASSWORD_FILE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment