-
Notifications
You must be signed in to change notification settings - Fork 3
/
variables.tf
148 lines (125 loc) · 5.14 KB
/
variables.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
variable "ocean_cluster_id" {
type = string
description = "Specifies the Ocean cluster identifier"
}
variable "create_cluster" {
type = bool
description = "Controls whether the Ocean for Apache Spark cluster should be created (it affects all resources)"
default = true
}
variable "compute_create_vngs" {
type = bool
description = "Controls whether dedicated Ocean Spark VNGs will be created by the cluster creation process"
default = true
}
variable "compute_use_taints" {
type = bool
description = "Controls whether the Ocean Spark cluster will use taints to schedule workloads"
default = true
}
variable "ingress_managed_controller" {
type = bool
description = "Controls whether an ingress controller managed by Ocean for Apache Spark will be installed on the cluster"
default = true
}
variable "ingress_managed_load_balancer" {
type = bool
description = "Controls whether a load balancer managed by Ocean for Apache Spark will be provisioned for the cluster"
default = true
}
variable "ingress_load_balancer_service_annotations" {
type = map(string)
description = "Annotations that will be added to the load balancer service, allowing for customization of the load balancer"
default = {}
}
variable "ingress_load_balancer_target_group_arn" {
type = string
description = "The ARN of a target group that the Ocean for Apache Spark ingress controller will be bound to."
default = null
}
variable "enable_custom_endpoint" {
type = bool
description = "Controls whether the Ocean for Apache Spark control plane address the cluster using a custom endpoint."
default = false
}
variable "ingress_custom_endpoint_address" {
type = string
description = "The address the Ocean for Apache Spark control plane will use when addressing the cluster when custom endpoint is enabled"
default = null
}
variable "enable_private_link" {
type = bool
description = "Controls whether the Ocean for Apache Spark control plane address the cluster via an AWS Private Link"
default = false
}
variable "ingress_private_link_endpoint_service_address" {
type = string
description = "The name of the VPC Endpoint Service the Ocean for Apache Spark control plane should bind to when privatelink is enabled"
default = null
}
variable "log_collection_collect_driver_logs" {
type = bool
description = "Controls whether the Ocean Spark cluster will collect Spark driver logs (Deprecated: use log_collection_collect_app_logs instead)"
default = null
}
data "validation_warning" "log_collection_collect_driver_logs" {
condition = var.log_collection_collect_driver_logs != null
summary = "variable log_collection_collect_driver_logs is depreacted, use log_collection_collect_app_logs instead"
}
variable "log_collection_collect_app_logs" {
type = bool
description = "Controls whether the Ocean Spark cluster will collect Spark driver/executor logs"
default = true
}
variable "webhook_use_host_network" {
type = bool
description = "Controls whether Ocean Spark system pods that expose webhooks will use the host network"
default = false
}
variable "webhook_host_network_ports" {
type = list(number)
description = "Assign a list of ports on the host networks for our system pods"
default = []
}
variable "spark_additional_app_namespaces" {
type = list(string)
description = "List of Kubernetes namespaces that should be configured to run Spark applications, in addition to the default 'spark-apps' namespace"
default = []
validation {
condition = !contains(var.spark_additional_app_namespaces, "spark-apps")
error_message = "Error: spark_additional_app_namespaces cannot contain the default spark application namespace 'spark-apps'."
}
}
variable "attach_dedicated_virtual_node_groups" {
type = list(string)
description = "List of virtual node group IDs to attach to the cluster"
default = []
}
variable "deployer_namespace" {
type = string
description = "The namespace Ocean Spark deployer jobs will run in (must be either 'spot-system' or 'kube-system'). The deployer jobs are used to manage Ocean Spark cluster components."
default = "kube-system"
validation {
condition = contains(["spot-system", "kube-system"], var.deployer_namespace)
error_message = "Error: deployer_namespace should either be spot-system or kube-system."
}
}
variable "cluster_config" {
description = "Configuration for Ocean Kubernetes cluster"
type = object({
cluster_name = string
certificate_authority_data = string
server_endpoint = string
token = optional(string)
client_certificate = optional(string)
client_key = optional(string)
})
sensitive = true
validation {
condition = (
can(var.cluster_config.token) ||
(can(var.cluster_config.client_certificate) && can(var.cluster_config.client_key))
)
error_message = "Either 'token' must be provided, or both 'client_certificate' and 'client_key' must be provided."
}
}