acorn-io / runtime

A simple application deployment framework built on Kubernetes
https://docs.acorn.io/
Apache License 2.0
1.13k stars 100 forks source link

Error out in cases when user attempts to create secret with incorrect json/yaml file format. #2409

Open sangee2004 opened 10 months ago

sangee2004 commented 10 months ago

acorn version - v0.10.0-rc2-9-g43dbcbf4+43dbcbf4

Steps to reproduce the problem:

  1. Create secret with incorrect json/yaml file format using --file option like
    %cat test.yml
    type: "opaque"
    data:
    -test1:         "value1"
    -test2:         "value2"
    %acorn secret create --file test.yml mytestsec
    mytestsec
    % acorn secret reveal mytestsec                
    NAME      TYPE      KEY       VALUE
  2. Secrets get created with no data.

Expected Behavior: Secret creation should error out stating that there was no data found to create secrets.