Merge pull request #1955 from jvitor83/feature/no-interpolate

Add no-interpolate feature option to the CLI
This commit is contained in:
Kubernetes Prow Robot
2025-01-09 06:20:31 -08:00
committed by GitHub
8 changed files with 69 additions and 4 deletions
+6
View File
@@ -276,6 +276,12 @@ k8s_output="$KOMPOSE_ROOT/script/test/fixtures/compose-env-interpolation/output-
convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
convert::expect_success "$os_cmd" "$os_output" || exit 1
# Test support for compose env without interpolation
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/compose-env-no-interpolation/compose.yaml convert --stdout --no-interpolate --with-kompose-annotation=false"
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/compose-env-no-interpolation/output-k8s.yaml"
convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1
convert::expect_success "$os_cmd" "$os_output" || exit 1
# Test support for subpath volume
k8s_cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/vols-subpath/compose.yaml convert --stdout --with-kompose-annotation=false"
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/vols-subpath/output-k8s.yaml"
@@ -0,0 +1,10 @@
version: '3.8'
services:
foo:
image: ${DOCKER_REGISTRY-}foo:${IMAGE_TAG:-latest}
build: .
environment:
- VERSION=${IMAGE_TAG:-latest}
ports:
- 80:80
@@ -0,0 +1,43 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: foo
name: foo
spec:
ports:
- name: "80"
port: 80
targetPort: 80
selector:
io.kompose.service: foo
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: foo
name: foo
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: foo
template:
metadata:
labels:
io.kompose.service: foo
spec:
containers:
- env:
- name: VERSION
value: ${IMAGE_TAG:-latest}
image: ${DOCKER_REGISTRY-}foo:${IMAGE_TAG:-latest}
name: foo
ports:
- containerPort: 80
protocol: TCP
restartPolicy: Always