kudobuilder / kudo

Kubernetes Universal Declarative Operator (KUDO)
https://kudo.dev
Apache License 2.0
1.18k stars 103 forks source link

Local and relative dependencies are now relative to their operators #1709

Closed zen-dog closed 4 years ago

zen-dog commented 4 years ago

Summary: Previously the location of a dependency operator was always relative to the caller working directory (the directory of the kudo install ... call). This made installing and testing operators with dependencies a brittle process as the working directory has to be set accordingly. This PR fixes this for local operators in directories so that with an operator structure like this:

.
├── child
│   └── operator.yaml
│
└── parent
    └── operator.yaml

child operator now has to be referenced as shown below, no matter where the callers working directory is:

  - name: child
    kind: KudoOperator
    spec:
      package: "../child"

Note: This fix does not apply to tarballs as the tarball reader does not expect any dependency operator's files/folders. As for right now, KUDO does not support packaging/extracting operators with dependencies.

Fixes #1701 (but only for operators in local directories)

Signed-off-by: Aleksey Dukhovniy alex.dukhovniy@googlemail.com