Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

ks param set command is not able to set array or map. #448

@jsakai

Description

@jsakai

/kind bug

What happened:
ks param set command is not able to set array or map.

If there is space in last param, I get below error

$ ks param set test-v1 envs [{name: 'value1'},{name: 'value2'}]
ERROR 'param set' takes exactly three arguments, (1) the name of the component, in addition to (2) the key and (3) value of the parameter

I removed the space, and command success. However, envs value is set as string instead of array.

$ ks param set test-v1 envs [{name:'value1'},{name:'value2'}]
INFO  Parameter 'envs' successfully set to '"[{name:value1},{name:value2}]"' for component 'test-v1'

$ vim components/params.libsonnet
{
  global: {
  },
  components: {
    'test-v1': {
      envs: "[{name:value1},{name:value2}]",
    },
  },
}

Expecting:

env: [{name: ’value1’},{name: ‘value2’}]

Environment:

  • ksonnet version (use ks version):
    $ ks version
    ksonnet version: 0.9.2
    jsonnet version: v0.9.5
    client-go version: 1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions