Skip to content

Commit 2fb9d67

Browse files
committed
Enable Health Checks UI automatic Kubernetes services discovery
1 parent 700cb62 commit 2fb9d67

35 files changed

+123
-137
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,65 @@
11
{
2-
"profiles": {
3-
"http": {
4-
"commandName": "Project",
5-
"environmentVariables": {
6-
"ASPNETCORE_ENVIRONMENT": "Development"
7-
},
8-
"dotnetRunMessages": true,
9-
"applicationUrl": "http://localhost:16050"
10-
},
11-
"https": {
12-
"commandName": "Project",
13-
"environmentVariables": {
14-
"ASPNETCORE_ENVIRONMENT": "Development"
15-
},
16-
"dotnetRunMessages": true,
17-
"applicationUrl": "http://localhost:16050"
18-
},
19-
"IIS Express": {
20-
"commandName": "IISExpress",
21-
"launchBrowser": true,
22-
"environmentVariables": {
23-
"ASPNETCORE_ENVIRONMENT": "Development"
24-
}
25-
},
26-
"Docker": {
27-
"commandName": "Docker",
28-
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
29-
"publishAllPorts": true,
30-
"useSSL": true
31-
}
32-
},
33-
"iisSettings": {
34-
"windowsAuthentication": false,
35-
"anonymousAuthentication": true,
36-
"iisExpress": {
37-
"applicationUrl": "http://localhost:16050",
38-
"sslPort": 44382
39-
}
40-
}
2+
"profiles": {
3+
"http": {
4+
"commandName": "Project",
5+
"environmentVariables": {
6+
"ASPNETCORE_ENVIRONMENT": "Development",
7+
"HealthChecksUI__HealthChecks__0__Name": "Storage",
8+
"HealthChecksUI__HealthChecks__0__Uri": "http://localhost:14200/hc",
9+
"HealthChecksUI__HealthChecks__1__Name": "VideoManager",
10+
"HealthChecksUI__HealthChecks__1__Uri": "http://localhost:15000/hc",
11+
"HealthChecksUI__HealthChecks__2__Name": "VideoManagerSignalRHub",
12+
"HealthChecksUI__HealthChecks__2__Uri": "http://localhost:15050/hc",
13+
"HealthChecksUI__HealthChecks__3__Name": "IdentityProvider",
14+
"HealthChecksUI__HealthChecks__3__Uri": "http://localhost:15100/hc",
15+
"HealthChecksUI__HealthChecks__4__Name": "VideoProcessor",
16+
"HealthChecksUI__HealthChecks__4__Uri": "http://localhost:15200/hc",
17+
"HealthChecksUI__HealthChecks__5__Name": "VideoStore",
18+
"HealthChecksUI__HealthChecks__5__Uri": "http://localhost:15400/hc",
19+
"HealthChecksUI__HealthChecks__6__Name": "Community",
20+
"HealthChecksUI__HealthChecks__6__Uri": "http://localhost:15500/hc",
21+
"HealthChecksUI__HealthChecks__7__Name": "Library",
22+
"HealthChecksUI__HealthChecks__7__Uri": "http://localhost:15600/hc",
23+
"HealthChecksUI__HealthChecks__8__Name": "Search",
24+
"HealthChecksUI__HealthChecks__8__Uri": "http://localhost:15700/hc",
25+
"HealthChecksUI__HealthChecks__9__Name": "Subscriptions",
26+
"HealthChecksUI__HealthChecks__9__Uri": "http://localhost:15800/hc",
27+
"HealthChecksUI__HealthChecks__10__Name": "History",
28+
"HealthChecksUI__HealthChecks__10__Uri": "http://localhost:15900/hc",
29+
"HealthChecksUI__HealthChecks__11__Name": "APIGateway",
30+
"HealthChecksUI__HealthChecks__11__Uri": "http://localhost:16000/hc"
31+
},
32+
"dotnetRunMessages": true,
33+
"applicationUrl": "http://localhost:16050"
34+
},
35+
"https": {
36+
"commandName": "Project",
37+
"environmentVariables": {
38+
"ASPNETCORE_ENVIRONMENT": "Development"
39+
},
40+
"dotnetRunMessages": true,
41+
"applicationUrl": "http://localhost:16050"
42+
},
43+
"IIS Express": {
44+
"commandName": "IISExpress",
45+
"launchBrowser": true,
46+
"environmentVariables": {
47+
"ASPNETCORE_ENVIRONMENT": "Development"
48+
}
49+
},
50+
"Docker": {
51+
"commandName": "Docker",
52+
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
53+
"publishAllPorts": true,
54+
"useSSL": true
55+
}
56+
},
57+
"iisSettings": {
58+
"windowsAuthentication": false,
59+
"anonymousAuthentication": true,
60+
"iisExpress": {
61+
"applicationUrl": "http://localhost:16050",
62+
"sslPort": 44382
63+
}
64+
}
4165
}

Backend/Services/WebStatus/WebStatus/appsettings.Development.json

