<p>I trying to create a CD pipeline on spinnaker, and my applications were packaged as helm chart. </p>

<p>I set k8s namespace in following page, but when i trigger pipeline, spinnaker did't create applications in that namespace, actually applications were created in default namespace "spinnaker" which i setup spinnaker.</p>

<p>Is it a spinnaker bug or configuration mistake?
Can someone point me on how to troubleshoot/solve this?</p>

<p><a href="https://i.stack.imgur.com/YiQSZ.png" rel="nofollow noreferrer">configuration of spinnaker pipeline</a></p>

<p>And i found below log info from spin-rosco:</p>

<pre><code>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.
</code></pre>

<p>Solved! My mistake, the helm template should contain namespace as offical website's note:</p>

<pre><code>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 }}*
</code></pre>
