forked from LaconicNetwork/kompose
195 lines
4.3 KiB
JSON
195 lines
4.3 KiB
JSON
{
|
|
"kind": "List",
|
|
"apiVersion": "v1",
|
|
"metadata": {},
|
|
"items": [
|
|
{
|
|
"kind": "Service",
|
|
"apiVersion": "v1",
|
|
"metadata": {
|
|
"name": "redis",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "redis"
|
|
},
|
|
"annotations": {
|
|
"kompose.service.type": "headless"
|
|
}
|
|
},
|
|
"spec": {
|
|
"ports": [
|
|
{
|
|
"name": "headless",
|
|
"port": 55555,
|
|
"targetPort": 0
|
|
}
|
|
],
|
|
"selector": {
|
|
"io.kompose.service": "redis"
|
|
},
|
|
"clusterIP": "None"
|
|
},
|
|
"status": {
|
|
"loadBalancer": {}
|
|
}
|
|
},
|
|
{
|
|
"kind": "Deployment",
|
|
"apiVersion": "apps/v1",
|
|
"metadata": {
|
|
"name": "foo",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "foo"
|
|
}
|
|
},
|
|
"spec": {
|
|
"replicas": 1,
|
|
"selector": {
|
|
"matchLabels": {
|
|
"io.kompose.service": "foo"
|
|
}
|
|
},
|
|
"template": {
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.network/app-network": "true",
|
|
"io.kompose.network/web-network": "true",
|
|
"io.kompose.service": "foo"
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"name": "foo",
|
|
"image": "foo:latest",
|
|
"args": [
|
|
"sh",
|
|
"-c",
|
|
"echo Hello Foo"
|
|
],
|
|
"resources": {}
|
|
}
|
|
],
|
|
"restartPolicy": "Always"
|
|
}
|
|
},
|
|
"strategy": {}
|
|
},
|
|
"status": {}
|
|
},
|
|
{
|
|
"kind": "NetworkPolicy",
|
|
"apiVersion": "networking.k8s.io/v1",
|
|
"metadata": {
|
|
"name": "app-network",
|
|
"creationTimestamp": null
|
|
},
|
|
"spec": {
|
|
"podSelector": {
|
|
"matchLabels": {
|
|
"io.kompose.network/app-network": "true"
|
|
}
|
|
},
|
|
"ingress": [
|
|
{
|
|
"from": [
|
|
{
|
|
"podSelector": {
|
|
"matchLabels": {
|
|
"io.kompose.network/app-network": "true"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"kind": "NetworkPolicy",
|
|
"apiVersion": "networking.k8s.io/v1",
|
|
"metadata": {
|
|
"name": "web-network",
|
|
"creationTimestamp": null
|
|
},
|
|
"spec": {
|
|
"podSelector": {
|
|
"matchLabels": {
|
|
"io.kompose.network/web-network": "true"
|
|
}
|
|
},
|
|
"ingress": [
|
|
{
|
|
"from": [
|
|
{
|
|
"podSelector": {
|
|
"matchLabels": {
|
|
"io.kompose.network/web-network": "true"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"kind": "Deployment",
|
|
"apiVersion": "apps/v1",
|
|
"metadata": {
|
|
"name": "redis",
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "redis"
|
|
},
|
|
"annotations": {
|
|
"kompose.service.type": "headless"
|
|
}
|
|
},
|
|
"spec": {
|
|
"replicas": 1,
|
|
"selector": {
|
|
"matchLabels": {
|
|
"io.kompose.service": "redis"
|
|
}
|
|
},
|
|
"template": {
|
|
"metadata": {
|
|
"creationTimestamp": null,
|
|
"labels": {
|
|
"io.kompose.service": "redis"
|
|
},
|
|
"annotations": {
|
|
"kompose.service.type": "headless"
|
|
}
|
|
},
|
|
"spec": {
|
|
"containers": [
|
|
{
|
|
"name": "redis",
|
|
"image": "redis",
|
|
"resources": {},
|
|
"livenessProbe": {
|
|
"exec": {
|
|
"command": [
|
|
"echo \"hello world\""
|
|
]
|
|
},
|
|
"timeoutSeconds": 1,
|
|
"periodSeconds": 10,
|
|
"failureThreshold": 5
|
|
}
|
|
}
|
|
],
|
|
"restartPolicy": "Always"
|
|
}
|
|
},
|
|
"strategy": {}
|
|
},
|
|
"status": {}
|
|
}
|
|
]
|
|
}
|