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

fix: allow component to deploy correctly when create_namespace is false #1011

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

agfunderburg10
Copy link

Correct description and doc to match actual default value of create_namespace var

what

  • changes value of kubernetes_namespace to consider the create_namespace variable value
  • corrects doc and description to show default create_namespace value as true

why

The kubernetes_namespace value that is passed into the "cloudposse/helm-release/aws" module was set as join("", kubernetes_namespace.default.*.id). When create_namespace is false, this resource is never created, resulting in an error (example below) during deployment. My fix will simply use the variable kubernetes_namespace if create_namespace is false.

Error example:

module.metrics_server.helm_release.this[0]: Creating...
╷
│ Error: create: failed to create: an empty namespace may not be set during creation
│ 
│   with module.metrics_server.helm_release.this[0],
│   on .terraform/modules/metrics_server/main.tf line 65, in resource "helm_release" "this":
│   65: resource "helm_release" "this" {
│ 
╵
exit status 1

Correct description and doc to match actual default value of create_namespace var
@agfunderburg10 agfunderburg10 requested review from a team as code owners April 3, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant