ks-devops icon indicating copy to clipboard operation
ks-devops copied to clipboard

The actual namespace of the deployment in "Continuous Deployments" is not the same as the configured "deployment location"

Open 24sama opened this issue 3 years ago • 5 comments
trafficstars

What is version of KubeSphere DevOps has the issue?

v3.3.0-rc.2

How did you install the Kubernetes? Or what is the Kubernetes distribution?

No response

What happened?

First, I set up the deployment location which is named pro. image

But this deployment was deployed into osf2f-system, and the pro was also created. image

I don't know if it is because there is a namespace value osf2f-system in the kustomization.yaml, maybe it should need to override that. image

A more serious situation is if I create 2 "Continuous Deployments" which both set up the same namespace value in the kustomization.yaml as the above, they will be deployed into one namespace even though I set a different "deployment location". image

They were all deployed to osf2f-system. image

Relevant log output

No response

Additional information

No response

24sama avatar Jun 13 '22 08:06 24sama

This is expected. Because kubectl only creates a new namespace if the desired resource does not have the namespace field. If you want to try to let GitOps create a new namespace, you could delete the namespace from kustomization.

LinuxSuRen avatar Jun 13 '22 08:06 LinuxSuRen

Thanks, I got it. It's just a little confusing that the "deployment location" shown here doesn't the same as the actual namespace.

24sama avatar Jun 13 '22 08:06 24sama

So, I'm wondering if we could make this issue to be an improvement instead of a bug.

LinuxSuRen avatar Jun 13 '22 08:06 LinuxSuRen

Yes, feel free to close this issue or change the labels.

24sama avatar Jun 13 '22 08:06 24sama

/kind-remove bug

LinuxSuRen avatar Jun 13 '22 08:06 LinuxSuRen