-50
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,6 @@
66
}
77
},
88
"HealthChecksUI": {
9-
"HealthChecks": [
10-
{
11-
"Name": "Storage",
12-
"Uri": "http://localhost:14200/hc"
13-
},
14-
{
15-
"Name": "VideoManager",
16-
"Uri": "http://localhost:15000/hc"
17-
},
18-
{
19-
"Name": "VideoManagerSignalRHub",
20-
"Uri": "http://localhost:15050/hc"
21-
},
22-
{
23-
"Name": "IdentityProvider",
24-
"Uri": "http://localhost:15100/hc"
25-
},
26-
{
27-
"Name": "VideoProcessor",
28-
"Uri": "http://localhost:15200/hc"
29-
},
30-
{
31-
"Name": "VideoStore",
32-
"Uri": "http://localhost:15400/hc"
33-
},
34-
{
35-
"Name": "Community",
36-
"Uri": "http://localhost:15500/hc"
37-
},
38-
{
39-
"Name": "Library",
40-
"Uri": "http://localhost:15600/hc"
41-
},
42-
{
43-
"Name": "Search",
44-
"Uri": "http://localhost:15700/hc"
45-
},
46-
{
47-
"Name": "Subscriptions",
48-
"Uri": "http://localhost:15800/hc"
49-
},
50-
{
51-
"Name": "History",
52-
"Uri": "http://localhost:15900/hc"
53-
},
54-
{
55-
"Name": "APIGateway",
56-
"Uri": "http://localhost:16000/hc"
57-
}
58-
],
599
"EvaluationTimeInSeconds": 10,
6010
"MinimumSecondsBetweenFailureNotifications": 60
6111
}

Deploy/kubernetes/api-gateway/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: api-gateway
55
labels:
66
app: api-gateway
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: api-gateway
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
namespace: default
5+
name: services-discovery
6+
rules:
7+
- apiGroups: [""]
8+
resources: ["services"]
9+
verbs: ["list"]

Deploy/kubernetes/common/base/kustomization.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ resources:
55
- "./limit-range.yml"
66
- "./config-maps/common.yml"
77
- "./roles/pod-updater-role.yml"
8+
- "./cluster-roles/services-discovery-cluster-role.yml"
89
- "./storage-classes/persistence.yml"

Deploy/kubernetes/community-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: community-api
55
labels:
66
app: community-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: community-api

Deploy/kubernetes/community-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: community-api
55
labels:
6-
app: community-api
6+
app: community-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/history-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: history-api
55
labels:
66
app: history-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: history-api

Deploy/kubernetes/history-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: history-api
55
labels:
6-
app: history-api
6+
app: history-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/identity-provider/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: identity-provider
55
labels:
66
app: identity-provider
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: identity-provider

Deploy/kubernetes/identity-provider/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: identity-provider
55
labels:
6-
app: identity-provider
6+
app: identity-provider
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/library-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: library-api
55
labels:
66
app: library-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: library-api

Deploy/kubernetes/library-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: library-api
55
labels:
6-
app: library-api
6+
app: library-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/search-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: search-api
55
labels:
66
app: search-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: search-api

Deploy/kubernetes/search-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: search-api
55
labels:
6-
app: search-api
6+
app: search-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/storage-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: storage-api
55
labels:
66
app: storage-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: storage-api

Deploy/kubernetes/storage-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: storage-api
55
labels:
6-
app: storage-api
6+
app: storage-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/subscriptions-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: subscriptions-api
55
labels:
66
app: subscriptions-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: subscriptions-api

Deploy/kubernetes/subscriptions-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: subscriptions-api
55
labels:
6-
app: subscriptions-api
6+
app: subscriptions-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/users-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: users-api
55
labels:
66
app: users-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: users-api

Deploy/kubernetes/users-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: users-api
55
labels:
6-
app: users-api
6+
app: users-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/video-manager-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: video-manager-api
55
labels:
66
app: video-manager-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: video-manager-api

Deploy/kubernetes/video-manager-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: video-manager-api
55
labels:
6-
app: video-manager-api
6+
app: video-manager-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/video-manager-signalrhub/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: video-manager-signalrhub
55
labels:
66
app: video-manager-signalrhub
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: video-manager-signalrhub

Deploy/kubernetes/video-manager-signalrhub/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: video-manager-signalrhub
55
labels:
6-
app: video-manager-signalrhub
6+
app: video-manager-signalrhub
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/video-processor-application/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: video-processor-application
55
labels:
66
app: video-processor-application
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: video-processor-application
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1
22
kind: ServiceAccount
33
metadata:
4-
name: video-processor-application-service-account
4+
name: video-processor-application-service-account

Deploy/kubernetes/video-store-api/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: video-store-api
55
labels:
66
app: video-store-api
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: video-store-api

Deploy/kubernetes/video-store-api/base/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: video-store-api
55
labels:
6-
app: video-store-api
6+
app: video-store-api
77
spec:
88
selector:
99
matchLabels:

Deploy/kubernetes/web-client/base/clusterip-service.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
name: web-client
55
labels:
66
app: web-client
7+
HealthChecks: "true"
78
spec:
89
selector:
910
app: web-client

0 commit comments

Comments
 (0)