Skip to content

Commit

Permalink
feat: add sdl parser
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <troian.ap@gmail.com>
  • Loading branch information
troian committed May 23, 2024
1 parent 594933f commit 307d4c0
Show file tree
Hide file tree
Showing 85 changed files with 9,890 additions and 0 deletions.
45 changes: 45 additions & 0 deletions go/sdl/_testdata/deployment-svc-mismatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
version: "2.0"
services:
web:
image: nginx
expose:
- port: 80
accept:
- ahostname.com
to:
- global: true
- port: 12345
to:
- global: true
proto: udp
profiles:
compute:
web:
resources:
cpu:
units: "100m"
memory:
size: "128Mi"
storage:
size: "1Gi"
placement:
westcoast:
attributes:
region: us-west
signedBy:
anyOf:
- 1
- 2
allOf:
- 3
- 4
pricing:
web:
denom: uakt
amount: 50
deployment:
webapp:
westcoast:
profile: web
count: 2
58 changes: 58 additions & 0 deletions go/sdl/_testdata/legacy/deployment-v2-c2c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
version: "2.0"

services:
web:
image: anapsix/webdis
env:
- REDIS_HOST=redis-server
expose:
- port: 7379
as: 80
to:
- global: true
accept:
- webdistest.localhost

redis-server:
image: redis:rc-alpine3.12
expose:
- port: 6379

profiles:
compute:
web:
resources:
cpu:
units: 0.1
memory:
size: 16Mi
storage:
size: 128Mi
redis-server:
resources:
cpu:
units: 0.1
memory:
size: 64Mi
storage:
size: 128Mi
placement:
global:
pricing:
web:
denom: uakt
amount: 9000
redis-server:
denom: uakt
amount: 9000

deployment:
web:
global:
profile: web
count: 1
redis-server:
global:
profile: redis-server
count: 1
58 changes: 58 additions & 0 deletions go/sdl/_testdata/legacy/deployment-v2-escrow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
version: "2.0"

services:
web:
image: anapsix/webdis
env:
- REDIS_HOST=redis-server
expose:
- port: 7379
as: 80
to:
- global: true
accept:
- webdistest.localhost

redis-server:
image: redis:rc-alpine3.12
expose:
- port: 6379

profiles:
compute:
web:
resources:
cpu:
units: 0.1
memory:
size: 16Mi
storage:
size: 128Mi
redis-server:
resources:
cpu:
units: 0.1
memory:
size: 64Mi
storage:
size: 128Mi
placement:
global:
pricing:
web:
denom: uakt
amount: 10000000
redis-server:
denom: uakt
amount: 10000000

deployment:
web:
global:
profile: web
count: 1
redis-server:
global:
profile: redis-server
count: 1
41 changes: 41 additions & 0 deletions go/sdl/_testdata/legacy/deployment-v2-ip-endpoint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
version: "2.0"

services:
web:
image: ghcr.io/akash-network/demo-app
expose:
- port: 80
to:
- global: true
ip: "meow"
accept:
- test.localhost

profiles:
compute:
web:
resources:
cpu:
units: "0.01"
memory:
size: "128Mi"
storage:
size: "512Mi"

placement:
global:
pricing:
web:
denom: uakt
amount: 10

deployment:
web:
global:
profile: web
count: 1

endpoints:
meow:
kind: "ip"
37 changes: 37 additions & 0 deletions go/sdl/_testdata/legacy/deployment-v2-migrate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
version: "2.0"

services:
web:
image: ghcr.io/akash-network/demo-app
expose:
- port: 80
to:
- global: true
accept:
- leaveme.com
- migrateme.com

profiles:
compute:
web:
resources:
cpu:
units: "0.01"
memory:
size: "128Mi"
storage:
size: "512Mi"

placement:
global:
pricing:
web:
denom: uakt
amount: 10

deployment:
web:
global:
profile: web
count: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
version: "2.0"

services:
web:
image: ghcr.io/akash-network/demo-app
expose:
- port: 80
to:
- global: true
ip: "meow"
accept:
- test.localhost
anotherweb:
image: ghcr.io/akash-network/demo-app
expose:
- port: 80
to:
- global: true
ip: "kittens"
accept:
- extratest.localhost

profiles:
compute:
web:
resources:
cpu:
units: "0.01"
memory:
size: "128Mi"
storage:
size: "512Mi"
bob:
resources:
cpu:
units: "0.13"
memory:
size: "256Mi"
storage:
size: "99Mi"

placement:
global:
pricing:
web:
denom: uakt
amount: 10
bob:
pricing:
bob:
denom: uakt
amount: 99

deployment:
web:
global:
profile: web
count: 1
anotherweb:
bob:
profile: bob
count: 3

endpoints:
meow:
kind: "ip"
kittens:
kind: "ip"
56 changes: 56 additions & 0 deletions go/sdl/_testdata/legacy/deployment-v2-multi-ip-endpoint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
version: "2.0"

services:
web:
image: ghcr.io/akash-network/demo-app
expose:
- port: 80
to:
- global: true
ip: "meow"
accept:
- test.localhost
anotherweb:
image: ghcr.io/akash-network/demo-app
expose:
- port: 80
to:
- global: true
ip: "kittens"
accept:
- extratest.localhost

profiles:
compute:
web:
resources:
cpu:
units: "0.01"
memory:
size: "128Mi"
storage:
size: "512Mi"

placement:
global:
pricing:
web:
denom: uakt
amount: 10

deployment:
web:
global:
profile: web
count: 1
anotherweb:
global:
profile: web
count: 3

endpoints:
meow:
kind: "ip"
kittens:
kind: "ip"
Loading

0 comments on commit 307d4c0

Please sign in to comment.