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

Mendix namespace is hardcoded #8

Open
ssahadevan-mendix opened this issue Feb 2, 2023 · 2 comments
Open

Mendix namespace is hardcoded #8

ssahadevan-mendix opened this issue Feb 2, 2023 · 2 comments

Comments

@ssahadevan-mendix
Copy link
Collaborator

Enhance to handle variable namespaces and mutiple namespaces if needed. Raised by @atheiman
The helm chart seems to assume Mendix will only be registered within one namespace. What would need to change to register multiple namespaces into Mendix? We have found “mendix” namespace hardcoded in a few spots in the helm chart and tried to change the chart to support deploying to multiple namespaces, but we want your opinions on what needs to be considered before we deploy the helm chart into multiple namespaces using multiple terraform helm_release resources.

@carlos-salinas
Copy link
Collaborator

Thanks for sharing this. The hardcoded namespace is by design. This project is meant to ease the try out of Mendix on an EKS environment, automating any resource-related configuration at expense of certain rigidity as you noticed. Nevertheless, you can install another namespaces following the regular steps of Mendix for Private Cloud. Bear in mind, adding more than three app environments - already preconfigured - might degrade the overall performance as warned in the documentation:

If you're deploying more than three apps, change the default instance type of the eks_node_instance_type variable. By default, the instance type for the Kubernetes nodes is optimized to support up to three apps. Deploying more than three apps with the default instance type may affect the performance of your applications. For more information, refer to Choosing an Amazon EC2 instance type in the Amazon EKS User Guide.

We may change the scope of this project in the future, adding more capabilities and flexibility, attending customer's feedback. And we will update the documentation accordingly.

@geoffreyme
Copy link
Collaborator

Hello and thanks for this feedback.
As mentioned by @carlos-salinas, the mendix namespace is hardcoded by design, but if this is a feature request it is possible to add a variable to be able to change the default namespace name, or even add the possibility to use multiple namespaces. It will require a little refactoring though, but we can imagine using a list object variable with all the necessary parameters :

variable "namespaces" {
  type = list(object({
    namespace_name = string
    cluster_id = string
    cluster_secret = string
    environments_internal_names = list(string)
  }))

  default = [
    {
      namespace_name = "mendix"
      environments_internal_names = ["app1", "app2"]
      cluster_id                   = "cluster_id"
      cluster_secret               = "cluster_secret"
    }
  ]
}

And move the mendix_installer helm_release resource to a dedicated module :

 module "mendix_installer" {
  for_each = {
    for namespace in var.namespaces:  namespace.namespace_name => namespace
  }

  source         = "./modules/mendix-installer"
  [...]
  environments_internal_names  = each.value.environments_internal_names
  namespace                    = each.value.namespace_name
}

tbulding pushed a commit that referenced this issue Jan 3, 2024
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

No branches or pull requests

3 participants