New to Kubepack? Please start here.
Scenario-10
This docs trying to explain the behavior of Pack
This section explain how jsonnet
appears Pack,
more complex situation than scenario-9
Above diagram shows the dependency chain. Here,
test-10
depend on repositorykube-a
(branchtest-10
).kube-a
depends on repositorykube-b
(branchtest-10
). Also, contains a jsonnet file.kube-b
depends on repositorykube-c
(branchtest-10
). Also, contains a patch of yaml file fromkube-a
repository. This yaml is generated from jsonnet file.kube-c
depend on nothing.
See dependency-list.yaml
file below:
$ cat dependency-list.yaml
items:
- package: github.com/kubepack/kube-a
branch: test-10
Get Dependencies
$ pack dep -f .
command gets all the dependencies and place it under manifests/vendor
folder.
In this scenario, following things happen:
kube-b
repository contains patch of jsonnet file’s yaml, sokube-c
’s jsonnet will be yaml. This yaml is combination of jsonnet’s yaml and this yaml’s patch which exists in kube-b repository.kube-a
contains a jsonnet file. Inmanifests/vendor
folder, thisjsonnet
file will be converted into yaml file.
Now, $ pack up -f .
command will generate the final output in manifests/output
folder.
$ tree manifests/output/
manifests/output/
└── github.com
└── kubepack
├── kube-a
│ └── manifests
│ └── app
│ ├── foocorp-shard.jsonnet
│ ├── nginx-deployment.yaml
│ └── nginx-dm.yaml
├── kube-b
│ └── manifests
│ └── app
│ ├── nginx-deployment.yaml
│ └── nginx-dm.yaml
└── kube-c
└── manifests
└── app
├── foocorp-shard.jsonnet
├── nginx-deployment.yaml
└── nginx-dm.yaml
11 directories, 8 files