forked from LaconicNetwork/kompose
Fix environment variables interpolation (#1524)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
version: '3.5'
|
||||
|
||||
services:
|
||||
myservice:
|
||||
image: alpine
|
||||
environment:
|
||||
PROTOCOL: 'https'
|
||||
DOMAIN: 'google.com'
|
||||
command:
|
||||
[
|
||||
'curl',
|
||||
'$PROTOCOL://$DOMAIN/',
|
||||
]
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "apps/v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "myservice",
|
||||
"image": "alpine",
|
||||
"args": [
|
||||
"curl",
|
||||
"$(PROTOCOL)://$(DOMAIN)/"
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DOMAIN",
|
||||
"value": "google.com"
|
||||
},
|
||||
{
|
||||
"name": "PROTOCOL",
|
||||
"value": "https"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"myservice"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "myservice:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "myservice"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "myservice",
|
||||
"image": " ",
|
||||
"args": [
|
||||
"curl",
|
||||
"$(PROTOCOL)://$(DOMAIN)/"
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DOMAIN",
|
||||
"value": "google.com"
|
||||
},
|
||||
{
|
||||
"name": "PROTOCOL",
|
||||
"value": "https"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"latestVersion": 0,
|
||||
"observedGeneration": 0,
|
||||
"replicas": 0,
|
||||
"updatedReplicas": 0,
|
||||
"availableReplicas": 0,
|
||||
"unavailableReplicas": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"lookupPolicy": {
|
||||
"local": false
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "alpine"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {},
|
||||
"referencePolicy": {
|
||||
"type": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user