Uploaded image for project: 'ONAP Operations Manager'
  1. ONAP Operations Manager
  2. OOM-1476

Helm deploy script should accept/handle subchart names containing "-"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • Casablanca Release
    • None
    • None

      In the Casablanca release a Helm plugin script called deploy.sh has been introduced as a work around to solve the problem with too big helm charts, see also (https://wiki.onap.org/display/DW/OOM+Helm+%28un%29Deploy+plugins)

      deploy.sh contains a function called parse_yaml which parses a file called computed-overrides.yaml and stores the result in bash variables.

      parse_yaml accepts the following characters [a-zA-Z0-9_] to be able to store the parsed information in bash variables. deploy.sh loops through the created bash variables in order to see which sub charts that are enabled and should be installed.

      The used algorithms work fine for sub chart names that contain allowed characters [a-zA-Z0-9_] suitable for bash variables. However, there is one sub chart called sniro-emulator which contains “-” which is not an allowed character for bash variables. The parse-yaml function will not parse the information for the sniro-emulator sub-chart resulting in that it will not be installed.

      When all sub charts are disabled and the sniro-emulator sub chart is enabled, the sniro-emulator sub chart is not installed due to the problem described above. As a side effect, deploy.sh tries to install the sdnc sub chart (despite it is disabled) but it fails.

      A work around has been tested and will be suggested as a solution. The work around consists of the steps:
      Allow “-” as a character in parse_yaml
      Replace “-” with allowed characters, for example "_hyphen_" in parse_yaml
      Replace “-” with allowed characters, for example “_hyphen_” when looping through the bash variables in order to see which sub charts that are enabled and should be installed

      The parse_yaml algorithm originates from the following source (https://stackoverflow.com/questions/5014632/how-can-i-parse-a-yaml-file-from-a-linux-shell-script/21189044#21189044) and can be found here (https://gist.github.com/pkuczynski/8665367)

            jmartensson jmartensson
            jmartensson jmartensson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: