Skip to content

Commit 43a99c1

Browse files
authored
Merge pull request #360 from stefanprodan/bundle-local-mod-docs
Add docs for referencing local modules in bundles
2 parents ba586bd + 245f131 commit 43a99c1

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Diff for: docs/bundle.md

+44
Original file line numberDiff line numberDiff line change
@@ -537,3 +537,47 @@ Example:
537537
```shell
538538
cue fmt bundle.cue
539539
```
540+
541+
### Referencing local modules
542+
543+
When developing and testing Timoni Modules, you can reference them
544+
from a Bundle file using relative local paths.
545+
546+
Example repo structure:
547+
548+
```shell
549+
├── modules
550+
│   ├── app1
551+
│   └── app2
552+
└── bundles
553+
└── apps-test.cue
554+
```
555+
556+
Example Bundle file:
557+
558+
```cue
559+
bundle: {
560+
apiVersion: "v1alpha1"
561+
name: "apps-test"
562+
instances: {
563+
"app1": {
564+
module: url: "file://../modules/app1"
565+
namespace: "app1"
566+
values: {...}
567+
}
568+
"app2": {
569+
module: url: "file://../modules/app2"
570+
namespace: "app2"
571+
values: {...}
572+
}
573+
}
574+
}
575+
```
576+
577+
When using local paths, the `url` field must be in the format `file://path/to/module`
578+
and the module path is computed relatively to the path of the bundle file location.
579+
580+
Note that when using local modules, the module's version and digest are ignored, as these
581+
are only relevant when pulling modules from a container registry.
582+
All instances created from modules referenced with local paths have
583+
the module version set to `0.0.0-devel`.

0 commit comments

Comments
 (0)