Merge branch 'bkoff-develop' into 'master'
新增监控接口 See merge request !37
This commit is contained in:
@@ -39,13 +39,15 @@ spec:
|
|||||||
name: web
|
name: web
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
httpGet:
|
||||||
port: 8080
|
path: /k8s/readiness
|
||||||
|
port: web
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
tcpSocket:
|
httpGet:
|
||||||
port: 8080
|
path: /k8s/liveness
|
||||||
|
port: web
|
||||||
initialDelaySeconds: 10
|
initialDelaySeconds: 10
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.fangjia.bkoff.controllers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房价网后台存活监控
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/6/7
|
||||||
|
*/
|
||||||
|
public class K8sController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存活检查
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Object livenessAction() {
|
||||||
|
return "liveness";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就绪检查
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Object readinessAction() {
|
||||||
|
return "readiness";
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
-1
@@ -40,7 +40,8 @@ public class AuthInterceptor implements Interceptor {
|
|||||||
request.setAttribute("__resources", request.getSession().getAttribute(userId + "_resources"));
|
request.setAttribute("__resources", request.getSession().getAttribute(userId + "_resources"));
|
||||||
|
|
||||||
if (invocation.getAction().getController().getName().equals("login")
|
if (invocation.getAction().getController().getName().equals("login")
|
||||||
|| invocation.getAction().getController().getName().equals("")) {
|
|| invocation.getAction().getController().getName().equals("")
|
||||||
|
|| invocation.getAction().getController().getName().equals("k8s")) {
|
||||||
return invocation.invoke();
|
return invocation.invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user