generator-jhipster: kubernetes namespace should not be present the yml files

Overview of the issue

Kubectl can’t deploy to the right namespace since the valu ein the context is overridden by the yml file

Motivation for or Use Case

Having different namespaces for test and prod

the namespace can be defined in kubeconf per context so that each one uses it’s own namespace

Reproduce the error

generate kubernetes

Related issues
Suggest a Fix

remove kubernetesNamespace from the generator (or have it optional is you want)

JHipster Version(s)

5.0.1 this not a regression

JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (19 by maintainers)

Commits related to this issue

Most upvoted comments

At this point of time, there is no kubeconf context generated so every namespace are declared when generating the application in each depoyment files. If we want to remove this kubernetesNamespace constant, we should generate a kubeconf context file as you said that would be equivalent to automatically executing the --namespace command.