Skip to content

Commit a74fb44

Browse files
committed
fix: codelab schema examples
Signed-off-by: peefy <[email protected]>
1 parent 9764537 commit a74fb44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/codelab/schema/my_config.k

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import regex
22

33
schema Deployment[priority]:
44
name: str
5-
cpu: int = _cpu
6-
memory: int = _cpu * 2
75
volumes?: [Volume]
86
image: str
97
service?: Service
@@ -20,6 +18,9 @@ schema Deployment[priority]:
2018
else:
2119
_cpu = 2048
2220

21+
cpu: int = _cpu
22+
memory: int = _cpu * 2
23+
2324
check:
2425
multiplyof(cpu, 256), "cpu must be a multiplier of 256"
2526
regex.match(image, "^[a-zA-Z]+:\d+\.\d+\.\d+$"), "image name should be like 'nginx:1.14.2'"

0 commit comments

Comments
 (0)