嗨,我尝试将自定义运行状况检查与 GCP LoadBalancer 结合使用。
我已经添加readinessProbe&livenessProbe像这样:
readinessProbe:
httpGet:
path: /health
port: dash
initialDelaySeconds: 5
periodSeconds: 1
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 10
livenessProbe:
httpGet:
path: /health
port: dash
initialDelaySeconds: 5
periodSeconds: 1
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 10
Run Code Online (Sandbox Code Playgroud)
但是当我创建我的入口时,我没有得到我的自定义健康检查
简单的问题是否可以使用 helm 和 sprig 功能获取尺寸列表?
我的列表 :
list:
- a
- b
- c
Run Code Online (Sandbox Code Playgroud)
我试过这样:
{{ .Values.list | len }}
{{ .Values.list | size }}
{{ .Values.list | length }}
Run Code Online (Sandbox Code Playgroud) 您好,我想express在节点服务器上运行我的应用程序。
我的 server.js :
var express = require('express');
var path = require('path');
var app = express();
app.get('/', (req, res) => {
res.sendFile(path.resolve('dist/my-app/index.html'))
});
app.listen(80, () => {
console.log('Server started!')
})
Run Code Online (Sandbox Code Playgroud)
但是当我尝试在localhost. 什么都没有出现。你能帮助我吗 ?
我想在类中使用变量调用函数:
class A:
def __init__(self, name, jsonItem):
fDic = {
'A', self.build_item(jsonItem)
}
self.fActive = fDic[name]
def build_item(self, jsonItem):
return [jsonItem["name"],jsonItem["property"]]
def run_function(self):
self.fActive()
Run Code Online (Sandbox Code Playgroud)
main.py:
data = A("A", jsonItem)
print data.run_function()
Run Code Online (Sandbox Code Playgroud)
当我打电话给我时,我有:
'set' object has no attribute '__getitem__'
Run Code Online (Sandbox Code Playgroud)
你能解释一下吗?