Network Key Translation Feature and test cases (#1195)
This commit is contained in:
+29
@@ -53,6 +53,7 @@
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.network/helloworld-network": "true",
|
||||
"io.kompose.service": "helloworld"
|
||||
},
|
||||
"annotations": {
|
||||
@@ -79,6 +80,34 @@
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "helloworld-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/helloworld-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/helloworld-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.network/other-network": "true",
|
||||
"io.kompose.network/other-other-network": "true",
|
||||
"io.kompose.network/some-network": "true",
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
@@ -344,6 +347,90 @@
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "other-other-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/other-other-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/other-other-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "some-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/some-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/some-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "other-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/other-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/other-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.network/other-network": "true",
|
||||
"io.kompose.network/other-other-network": "true",
|
||||
"io.kompose.network/some-network": "true",
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
@@ -503,6 +506,90 @@
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "other-other-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/other-other-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/other-other-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "some-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/some-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/some-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "NetworkPolicy",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "other-network",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/other-network": "true"
|
||||
}
|
||||
},
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"podSelector": {
|
||||
"matchLabels": {
|
||||
"io.kompose.network/other-network": "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -153,6 +153,9 @@
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.network/other-network": "true",
|
||||
"io.kompose.network/other-other-network": "true",
|
||||
"io.kompose.network/some-network": "true",
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user