Created
November 12, 2021 00:10
-
-
Save cari-lynn/b8c78d0ee82f7b5fc7e6208a24f5a380 to your computer and use it in GitHub Desktop.
Overlay replace modify values with lambda
This file contains hidden or 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
spec: | |
replicas: 1 | |
resources: | |
limits: | |
cpu: 400m | |
memory: 600Mi | |
requests: | |
cpu: 400m | |
memory: 600Mi | |
#@ load("@ytt:overlay","overlay") | |
#@overlay/match by=overlay.all | |
--- | |
spec: | |
replicas: 1 | |
resources: | |
limits: | |
cpu: 400m | |
memory: 600Mi | |
requests: | |
#@overlay/replace via=lambda original, _: str(int(original[:-1]) * 0.5) + "m" | |
cpu: 400m | |
memory: 600Mi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment