jx step patch-config

list of jx commands

jx step patch-config

Modifies a ConfigMap with the given json patch


This step will take a json patch and attempt to modify the given ConfigMap. This is supposed to be used by Helm hooks to modify certain configuration values depending on the chart needs

jx step patch-config [flags]


  # Update the plank property in the data section of a config map, which is an embedded yaml file as a string literal called config.yaml:
  jx step patch-config -m config --first-level-property config.yaml -p '["op": "replace", "path": "/plank", "value": {"foo": "bar"}]'
  # Update a root level property of a config map using strategic merge:
  jx step patch-config -m config -t strategic -p '{"metadata": {"initializers": {"result": {"status": "newstatus"}}}}'


  -m, --config-map string             The ConfigMap that will be modified
      --first-level-property string   The first level property within "Data:" where the json patch will be applied. If left empty, the patch will be applied to the whole ConfigMap
  -h, --help                          help for patch-config
  -o, --output string                 the output of the modified ConfigMap if dry-run was provided
  -p, --patch string                  The Json patch that will be applied to the Data within the ConfigMap
  -t, --type string                   The type of patch being provided; one of [json merge strategic] - If the "first-level-property" flag is provided, this has no effect

Options inherited from parent commands

  -b, --batch-mode   Runs in batch mode without prompting for user input
      --verbose      Enables verbose output. The environment variable JX_LOG_LEVEL has precedence over this flag and allows setting the logging level to any value of: panic, fatal, error, warn, info, debug, trace


Auto generated by spf13/cobra on 2-Sep-2020