Browse Source
Fixing docker host default (#548)
* Prefer defaultHost
* no null
* fixing tests
* port as well
pull/550/merge
Justin Kotalik
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
1 additions and
14 deletions
-
src/Microsoft.Tye.Hosting/Model/Application.cs
-
test/E2ETest/testassets/projects/health-checks/tye-liveness.yaml
-
test/E2ETest/testassets/projects/health-checks/tye-none.yaml
-
test/E2ETest/testassets/projects/health-checks/tye-proxy.yaml
-
test/E2ETest/testassets/projects/health-checks/tye-readiness.yaml
|
|
@ -148,13 +148,8 @@ namespace Microsoft.Tye.Hosting.Model |
|
|
foreach (var b in service.Description.Bindings) |
|
|
foreach (var b in service.Description.Bindings) |
|
|
{ |
|
|
{ |
|
|
var protocol = b.Protocol; |
|
|
var protocol = b.Protocol; |
|
|
var host = b.Host ?? (isDockerRunInfo ? service.Description.Name : defaultHost); |
|
|
var host = b.Host ?? defaultHost ?? (isDockerRunInfo ? service.Description.Name : ""); |
|
|
|
|
|
|
|
|
var port = b.Port; |
|
|
var port = b.Port; |
|
|
if (b.Port is object && isDockerRunInfo) |
|
|
|
|
|
{ |
|
|
|
|
|
port = b.ContainerPort ?? b.Port.Value; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bindings.Add(new EffectiveBinding( |
|
|
bindings.Add(new EffectiveBinding( |
|
|
service.Description.Name, |
|
|
service.Description.Name, |
|
|
|
|
|
@ -5,8 +5,6 @@ services: |
|
|
- name: health-liveness |
|
|
- name: health-liveness |
|
|
project: api/api.csproj |
|
|
project: api/api.csproj |
|
|
replicas: 3 |
|
|
replicas: 3 |
|
|
bindings: |
|
|
|
|
|
- port: 8002 |
|
|
|
|
|
liveness: |
|
|
liveness: |
|
|
http: |
|
|
http: |
|
|
path: /healthy |
|
|
path: /healthy |
|
|
|
|
|
@ -5,6 +5,4 @@ services: |
|
|
- name: health-none |
|
|
- name: health-none |
|
|
project: api/api.csproj |
|
|
project: api/api.csproj |
|
|
replicas: 3 |
|
|
replicas: 3 |
|
|
bindings: |
|
|
|
|
|
- port: 8001 |
|
|
|
|
|
|
|
|
|
|
|
@ -5,8 +5,6 @@ services: |
|
|
- name: health-proxy |
|
|
- name: health-proxy |
|
|
project: api/api.csproj |
|
|
project: api/api.csproj |
|
|
replicas: 2 |
|
|
replicas: 2 |
|
|
bindings: |
|
|
|
|
|
- port: 8005 |
|
|
|
|
|
liveness: |
|
|
liveness: |
|
|
http: |
|
|
http: |
|
|
path: /healthy |
|
|
path: /healthy |
|
|
|
|
|
@ -5,8 +5,6 @@ services: |
|
|
- name: health-readiness |
|
|
- name: health-readiness |
|
|
project: api/api.csproj |
|
|
project: api/api.csproj |
|
|
replicas: 3 |
|
|
replicas: 3 |
|
|
bindings: |
|
|
|
|
|
- port: 8003 |
|
|
|
|
|
readiness: |
|
|
readiness: |
|
|
http: |
|
|
http: |
|
|
path: /ready |
|
|
path: /ready |
|
|
|