Skip to content

Commit 85e3a7d

Browse files
syedthameem85hyder
authored andcommitted
Fixes as per comments and doc updates
1 parent ffbcda4 commit 85e3a7d

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

docs/src/guide/cluster.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ See also:
55

66
The OKE parameters concern mainly the following:
77
* whether you want your OKE control plane to be public or private
8+
* whether to assign a public IP address to the API endpoint for public access
89
* whether you want to deploy public or private worker nodes
910
* whether you want to allow NodePort or ssh access to the worker nodes
1011
* Kubernetes options such as dashboard, networking
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Copyright (c) 2017, 2023 Oracle Corporation and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33

4-
create_cluster = true // *true/false
5-
cluster_dns = null
6-
cluster_kms_key_id = null
7-
cluster_name = "oke"
8-
cluster_type = "enhanced" // *basic/enhanced
9-
cni_type = "flannel" // *flannel/npn
10-
image_signing_keys = []
11-
kubernetes_version = "v1.26.2"
12-
pods_cidr = "10.244.0.0/16"
13-
services_cidr = "10.96.0.0/16"
14-
use_signed_images = false // true/*false
4+
create_cluster = true // *true/false
5+
cluster_dns = null
6+
cluster_kms_key_id = null
7+
cluster_name = "oke"
8+
cluster_type = "enhanced" // *basic/enhanced
9+
cni_type = "flannel" // *flannel/npn
10+
assign_public_ip_to_control_plane = true // true/*false
11+
image_signing_keys = []
12+
kubernetes_version = "v1.26.2"
13+
pods_cidr = "10.244.0.0/16"
14+
services_cidr = "10.96.0.0/16"
15+
use_signed_images = false // true/*false

modules/cluster/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resource "oci_containerengine_cluster" "k8s_cluster" {
1616
}
1717

1818
endpoint_config {
19-
is_public_ip_enabled = var.control_plane_is_public ? var.assign_public_ip_to_control_plane : var.control_plane_is_public
19+
is_public_ip_enabled = var.control_plane_is_public && var.assign_public_ip_to_control_planeßß
2020
nsg_ids = var.control_plane_nsg_ids
2121
subnet_id = var.control_plane_subnet_id
2222
}

variables-cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ variable "control_plane_is_public" {
3131

3232
variable "assign_public_ip_to_control_plane" {
3333
default = false
34-
description = "An additional variable to toggle public IP on Kubernetes control plane endpoint when its public."
34+
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."
3535
type = bool
3636
}
3737

0 commit comments

Comments
 (0)