Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace "cert-manager" already exists #72

Closed
mgoltzsche opened this issue Apr 24, 2020 · 1 comment · Fixed by #76
Closed

Namespace "cert-manager" already exists #72

mgoltzsche opened this issue Apr 24, 2020 · 1 comment · Fixed by #76

Comments

@mgoltzsche
Copy link

mgoltzsche commented Apr 24, 2020

When the tf module is run without parent_domain configured tf does not create the cert-manager namespace. However if one decides to configure parent_domain and reapply the module afterwards it fails with the following error since the namespace already exists:

Error: namespaces "cert-manager" already exists
  on .terraform/modules/jx/modules/dns/main.tf line 106, in resource "kubernetes_namespace" "cert-manager":
 106: resource "kubernetes_namespace" "cert-manager" {

As a fix the cert-manager namespace could always be created by tf.

@hferentschik hferentschik self-assigned this Apr 27, 2020
hferentschik added a commit to hferentschik/terraform-google-jx that referenced this issue Apr 28, 2020
We need to always create cert-manager and exdns namespaces and service accounts
since the current boot pipeline will always apply the underlying Helm charts.
If a namespace or service account does not exist before running `jx boot` it will
be created as part of `helm apply`. Once it is created by Helm, one cannot go
back to Terraform and enable DNS there, since Terraform will not be able to create
the already existing resources.

fixers jenkins-x#72
hferentschik added a commit that referenced this issue May 4, 2020
We need to always create cert-manager and exdns namespaces and service accounts
since the current boot pipeline will always apply the underlying Helm charts.
If a namespace or service account does not exist before running `jx boot` it will
be created as part of `helm apply`. Once it is created by Helm, one cannot go
back to Terraform and enable DNS there, since Terraform will not be able to create
the already existing resources.

fixers #72
@hferentschik
Copy link
Contributor

🎉 This issue has been resolved in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants