New to Kubepack? Please start here.

Scenario-5

This docs trying to explain the behavior of Pack


This section explain test-5.

If you look into this test’s dependency-list.yaml file.

$ cat dependency-list.yaml

items:
- package: github.com/kubepack/kube-a
  branch: test-5
- package: github.com/kubepack/kube-b
  branch: test-5

Here, test-5 depends on two repositories.

  1. branch test-5 of kube-a.
  2. branch test-5 of kube-b.

Both of the above repository contains the patch of repository kube-c’s branch test-5 in same file (nginx-deployment.yaml).

See the image.

alt text

You can see the both patch below

# kube-a contains this patch of kube-c

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: nginx-c
spec:
  template:
    metadata:
      labels:
        app: nginx1

# kube-b contains this patch of kube-c

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: nginx-c
spec:
  replicas: 2

When run pack dep -f . command, following things happen.

  1. Get all the dependencies, reading dependency-list.yaml file.
  2. As, kube-a and kube-b both contains patch of repository kube-c, kube-c in manifests/vendor folder is combination of both patches and original file.

Next Steps

  • Want to publish apps using Kubepack? Please visit here.
  • Want to consume apps published using Kubepack? Please visit here.
  • To learn about dependency-list.yaml file, please visit here.
  • Learn more about pack cli from here.

Subscribe to our free technical newsletter!

Join thousands of subscribers and stay up-to-date on AppsCode.