我正在尝试使用KNative使用容器和initContainer部署服务。
如果安装了Istio,则无需进行侧面注入。
这是我得到的错误:
import 'dart:convert';
import 'dart:io';
void main() async {
var ls = await Process.start('ls',[]);
var head = await Process.start('head',['-1']);
ls.stdout
.transform(utf8.decoder)
.transform(const Linesplitter())
.map((line) => '1: $line\n')
.transform(utf8.encoder)
.pipe(head.stdin)
.catchError(
(e) {
// forget broken pipe after head process exit
},test: (e) => e is SocketException && e.osError.message == 'Broken pipe',);
await head.stdout.pipe(stdout);
}
我的YAML文件:
Internal error occurred: admission webhook "webhook.serving.knative.dev" denied the request: validation failed: must not set the field(s): spec.template.spec.initContainers
volumes not mounted: [some_script]: spec.template.spec.containers[0].volumeMounts
谢谢!