forked from rook/rook
This change refactors the getSecret method somewhat toward cleaner code. The only additional change in behavior is the introduction of a switch instead of multiple if's and error treatment of the case of an empty secret. Signed-off-by: subhamkrai <srai@redhat.com>