Support hostname and domainname

This commit is contained in:
Hang Yan
2018-03-31 12:00:37 +08:00
parent b141064ef4
commit 88b8e316b9
14 changed files with 271 additions and 8 deletions
+6
View File
@@ -0,0 +1,6 @@
version: '3'
services:
dns:
image: phensley/docker-dns
hostname: affy
domainname: affy.com
+6
View File
@@ -0,0 +1,6 @@
version: 2
services:
dns:
image: phensley/docker-dns
hostname: affy
domainname: affy.com
+78
View File
@@ -0,0 +1,78 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "dns",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "dns"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"ports": [
{
"name": "headless",
"port": 55555,
"targetPort": 0
}
],
"selector": {
"io.kompose.service": "dns"
},
"clusterIP": "None"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "dns",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "dns"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"replicas": 1,
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "dns"
}
},
"spec": {
"containers": [
{
"name": "dns",
"image": "phensley/docker-dns",
"resources": {}
}
],
"restartPolicy": "Always",
"hostname": "affy",
"subdomain": "affy.com"
}
},
"strategy": {}
},
"status": {}
}
]
}
+130
View File
@@ -0,0 +1,130 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "dns",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "dns"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"ports": [
{
"name": "headless",
"port": 55555,
"targetPort": 0
}
],
"selector": {
"io.kompose.service": "dns"
},
"clusterIP": "None"
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "dns",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "dns"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.version": "%VERSION%"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"dns"
],
"from": {
"kind": "ImageStreamTag",
"name": "dns:latest"
}
}
}
],
"replicas": 1,
"test": false,
"selector": {
"io.kompose.service": "dns"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"io.kompose.service": "dns"
}
},
"spec": {
"containers": [
{
"name": "dns",
"image": " ",
"resources": {}
}
],
"restartPolicy": "Always",
"hostname": "affy",
"subdomain": "affy.com"
}
}
},
"status": {}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "dns",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "dns"
}
},
"spec": {
"tags": [
{
"name": "latest",
"annotations": null,
"from": {
"kind": "DockerImage",
"name": "phensley/docker-dns"
},
"generation": null,
"importPolicy": {}
}
]
},
"status": {
"dockerImageRepository": ""
}
}
]
}
+3 -1
View File
@@ -223,7 +223,9 @@
"tty": true
}
],
"restartPolicy": "OnFailure"
"restartPolicy": "OnFailure",
"hostname": "foo",
"subdomain": "foo.com"
},
"status": {}
},
+3 -1
View File
@@ -223,7 +223,9 @@
"tty": true
}
],
"restartPolicy": "OnFailure"
"restartPolicy": "OnFailure",
"hostname": "foo",
"subdomain": "foo.com"
},
"status": {}
},