我构建一个简单的NodeJS API,将Docker Image推送到repo并使用Helm install将其部署到我的k8s(完美地工作).
pullPolicy是Always.
现在我想更新源代码并部署我的应用程序的更新版本.我在所有文件中碰撞了版本,构建并推送了新的Docker镜像并尝试过,helm upgrade但似乎什么也没发生.随着helm list我可以看到,修订部署,但尚未部署的更改源代码.
watch kubectl get pods还表明没有按照您期望的方式创建新的podkubectl --apply...
我做错了什么?
我有一个服务器,它向使用 http GET 请求它的客户端提供 ogg 编码的音频。如果我将 GET 路由注入 HTML 音频 src,它会接收音频并播放它:
function working(text) {
var downloadURL = 'http://localhost:8080/nlc/synthesize' +
'?text=' + encodeURIComponent(text);
audio.pause();
audio.src = downloadURL;
audio.play();
};
Run Code Online (Sandbox Code Playgroud)
如果我使用 http GET 调用(在 AngularJS 中)并尝试将响应注入 HTML 音频 src 它不会播放它:
function not_working(text) {
$http.get('http://localhost:8080/nlc/synthesize' + '?text=' + encodeURIComponent(text)).then(function(response) {
console.log(response);
audio.pause();
audio.src = encodeURIComponent(response);
audio.play();
};
Run Code Online (Sandbox Code Playgroud)
响应日志显示一个 JSON,在 'data' 键处有一个二进制字符串:
Object {data: "OggS?1?/? OpusHead??]OggS…?xs?????????????????????????????????", status: 200, config: Object, statusText: "OK"}
Run Code Online (Sandbox Code Playgroud)
有没有办法将 http GET 响应解码为我可以注入音频 src 的内容?
我使用docker-compose和这个配置部署了标准的Jenkins Docker镜像:
deployer:
image: jenkins
volumes:
- "/mnt/jenkins:/var/jenkins_home"
- "/var/run/docker.sock:/var/run/docker.sock"
ports:
- "2375:2375"
- "8080:8080"
- "50000:50000"
Run Code Online (Sandbox Code Playgroud)
在阅读了大量SO问题之后,我测试了将Root添加到docker用户组gpasswd -a ${USER} docker并验证了Container内的用户是否为Root docker exec jenkins_deployer echo ${USER}.
当我尝试使用"Docker URL = unix:///var/run/docker.sock"在Jenkins UI中添加Docker访问时,我收到错误消息" org.newsclub.net.unix.AFUNIXSocketException:Permission denied(socket: /run/docker.sock) "
如何让Jenkins访问docker.sock以自动部署Docker容器?
我翻阅了文档,但还没有找到解决方案。该应用程序松散地基于其文档中的“sayHello”示例,但每次代码运行时Method handler for /eventComm.DatabaseRPC/InsertSingleDocument expected but not provided都会返回警告。
我的原型文件:
service DatabaseRPC {
rpc InsertSingleDocument (Doc) returns (Doc) {}
}
message Doc {
required string name = 1;
required int32 id = 2;
}
Run Code Online (Sandbox Code Playgroud)
我的 gRPC 服务器:
function InsertSingleDocument (call, callback) {
callback(null, {
name: 'Hello ',
id: 1
})
}
let server = new grpc.Server()
server.addProtoService(protoDef.DatabaseRPC.service, {
InsertSingleDocument: InsertSingleDocument
})
server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure())
server.start()
Run Code Online (Sandbox Code Playgroud)
这段代码有什么问题?当然,我已经尝试用谷歌搜索错误,但没有找到解决方案