我试图在大三角帆上创建CD流水线,而我的应用程序打包为 Helm 图。
我在下一页中设置了k8s命名空间,但是当我触发管道时,大三角帆并未在该命名空间中创建应用程序,实际上是在我设置了大三角帆的默认命名空间“spinnaker”中创建了应用程序。
是大三角帆错误还是配置错误?
有人可以指出我的解决方法吗?
configuration of spinnaker pipeline
而且我发现以下来自spin-rosco的日志信息:
2018-11-07 06:48:49.146 INFO 1 --- [0.0-8087-exec-6] c.n.s.rosco.jobs.local.JobExecutorLocal : Starting job: [helm, template, /tmp/52a04675-210e-44a4-a0d8-d008222d527a/84C4D3AF1AA88C049E8175B4F068D7EE, --name, mytest, --namespace, mynamespace]...
2018-11-07 06:48:49.147 INFO 1 --- [0.0-8087-exec-6] c.n.s.rosco.jobs.local.JobExecutorLocal : Polling state for e8521f11-ef81-4d72-a172-b578a8c4c10a...
2018-11-07 06:48:49.148 INFO 1 --- [ionThreadPool-1] c.n.s.rosco.jobs.local.JobExecutorLocal : Executing e8521f11-ef81-4d72-a172-b578a8c4c10a with tokenized command: [helm, template, /tmp/52a04675-210e-44a4-a0d8-d008222d527a/84C4D3AF1AA88C049E8175B4F068D7EE, --name, mytest, --namespace, mynamespace]
2018-11-07 06:48:50.147 INFO 1 --- [0.0-8087-exec-6] c.n.s.rosco.jobs.local.JobExecutorLocal : Polling state for e8521f11-ef81-4d72-a172-b578a8c4c10a...
2018-11-07 06:48:50.149 INFO 1 --- [0.0-8087-exec-6] c.n.s.rosco.jobs.local.JobExecutorLocal : State for e8521f11-ef81-4d72-a172-b578a8c4c10a changed with exit code 0.
最佳答案
解决了!我的错误, Helm 模板应包含 namespace 作为官方网站的注释:
The release namespace (optional)
The Kubernetes namespace to install release into. If parameter is not specified default namespace will be used.
Note: Not all Helm charts contain namespace definitions in their manifests. Make sure that your manifests contain the following code:
metadata:
namespace: *{{ .Release.Namespace }}*