Created
April 12, 2024 16:10
-
-
Save x95castle1/a8f3392c5432e601b2d018be4c1d4576 to your computer and use it in GitHub Desktop.
Alter a Package to add inline overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: data.packaging.carvel.dev/v1alpha1 | |
kind: Package | |
metadata: | |
name: tap.tanzu.vmware.com.1.8.1 | |
namespace: tap-install | |
spec: | |
template: | |
spec: | |
deploy: | |
- kapp: {} | |
fetch: | |
- imgpkgBundle: | |
image: cxscssa.azurecr.io/tap-1-8-1/tap-packages@sha256:953ca5b86a46eb52311551d7bc9948b8a5cd38ffd599e7493286c0ce2a563f23 | |
template: | |
- ytt: | |
paths: | |
- config/ | |
- kbld: | |
paths: | |
- '-' | |
- .imgpkg/images.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:overlay", "overlay") | |
#@ def with_name(vlan): | |
ytt: | |
#@overlay/match missing_ok=True | |
inline: | |
pathsFrom: | |
- secretRef: | |
name: tap-pkg-overlay-secret | |
#@ end | |
#@overlay/match by=overlay.subset({"kind":"Package","metadata":{"namespace":"tap-install"}}),expects="1+" | |
--- | |
spec: | |
template: | |
spec: | |
template: | |
#@overlay/match by=lambda idx, left, right: "ytt" in left, expects="1+" | |
#@overlay/replace via=lambda left, right: overlay.apply(left, with_name(left)) | |
- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment