Skip to content

Instantly share code, notes, and snippets.

@100mik
Last active April 12, 2023 22:04
Show Gist options
  • Save 100mik/e260805f46b0610aab53d6e5b15b49e8 to your computer and use it in GitHub Desktop.
Save 100mik/e260805f46b0610aab53d6e5b15b49e8 to your computer and use it in GitHub Desktop.
Multiple exports kctrl
# scroll down to the export section
---
apiVersion: kctrl.carvel.dev/v1alpha1
kind: PackageBuild
metadata:
name: first.package.tanzu.vmware.com
spec:
release:
- resource: {}
template:
spec:
app:
spec:
deploy:
- kapp: {}
template:
- ytt:
paths:
- carvel/...
- kbld:
paths:
- kbld-config.yaml
- config/...
export:
- imgpkgBundle:
image: prod.registry.com/first
useKbldImagesLock: true
includePaths:
- config/...
targets:
- "all"
- "prod"
- imgpkgBundle:
image: #@ data.values.build.destination + "/first-package-imgpkg"
useKbldImagesLock: true
includePaths:
- config/...
targets:
- "all"
- "staging"
# Release to both registries
kctrl package release --version 1.0.0 --target all
# Release to dev
kctrl package release --version 1.0.0 --target dev
# Release to prod
kctrl package release --version 1.0.0 --target prod
# I do not think we would need this, but we could also support multiple targets
kctrl package release --version 1.0.0 --targets "prod,dev"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment