Sources

Sources define the git repos that contain the components of a kapp. Each source has the following definition and each kapp can have multiple sources:

  • id - an optional identifier. If not supplied, the basename of the URI will be used.
  • uri (required) - The location of the source. See below for the format

The format of the uri must be: <SSH git repo>>//<directory>#<branch>. Examples of this are:

  • git@github.com:helm/charts.git///#master - use master branch of the entire repo not a subdirectory
  • git@github.com:sugarkube/sugarkube.git//wordpress/site1/#wordpress-1.2.3 - the path wordpress/site1 at branch wordpress-1.2.3

Examples

# manifest1.yaml
kapps:
  - id: nginx-ingress
    state: present
    sources:
      - uri: git@github.com:sugarkube/kapps.git//incubator/nginx-ingress#nginx-ingress-0.1.0

Kapps typically only need a single source. However you may want to split a kapp into different parts so that e.g. an infrastructure team could manage and maintain the helm chart & Terraform for the kapp, but app teams could manage their own values for it. In that case you could declare multiple sources like this:

# manifest2.yaml
kapps:
  - id: tiller
    state: present
    sources:
        # implicit ID of `tiller`
      - uri: git@github.com:megacorp/kapps.git//tiller#tiller-1.1.0              
      - uri: git@github.com:megacorp/kapps.git//team1/tiller#1.2.3
        id: values        # explicit ID

When this kapp is created in a workspace (with the ws create command) both git repos will be (sparsely) checked out and symlinks used to place them as siblings in a containing directory so they can refer to each other.