forked from LaconicNetwork/kompose
feat(deploy): support ephemeral storage requests limits labels
This commit is contained in:
@@ -390,4 +390,9 @@ convert::expect_success "$os_cmd" "$os_output" || exit 1
|
||||
# Test label in compose.yaml appears in the output annotation
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/label/compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/label/output-k8s.yaml"
|
||||
convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
|
||||
|
||||
# Test deploy.labels in compose.yaml appears in the output
|
||||
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/deploy/labels/compose.yaml convert --stdout --with-kompose-annotation=false"
|
||||
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/deploy/labels/output-k8s.yaml"
|
||||
convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
|
||||
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
app:
|
||||
image: node:18-alpine
|
||||
ports:
|
||||
- 3000:3000
|
||||
deploy:
|
||||
labels:
|
||||
requests.ephemeral-storage: 1Gi
|
||||
limits.ephemeral-storage: 1Gi
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
io.kompose.service: app
|
||||
name: app
|
||||
spec:
|
||||
ports:
|
||||
- name: "3000"
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
selector:
|
||||
io.kompose.service: app
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
io.kompose.service: app
|
||||
limits.ephemeral-storage: 1Gi
|
||||
requests.ephemeral-storage: 1Gi
|
||||
name: app
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
io.kompose.service: app
|
||||
spec:
|
||||
containers:
|
||||
- image: node:18-alpine
|
||||
name: app
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
ephemeral-storage: 1Gi
|
||||
requests:
|
||||
ephemeral-storage: 1Gi
|
||||
restartPolicy: Always
|
||||
|
||||
Reference in New Issue
Block a user