-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Local and relative dependencies are now relative to their operators (#…
…1709) Summary: Previously the location of a dependency operator was always relative to the caller working director (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 with an operator structure like this: ``` . ├── child │ └── operator.yaml │ └── parent └── operator.yaml ``` child operator now has to be referenced like: ``` - name: child kind: KudoOperator spec: package: "../child" ``` *Note:* This fix does not apply to tarballs as the tarball reader does not expect any dependency operators' files/folders. Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
- Loading branch information
Aleksey Dukhovniy
authored
Oct 15, 2020
1 parent
7756a5f
commit c237347
Showing
15 changed files
with
215 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...l/resources/dependencies/testdata/operator-with-dependencies/child-operator/operator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
name: "child" | ||
operatorVersion: "0.0.1" | ||
kubernetesVersion: 1.15.0 | ||
maintainers: | ||
- name: zen-dog | ||
email: <your@email.com> | ||
url: https://kudo.dev | ||
tasks: | ||
- name: deploy | ||
kind: Dummy | ||
spec: | ||
done: true | ||
wantErr: false | ||
|
||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: main | ||
strategy: parallel | ||
steps: | ||
- name: deploy | ||
tasks: | ||
- deploy |
6 changes: 6 additions & 0 deletions
6
...ctl/resources/dependencies/testdata/operator-with-dependencies/child-operator/params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
parameters: | ||
- name: deploy | ||
description: Triggers the deploy plan | ||
default: 1 | ||
trigger: deploy |
25 changes: 25 additions & 0 deletions
25
.../resources/dependencies/testdata/operator-with-dependencies/parent-operator/operator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
name: "parent" | ||
operatorVersion: "0.1.0" | ||
kubernetesVersion: 1.15.0 | ||
maintainers: | ||
- name: zen-dog | ||
email: <your@email.com> | ||
url: https://kudo.dev | ||
tasks: | ||
- name: deploy-child | ||
kind: KudoOperator | ||
spec: | ||
package: "../child-operator" | ||
operatorVersion: 0.0.1 | ||
|
||
plans: | ||
deploy: | ||
strategy: serial | ||
phases: | ||
- name: main | ||
strategy: parallel | ||
steps: | ||
- name: deploy | ||
tasks: | ||
- deploy-child |
6 changes: 6 additions & 0 deletions
6
...tl/resources/dependencies/testdata/operator-with-dependencies/parent-operator/params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kudo.dev/v1beta1 | ||
parameters: | ||
- name: deploy | ||
description: Triggers the deploy plan | ||
default: 1 | ||
trigger: deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.