forked from LaconicNetwork/kompose
Removes the TCP output on the Kubernetes / OpenShift artifacts
If TCP is passed in as the protocol, by default, we add TCP as the protocol within the Kubernetes or OpenShift artifacts. By default, TCP is already selected within Kubernetes and thus having the TCP output is redundant. This commit checks to see if TCP has already been selected, and if it has, ignores adding it to the list of ports. Closes https://github.com/kubernetes-incubator/kompose/issues/392
This commit is contained in:
Vendored
+3
-9
@@ -17,7 +17,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
@@ -47,13 +46,11 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"protocol": "TCP",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "4000",
|
||||
"protocol": "TCP",
|
||||
"port": 4000,
|
||||
"targetPort": 4000
|
||||
}
|
||||
@@ -89,8 +86,7 @@
|
||||
"image": "redis:3.0",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
@@ -129,12 +125,10 @@
|
||||
"image": "tuna/docker-counter23",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 5000
|
||||
},
|
||||
{
|
||||
"containerPort": 4000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 4000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
+2
-6
@@ -20,7 +20,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"protocol": "TCP",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
@@ -47,7 +46,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
@@ -86,8 +84,7 @@
|
||||
"image": "tuna/docker-counter23",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
@@ -151,8 +148,7 @@
|
||||
"image": "redis:3.0",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
Vendored
+3
-9
@@ -17,7 +17,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
@@ -47,13 +46,11 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"protocol": "TCP",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "4000",
|
||||
"protocol": "TCP",
|
||||
"port": 4000,
|
||||
"targetPort": 4000
|
||||
}
|
||||
@@ -89,8 +86,7 @@
|
||||
"image": "redis:3.0",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
@@ -129,12 +125,10 @@
|
||||
"image": "tuna/docker-counter23",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 5000
|
||||
},
|
||||
{
|
||||
"containerPort": 4000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 4000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
+2
-6
@@ -17,7 +17,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
@@ -47,7 +46,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"protocol": "TCP",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
@@ -83,8 +81,7 @@
|
||||
"image": "redis:3.0",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
@@ -123,8 +120,7 @@
|
||||
"image": "tuna/docker-counter23",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
Vendored
+3
-9
@@ -20,13 +20,11 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"protocol": "TCP",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "4000",
|
||||
"protocol": "TCP",
|
||||
"port": 4000,
|
||||
"targetPort": 4000
|
||||
}
|
||||
@@ -53,7 +51,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
@@ -120,12 +117,10 @@
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 5000
|
||||
},
|
||||
{
|
||||
"containerPort": 4000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 4000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
@@ -235,8 +230,7 @@
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
+2
-6
@@ -17,7 +17,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
@@ -47,7 +46,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"protocol": "TCP",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
@@ -111,8 +109,7 @@
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
@@ -203,8 +200,7 @@
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
Vendored
+3
-9
@@ -17,7 +17,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
@@ -47,13 +46,11 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"protocol": "TCP",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "4000",
|
||||
"protocol": "TCP",
|
||||
"port": 4000,
|
||||
"targetPort": 4000
|
||||
}
|
||||
@@ -117,8 +114,7 @@
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
@@ -209,12 +205,10 @@
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 5000
|
||||
},
|
||||
{
|
||||
"containerPort": 4000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 4000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
+2
-6
@@ -17,7 +17,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
@@ -47,7 +46,6 @@
|
||||
"ports": [
|
||||
{
|
||||
"name": "5000",
|
||||
"protocol": "TCP",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
}
|
||||
@@ -111,8 +109,7 @@
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
@@ -203,8 +200,7 @@
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
"protocol": "TCP"
|
||||
"containerPort": 5000
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
Reference in New Issue
Block a user