-
Notifications
You must be signed in to change notification settings - Fork 213
/
variables-cluster.tf
108 lines (93 loc) · 4.41 KB
/
variables-cluster.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
# Copyright (c) 2017, 2023 Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
variable "create_cluster" {
default = true
description = "Whether to create the OKE cluster and dependent resources."
type = bool
}
variable "cluster_name" {
default = "oke"
description = "The name of oke cluster."
type = string
}
variable "cluster_type" {
default = "basic"
description = "The cluster type. See <a href=https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengworkingwithenhancedclusters.htm>Working with Enhanced Clusters and Basic Clusters</a> for more information."
type = string
validation {
condition = contains(["basic", "enhanced"], lower(var.cluster_type))
error_message = "Accepted values are 'basic' or 'enhanced'."
}
}
variable "control_plane_is_public" {
default = false
description = "Whether the Kubernetes control plane endpoint should be allocated a public IP address to enable access over public internet."
type = bool
}
variable "assign_public_ip_to_control_plane" {
default = false
description = "Whether to assign a public IP address to the API endpoint for public access. Requires the control plane subnet to be public to assign a public IP address."
type = bool
}
variable "control_plane_nsg_ids" {
default = []
description = "An additional list of network security groups (NSG) ids for the cluster endpoint."
type = set(string)
}
variable "cni_type" {
default = "flannel"
description = "The CNI for the cluster: 'flannel' or 'npn'. See <a href=https://docs.oracle.com/en-us/iaas/Content/ContEng/Concepts/contengpodnetworking.htm>Pod Networking</a>."
type = string
validation {
condition = contains(["flannel", "npn"], var.cni_type)
error_message = "Accepted values are flannel or npn"
}
}
variable "pods_cidr" {
default = "10.244.0.0/16"
description = "The CIDR range used for IP addresses by the pods. A /16 CIDR is generally sufficient. This CIDR should not overlap with any subnet range in the VCN (it can also be outside the VCN CIDR range). Ignored when cni_type = 'npn'."
type = string
}
variable "services_cidr" {
default = "10.96.0.0/16"
description = "The CIDR range used within the cluster by Kubernetes services (ClusterIPs). This CIDR should not overlap with the VCN CIDR range."
type = string
}
variable "kubernetes_version" {
default = "v1.26.2"
description = "The version of kubernetes to use when provisioning OKE or to upgrade an existing OKE cluster to."
type = string
}
variable "cluster_kms_key_id" {
default = ""
description = "The id of the OCI KMS key to be used as the master encryption key for Kubernetes secrets encryption."
type = string
}
variable "use_signed_images" {
default = false
description = "Whether to enforce the use of signed images. If set to true, at least 1 RSA key must be provided through image_signing_keys."
type = bool
}
variable "image_signing_keys" {
default = []
description = "A list of KMS key ids used by the worker nodes to verify signed images. The keys must use RSA algorithm."
type = set(string)
}
variable "load_balancers" {
default = "both"
description = "The type of subnets to create for load balancers."
type = string
validation {
condition = contains(["public", "internal", "both"], var.load_balancers)
error_message = "Accepted values are public, internal or both."
}
}
variable "preferred_load_balancer" {
default = "public"
description = "The preferred load balancer subnets that OKE will automatically choose when creating a load balancer. Valid values are 'public' or 'internal'. If 'public' is chosen, the value for load_balancers must be either 'public' or 'both'. If 'private' is chosen, the value for load_balancers must be either 'internal' or 'both'. NOTE: Service annotations for internal load balancers must still be specified regardless of this setting. See <a href=https://github.com/oracle/oci-cloud-controller-manager/blob/master/docs/load-balancer-annotations.md>Load Balancer Annotations</a> for more information."
type = string
validation {
condition = contains(["public", "internal"], var.preferred_load_balancer)
error_message = "Accepted values are public or internal."
}
}