Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-470

Kogito CLI cannot find operator template files when trying to install it into the namespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.6.0
    • 0.5.0
    • Operator
    • Linux amd64 cli (Fedora 30)

    • 2019 Week 41-43 (from Okt 7)

      I ran into problems with 'new-project' and 'use-project' when it is trying to install the operator if it does not exist into the project.

      Here is the error:
      Error while deploying Kogito Operator via template yaml files: Error reading file crds/app_v1alpha1_kogitoapp_crd.yaml: stat /home/tradisso/projects/kogito/deploy/crds/app_v1alpha1_kogitoapp_crd.yaml: no such file or directory
      It seems the deployment files are not packed into the binary.

      Digging into the project, it is a bug in the 'hack/go-build-cli.sh' script.
      Indeed, when running the command `packr2 -v` at the root of the project, I get:

      _*parser.Parser#NewFromRoots options="

      {\"IgnoreImports\":false,\"Ignores\":null}

      " roots="\"/home/tradisso/projects/kogito/kogito-cloud-operator\"]"_
      *parser.Parser#NewFromRoots walking=/home/tradisso/projects/kogito/kogito-cloud-operator
      *parser.Parser#NewFromRoots found prospects=0

      So no file will be packed from there.

      I needed to go to 'cmd/kogito' folder and run the `packr2 -v` command there to be sure the files are scanned.
      I think we should change the shell script (go-build-cli.sh) to run the `packr2 -v` and `packr2 clean -v` commands into the 'cmd/kogito' folder.

      What do you think ?

              tradisso@redhat.com Tristan Radisson (Inactive)
              tradisso@redhat.com Tristan Radisson (Inactive)
              Karel Suta Karel Suta
              Karel Suta Karel Suta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: