Fix annotations missing for ingress (#1248)

* Fix annotations missing for ingress
This commit is contained in:
Hang Yan 2020-03-31 20:47:53 +08:00 committed by GitHub
parent dbbdfc0970
commit 88dde83044
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 40 additions and 2 deletions

View File

@ -453,8 +453,9 @@ func (k *Kubernetes) initIngress(name string, service kobject.ServiceConfig, por
APIVersion: "extensions/v1beta1",
},
ObjectMeta: api.ObjectMeta{
Name: name,
Labels: transformer.ConfigLabels(name),
Name: name,
Labels: transformer.ConfigLabels(name),
Annotations: transformer.ConfigAnnotations(service),
},
Spec: extensions.IngressSpec{
Rules: make([]extensions.IngressRule, len(hosts)),

View File

@ -192,6 +192,11 @@
"creationTimestamp": null,
"labels": {
"io.kompose.service": "web"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.service.expose": "batman.example.com",
"kompose.version": "%VERSION%"
}
},
"spec": {

View File

@ -187,6 +187,12 @@
"creationTimestamp": null,
"labels": {
"io.kompose.service": "web"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.service.expose": "batman.example.com",
"kompose.service.expose.tls-secret": "test-secret",
"kompose.version": "%VERSION%"
}
},
"spec": {

View File

@ -184,6 +184,11 @@
"creationTimestamp": null,
"labels": {
"io.kompose.service": "web"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.service.expose": "batman.example.com",
"kompose.version": "%VERSION%"
}
},
"spec": {

View File

@ -187,6 +187,12 @@
"creationTimestamp": null,
"labels": {
"io.kompose.service": "web"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.service.expose": "batman.example.com,batwoman.example.com",
"kompose.service.expose.tls-secret": "test-secret",
"kompose.version": "%VERSION%"
}
},
"spec": {

View File

@ -184,6 +184,11 @@
"creationTimestamp": null,
"labels": {
"io.kompose.service": "web"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.service.expose": " batman.example.com/home ,, batwoman.example.com ",
"kompose.version": "%VERSION%"
}
},
"spec": {

View File

@ -192,6 +192,11 @@
"creationTimestamp": null,
"labels": {
"io.kompose.service": "web"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.service.expose": "True",
"kompose.version": "%VERSION%"
}
},
"spec": {

View File

@ -184,6 +184,11 @@
"creationTimestamp": null,
"labels": {
"io.kompose.service": "web"
},
"annotations": {
"kompose.cmd": "%CMD%",
"kompose.service.expose": "True",
"kompose.version": "%VERSION%"
}
},
"spec": {