Skip to content

Commit 5ec117b

Browse files
committed
Merge branch 'okeupdatemain' into 'main'
ported to main branch - OWLS-130383 - OKE cluster creation via terraform failed, due changes in okemodule, need to update to newest version of oracle-terraform-modules/oke/oci, updated k8s to 1.33.1 for OKE cluster See merge request weblogic-cloud/weblogic-kubernetes-operator!4993
2 parents e22648f + 3549028 commit 5ec117b

File tree

4 files changed

+74
-57
lines changed

4 files changed

+74
-57
lines changed

Jenkinsfile.oke

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,14 @@ pipeline {
8686

8787
string(name: 'OKE_KUBE_VERSION',
8888
description: 'kube version for oke cluster',
89-
defaultValue: '1.31.1'
89+
defaultValue: '1.33.1'
9090
)
9191
string(name: 'IMAGE_ID',
9292
description: 'oci image id for node pool, find image OCID for your region from https://docs.oracle.com/iaas/images/',
9393
//defaultValue OKE1.26.2: 'ocid1.image.oc1.phx.aaaaaaaaaizmtmozeudeeuq7o5ir7dkl2bkxbbb3tgomshqbqn6jpomrsjza'
9494
//1.27.2 oke defaultValue: 'ocid1.image.oc1.phx.aaaaaaaaypr5r5drojwytghw6e6mvpjsscrnkuwtmqlmvmix7kjb2zcnc7wa'
95-
defaultValue: 'ocid1.image.oc1.phx.aaaaaaaatkz7laillswel25edlbmq67ino2y2pv6xhp2lml2vzha44ao5gtq'
95+
//1.30.1: 'ocid1.image.oc1.phx.aaaaaaaak36p3gcd7m5fypfs5j5flxaqxykon4dkjqd3j45zkq57cq52ovoq'
96+
defaultValue: 'ocid1.image.oc1.phx.aaaaaaaa6fbid3anokvq3rjxt22globuvoi4j6adgbyroehadb4tc4tb6b2a'
9697

9798
)
9899
string(name: 'KUBECTL_VERSION',
@@ -147,7 +148,7 @@ pipeline {
147148
)
148149
string(name: 'NODE_SHAPE',
149150
description: '',
150-
defaultValue: "VM.Standard.E5.Flex"
151+
defaultValue: "VM.Standard.E3.Flex"
151152
)
152153
string(name: 'MOUNT_TARGET_OCID',
153154
description: 'only for debug runs on wko-oke-dev',

integration-tests/src/test/resources/oke/terraform/okemodule/c1.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ locals {
9393
module "c1" {
9494

9595
source = "oracle-terraform-modules/oke/oci"
96-
version = "5.1.1"
96+
version = "5.3.0"
9797

9898
count = lookup(lookup(var.clusters, "c1"), "enabled") ? 1 : 0
9999

100100
home_region = lookup(local.regions, var.home_region)
101-
101+
102102
#region = lookup(local.regions, lookup(lookup(var.clusters, "c1"), "region"))
103103
region = lookup(local.regions, var.home_region)
104104

@@ -137,7 +137,7 @@ module "c1" {
137137
create_bastion = true # *true/false
138138
bastion_allowed_cidrs = [] # e.g. ["0.0.0.0/0"] to allow traffic from all sources
139139
bastion_availability_domain = null # Defaults to first available
140-
bastion_image_id = null # Ignored when
140+
bastion_image_id = null # Ignored when
141141
bastion_image_os = "Oracle Linux" # Ignored when bastion_image_type = "custom"
142142
bastion_image_os_version = "8" # Ignored when bastion_image_type = "custom"
143143
bastion_image_type = "platform" # platform/custom
@@ -168,6 +168,7 @@ module "c1" {
168168
cluster_name = var.cluster_name
169169
cluster_type = var.cluster_type
170170
cni_type = var.preferred_cni
171+
assign_public_ip_to_control_plane = true
171172
control_plane_is_public = true
172173
control_plane_allowed_cidrs = [local.anywhere]
173174
kubernetes_version = var.kubernetes_version
@@ -197,6 +198,6 @@ module "c1" {
197198

198199

199200
resource "local_file" "test_kube_config_file" {
200-
content = data.oci_containerengine_cluster_kube_config.kube_config.content
201+
content = data.oci_containerengine_cluster_kube_config.kube_config.content
201202
filename = "${path.module}/${var.cluster_name}_kubeconfig"
202203
}

integration-tests/src/test/resources/oke/terraform/okemodule/template.tfvars

Lines changed: 59 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,66 @@
11
# Copyright (c) 2024, Oracle 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-
# Template to generate TF variables file for cluster creation from property file oci.props
5-
#
6-
# User-specific vars - you can get these easily from the OCI console from your user page
7-
#
8-
9-
# provider
10-
api_fingerprint = "@OCIAPIPUBKEYFINGERPRINT@"
11-
#
12-
api_private_key_path = "@OCIPRIVATEKEYPATH@"
13-
#
14-
home_region = "phoenix" # Use short form e.g. ashburn from location column https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm
15-
#
16-
tenancy_id = "@TENANCYOCID@"
17-
#
18-
user_id = "@USEROCID@"
19-
#
20-
cluster_name="@OKECLUSTERNAME@"
21-
compartment_id = "@COMPOCID@"
22-
vcn_id = "@VCNOCID@"
23-
control_plane_subnet_id = "@PUBSUBNETOCID@"
24-
pub_lb_id = "@PUBSUBNETOCID@"
25-
worker_subnet_id = "@PRIVATESUBNETOCID@"
26-
27-
#MountTarget
28-
mount_target_ocid="@MOUNTTARGETOCID@"
29-
#
30-
# # ssh
31-
ssh_private_key_path = "@NODEPOOLSSHPK@"
32-
ssh_public_key_path = "@NODEPOOLSSHPUBKEY@"
33-
#
34-
# # clusters
35-
# ## For regions, # Use short form e.g. ashburn from location column https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm
36-
# ## VCN, Pods and services clusters must not overlap with each other and with those of other clusters.
37-
clusters = {
38-
c1 = { region = "@REGIONSHORT@", vcn = "10.1.0.0/16", pods = "10.201.0.0/16", services = "10.101.0.0/16", enabled = true }
39-
}
40-
#
41-
kubernetes_version = "@OKEK8SVERSION@"
42-
#
43-
cluster_type = "basic"
44-
#
45-
oke_control_plane = "public"
46-
node_shape = "@NODEPOOLSHAPE@"
4+
# ============================================
5+
# User-specific provider configuration
6+
# ============================================
7+
8+
api_fingerprint = "@OCIAPIPUBKEYFINGERPRINT@"
9+
api_private_key_path = "@OCIPRIVATEKEYPATH@"
10+
home_region = "phoenix"
11+
tenancy_id = "@TENANCYOCID@"
12+
user_id = "@USEROCID@"
13+
14+
# ============================================
15+
# OKE Cluster configuration
16+
# ============================================
17+
18+
cluster_name = "@OKECLUSTERNAME@"
19+
compartment_id = "@COMPOCID@"
20+
vcn_id = "@VCNOCID@"
21+
control_plane_subnet_id = "@PUBSUBNETOCID@"
22+
pub_lb_id = "@PUBSUBNETOCID@"
23+
worker_subnet_id = "@PRIVATESUBNETOCID@"
24+
mount_target_ocid = "@MOUNTTARGETOCID@"
25+
26+
# SSH keys for node access
27+
ssh_private_key_path = "@NODEPOOLSSHPK@"
28+
ssh_public_key_path = "@NODEPOOLSSHPUBKEY@"
29+
30+
# ============================================
31+
# Cluster network and CIDRs
32+
# ============================================
33+
34+
clusters = {
35+
c1 = {
36+
region = "@REGIONSHORT@"
37+
vcn = "10.1.0.0/16"
38+
pods = "10.201.0.0/16"
39+
services = "10.101.0.0/16"
40+
enabled = true
41+
}
42+
}
43+
44+
# ============================================
45+
# General cluster parameters
46+
# ============================================
47+
48+
kubernetes_version = "@OKEK8SVERSION@"
49+
cluster_type = "basic"
50+
oke_control_plane = "public"
51+
assign_public_ip_to_control_plane = true
52+
node_shape = "@NODEPOOLSHAPE@"
53+
54+
# ============================================
55+
# Node pool definition
56+
# ============================================
57+
4758
nodepools = {
4859
np1 = {
49-
shape = "@NODEPOOLSHAPE@",
50-
ocpus = 2,
51-
memory = 64,
52-
size = 2,
53-
boot_volume_size = 150,
60+
shape = "@NODEPOOLSHAPE@"
61+
ocpus = 2
62+
memory = 64
63+
size = 2
64+
boot_volume_size = 150
5465
}
5566
}
56-

integration-tests/src/test/resources/oke/terraform/okemodule/versions.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ terraform {
77
oci = {
88
source = "oracle/oci"
99
}
10+
helm = {
11+
source = "hashicorp/helm"
12+
version = ">= 2.7.1"
13+
}
1014
}
11-
required_version = ">= 1.0.0"
15+
required_version = ">= 1.1.0"
1216
}
17+

0 commit comments

Comments
 (0)