See App Spec for details.
apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
name: simple-app
spec:
serviceAccountName: default
fetch:
- git:
url: https://github.com/k14s/k8s-simple-app-example
ref: origin/develop
subPath: config-step-2-template
template:
- ytt: {}
deploy:
- kapp: {}Fetches set of files from various sources. Multiple sources can be used (for example, helmChart and inline).
inline: specify one or more files within resourceimage: download Docker image from registryhttp: download file at URLgit: clone Git repositoryhelmChart: fetch Helm chart from Helm repository
Pull helm chart via helm fetch
spec:
fetch:
- helmChart:
name: stable/concourse
# ...Pull helm chart via git
spec:
fetch:
- git:
url: https://github.com/bitnami/charts
ref: origin/master
subPath: bitnami/nginx
# ...Note, following sections describes contents of Secret resources referenced by various fetch strategies. kapp-controller does not check for type value of Secret resource.
Allowed secret keys:
ssh-privatekey: PEM-encoded key that will be provided to SSHssh-knownhosts: Optional, set of known hosts allowed to connect (if not specified, all hosts are allowed)usernameandpassword: Alternative to private key authentication
Allowed secret keys:
usernameandpassword
Allowed secret keys:
usernameandpassword
Transform set of files.
helmTemplate: useshelm templatecommand to render chartytt: uses ytt to rended templateskbld: uses kbld to resolve image URLs to include digestskustomize: (not implemented yet) uses kustomize to render configurationjsonnnet: (not implemented yet) renders jsonnet filessops: uses sops to decrypt secrets. More details. Available in v0.11.0+.
Template source via helm template
spec:
# ...
template:
- helmTemplate:
valuesFrom:
- secretRef:
name: redis-values
# ...Template source via helm template and then modify via ytt overlay
spec:
# ...
template:
- helmTemplate: {}
- ytt:
ignoreUnknownComments: true
inline:
paths:
remove-lb.yml: |
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind":"Service","metadata":{"name":"nginx"}})
---
spec:
type: ClusterIP
#@overlay/remove
externalTrafficPolicy:
# ...Deploys resources.
kapp: uses kapp to deploy resources
spec:
# ...
deploy:
- kapp: {}Next: App CRD spec