Skip to content

Commit

Permalink
Add registration_message config option
Browse files Browse the repository at this point in the history
  • Loading branch information
kenafoster committed May 16, 2024
1 parent b5f6e62 commit 95330f4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/nebari_plugin_self_registration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class SelfRegistrationConfig(Base):
approved_domains: Optional[List[str]] = []
coupons: Optional[List[str]] = []
registration_group: Optional[str] = ""
registration_message: Optional[str] = ""
affinity: SelfRegistrationAffinityConfig = SelfRegistrationAffinityConfig()


Expand Down Expand Up @@ -147,6 +148,7 @@ def input_vars(self, stage_outputs: Dict[str, Dict[str, Any]]):
"approved_domains": self.config.self_registration.approved_domains,
"coupons": self.config.self_registration.coupons,
"registration_group": self.config.self_registration.registration_group,
"registration_message": self.config.self_registration.registration_message,
"project_name": self.config.escaped_project_name,
"realm_id": keycloak_config["realm_id"],
"client_id": CLIENT_NAME,
Expand Down
1 change: 1 addition & 0 deletions src/nebari_plugin_self_registration/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module "self-registration" {
ingress_host = var.ingress_host
self_registration_sa_name = local.self_registration_sa_name
registration_group = var.registration_group
registration_message = var.registration_message
namespace = var.namespace
keycloak_base_url = var.external_url
keycloak_config = module.keycloak.config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ resource "helm_release" "self_registration" {
approved_domains = var.approved_domains
account_expiration_days = var.account_expiration_days
registration_group = var.registration_group
registration_message = var.registration_message
keycloak = {
server_url = var.keycloak_base_url
realm_name = var.realm_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ variable "registration_group" {
type = string
}

variable "registration_message" {
description = "Custom message to display to registering users"
type = string
default = ""
}

variable "self_registration_sa_name" {
description = "Name of K8S service account for Self Registration app workloads"
type = string
Expand Down
6 changes: 6 additions & 0 deletions src/nebari_plugin_self_registration/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ variable "registration_group" {
default = ""
}

variable "registration_message" {
description = "Custom message to display to registering users"
type = string
default = ""
}

variable "affinity" {
type = object({
enabled = optional(bool, true)
Expand Down

0 comments on commit 95330f4

Please sign in to comment.