From 145780ec3d272ad628ff8e2c86bc7ed0a288b20f Mon Sep 17 00:00:00 2001 From: Joe Kratzat Date: Thu, 10 Mar 2022 14:51:05 -0500 Subject: [PATCH] Remove memoryInGBs from our templates We are removing this from our main templates otherwise we have to set a default which users might not set when changing the OCPU and could cause issues. --- docs/src/gs/create-workload-cluster.md | 86 ++++++++++--------- scripts/ci-conformance.sh | 10 +-- scripts/ci-e2e.sh | 10 +-- templates/cluster-template-antrea.yaml | 12 ++- templates/cluster-template-arm-free-tier.yaml | 12 ++- ...luster-template-failure-domain-spread.yaml | 16 ++-- templates/cluster-template-oci-addons.yaml | 12 ++- templates/cluster-template-oraclelinux.yaml | 12 ++- templates/cluster-template.yaml | 12 ++- .../v1beta1/bases/cluster.yaml | 2 +- .../infrastructure-oci/v1beta1/bases/md.yaml | 2 +- .../md.yaml | 2 +- test/e2e/upgrade_test.go | 2 +- 13 files changed, 89 insertions(+), 101 deletions(-) diff --git a/docs/src/gs/create-workload-cluster.md b/docs/src/gs/create-workload-cluster.md index 89e0a47b5..625daccd8 100644 --- a/docs/src/gs/create-workload-cluster.md +++ b/docs/src/gs/create-workload-cluster.md @@ -2,45 +2,50 @@ ## Workload Cluster Templates -Choose one of the available templates for to create your workload clusters from the [latest released artifacts][latest-release]. Each workload cluster template can be further configured with the parameters below. +Choose one of the available templates for to create your workload clusters from the +[latest released artifacts][latest-release]. Each workload cluster template can be +further configured with the parameters below. ## Workload Cluster Parameters -The following Oracle Cloud Infrastructure (OCI) configuration parameters are available when creating a workload cluster on OCI: - -| Parameter | Default Value | Description | -|-------------------------------------------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `OCI_COMPARTMENT_ID` | | The OCID of the compartment where the OCI resources are to be created | -| `OCI_IMAGE_ID` | | The OCID of the Compute Image (Oracle Linux or
Ubuntu) with which to create the Kubernetes nodes. This same image is used for both the control plane and the worker nodes. | -| `OCI_CONTROL_PLANE_SHAPE` | VM.Standard.E4.Flex | The shape of the Kubernetes nodes | -| `OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS` | | The amount of memory in GBs to be allocated to the control plane instances. If not provided, the memory is automatically computed by compute API. | -| `OCI_CONTROL_PLANE_SHAPE_OCPUS` | 1 | The number of OCPUs allocated to the control plane instance | -| `OCI_WORKER_SHAPE` | VM.Standard.E4.Flex | The shape of the Kubernetes worker nodes | -| `OCI_WORKER_SHAPE_MEMORY_IN_GBS` | | The amount of memory in GBs to be allocated to the worker instances. If not provided, the memory is automatically computed by compute API. | -| `OCI_WORKER_SHAPE_OCPUS` | 1 | The number of OCPUs allocated to the worker instance | -| `OCI_SSH_KEY` | | The public SSH key to be added to the Kubernetes nodes. It can be used to login to the node and troubleshoot failures. | -| `OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION` | true | [In-transit encryption](https://docs.oracle.
com/en-us/iaas/Content/File/Tasks/intransitencryption.htm) provides a way to secure your data between instances and mounted file systems using TLS v.1.2 (Transport Layer Security) encryption. Only [some bare metal instances](https://docs.oracle.com/en-us/iaas/releasenotes/changes/60d602f5-abb3-4639-aa19-292a5744a808/) support In-transit encryption | -| `OCI_WORKER_PV_TRANSIT_ENCRYPTION` | true | [In-transit encryption](https://docs.oracle.com/en-us/iaas/Content/File/Tasks/intransitencryption.htm) provides a way to secure your data between instances and mounted file systems using TLS v.1.2 (Transport Layer Security) encryption. Only [some bare metal instances](https://docs.oracle.com/en-us/iaas/releasenotes/changes/60d602f5-abb3-4639-aa19-292a5744a808/) support In-transit encryption | +The following Oracle Cloud Infrastructure (OCI) configuration parameters are available +when creating a workload cluster on OCI using one of our predefined templates: + +| Parameter | Default Value | Description | +|-------------------------------------------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `OCI_COMPARTMENT_ID` | | The OCID of the compartment in which to create the required compute, storage and network resources. | +| `OCI_IMAGE_ID` | | The OCID of the image for the kubernetes nodes. This same image is used for both the control plane and the worker nodes. | +| `OCI_CONTROL_PLANE_MACHINE_TYPE` | VM.Standard.E4.Flex | The [shape](https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm) of the Kubernetes control plane machine. | +| `OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS` | 1 | The number of OCPUs allocated to the control plane instance. | +| `OCI_NODE_MACHINE_TYPE` | VM.Standard.E4.Flex | The [shape](https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm) of the Kubernetes worker machine. | +| `OCI_NODE_MACHINE_TYPE_OCPUS` | 1 | The number of OCPUs allocated to the worker instance. | +| `OCI_SSH_KEY` | | The public SSH key to be added to the Kubernetes nodes. It can be used to login to the node and troubleshoot failures. | +| `OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION` | true | Enables [in-flight Transport Layer Security (TLS) 1.2 encryption](https://docs.oracle.com/en-us/iaas/Content/File/Tasks/intransitencryption.htm) of data between control plane nodes and their associated block storage devices. | +| `OCI_NODE_PV_TRANSIT_ENCRYPTION` | true | Enables [in-flight Transport Layer Security (TLS) 1.2 encryption](https://docs.oracle.com/en-us/iaas/Content/File/Tasks/intransitencryption.htm) of data between worker nodes and their associated block storage devices. | + +*NOTE* Only specific [bare metal shapes](https://docs.oracle.com/en-us/iaas/releasenotes/changes/60d602f5-abb3-4639-aa19-292a5744a808/) +support in-transit encryption. If an unsupported shape is specified, the deployment will fail completely. + +*NOTE:* Using the predefined templates the machine's memory size is automatically allocated based on the chosen shape +and OCPU count. The following Cluster API parameters are also available: -| Parameter | Default Value | Description | -| ---------------------------- | ---------------------- | ----------- | -| `CLUSTER_NAME` | | The name of the workload cluster to create | -| `CONTROL_PLANE_MACHINE_COUNT` | 1 | The number of control plane machines for the workload cluster.| -| `KUBERNETES_VERSION` | | The Kubernetes version to use for the workload cluster. If unspecified, the value from OS environment variables or the .cluster-api/clusterctl.yaml config file will be used. | -| `NAMESPACE` | | The namespace to use for the workload cluster. If unspecified, the current namespace will be used | -| `POD_CIDR` | 1 | The CIDR range for the Kubernetes POD network. | -| `SERVICE_CIDR` | | The CIDR for the Kubernetes services network. | -| `SERVICE_DOMAIN` | | | -| `WORKER_MACHINE_COUNT` | | The number of worker machines for the workload cluster. | +| Parameter | Default Value | Description | +|-------------------------------|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `CLUSTER_NAME` | | The name of the workload cluster to create. | +| `CONTROL_PLANE_MACHINE_COUNT` | 1 | The number of control plane machines for the workload cluster. | +| `KUBERNETES_VERSION` | | The Kubernetes version installed on the workload cluster nodes. If this environement variable is not configured, the version must be specifed in the `.cluster-api/clusterctl.yaml` file | +| `NAMESPACE` | | The namespace for the workload cluster. If not specified, the current namespace is used. | +| `POD_CIDR` | 192.168.0.0/16 | CIDR range of the Kubernetes pod-to-pod network. | +| `SERVICE_CIDR` | 10.128.0.0/12 | CIDR range of the Kubernetes pod-to-services network. | +| `NODE_MACHINE_COUNT` | | The number of worker machines for the workload cluster. | ## Create a new workload cluster on virtual instances using an Ubuntu custom image -Run the command below to create a Kubernetes cluster with 1 control plane node and 1 worker node. This will setup -both the control plane and the worker nodes using the default information defined in the -[Workload Cluster Parameters](#workload-cluster-parameters) -table: +The following command will create a workload cluster comprising a single +control plane node and single worker node using the default values as specified in the preceding +[Workload Cluster Parameters](#workload-cluster-parameters) table: ```bash OCI_COMPARTMENT_ID= \ @@ -49,29 +54,28 @@ OCI_SSH_KEY= \ CONTROL_PLANE_MACHINE_COUNT=1 \ KUBERNETES_VERSION=v1.20.10 \ NAMESPACE=default \ -WORKER_MACHINE_COUNT=1 \ +NODE_MACHINE_COUNT=1 \ clusterctl generate cluster \ --from cluster-template.yaml | kubectl apply -f - ``` ## Create a new workload cluster on bare metal instances using an Ubuntu custom image -Note the addition of the `OCI_CONTROL_PLANE_SHAPE` variables, `OCI_WORKER_SHAPE` variables to change the shape -information from the `VM.Standard.E4.Flex` default. You will also need to set`OCI_PV_TRANSIT_ENCRYPTION=false` which is -required for most BM shapes. +The following command uses the `OCI_CONTROL_PLANE_MACHINE_TYPE` and `OCI_NODE_MACHINE_TYPE` +parameters to specify bare metal shapes instead of using CAPOCI's default virtual +instance shape. The `OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION` and `OCI_NODE_PV_TRANSIT_ENCRYPTION` +parameters disable encryption of data in flight between the bare metal instance and the block storage resources. ```bash OCI_COMPARTMENT_ID= \ OCI_IMAGE_ID= \ OCI_SSH_KEY= \ -OCI_CONTROL_PLANE_SHAPE=BM.Standard2.52 \ -OCI_CONTROL_PLANE_SHAPE_OCPUS=52 \ -OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS= \ +OCI_CONTROL_PLANE_MACHINE_TYPE=BM.Standard2.52 \ +OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=52 \ OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=false \ -OCI_WORKER_SHAPE=BM.Standard2.52 \ -OCI_WORKER_SHAPE_OCPUS=52 \ -OCI_WORKER_SHAPE_MEMORY_IN_GBS= \ -OCI_WORKER_PV_TRANSIT_ENCRYPTION=false \ +OCI_NODE_MACHINE_TYPE=BM.Standard2.52 \ +OCI_NODE_MACHINE_TYPE_OCPUS=52 \ +OCI_NODE_PV_TRANSIT_ENCRYPTION=false \ CONTROL_PLANE_MACHINE_COUNT=1 \ KUBERNETES_VERSION=v1.20.10 \ NAMESPACE=default \ diff --git a/scripts/ci-conformance.sh b/scripts/ci-conformance.sh index a66e962e8..6a9e8f23f 100755 --- a/scripts/ci-conformance.sh +++ b/scripts/ci-conformance.sh @@ -27,12 +27,10 @@ export TAG="${defaultTag:-dev}" export GINKGO_NODES=3 export OCI_SSH_KEY="${OCI_SSH_KEY:-""}" -export OCI_CONTROL_PLANE_SHAPE="${OCI_CONTROL_PLANE_SHAPE:-"VM.Standard.E3.Flex"}" -export OCI_CONTROL_PLANE_SHAPE_OCPUS="${OCI_CONTROL_PLANE_SHAPE_OCPUS:-"1"}" -export OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS="${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS:-"16"}" -export OCI_WORKER_SHAPE="${OCI_WORKER_SHAPE:-"VM.Standard.E3.Flex"}" -export OCI_WORKER_SHAPE_OCPUS="${OCI_WORKER_SHAPE_OCPUS:-"1"}" -export OCI_WORKER_SHAPE_MEMORY_IN_GBS="${OCI_WORKER_SHAPE_MEMORY_IN_GBS:-"16"}" +export OCI_CONTROL_PLANE_MACHINE_TYPE="${OCI_CONTROL_PLANE_MACHINE_TYPE:-"VM.Standard.E3.Flex"}" +export OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS="${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS:-"1"}" +export OCI_NODE_MACHINE_TYPE="${OCI_NODE_MACHINE_TYPE:-"VM.Standard.E3.Flex"}" +export OCI_NODE_MACHINE_TYPE_OCPUS="${OCI_NODE_MACHINE_TYPE_OCPUS:-"1"}" export KIND_EXPERIMENTAL_DOCKER_NETWORK="bridge" # Generate SSH key. diff --git a/scripts/ci-e2e.sh b/scripts/ci-e2e.sh index b4f2e58b9..dec20e27c 100755 --- a/scripts/ci-e2e.sh +++ b/scripts/ci-e2e.sh @@ -31,12 +31,10 @@ export TAG="${defaultTag:-dev}" export GINKGO_NODES=3 export OCI_SSH_KEY="${OCI_SSH_KEY:-""}" -export OCI_CONTROL_PLANE_SHAPE="${OCI_CONTROL_PLANE_SHAPE:-"VM.Standard.E3.Flex"}" -export OCI_CONTROL_PLANE_SHAPE_OCPUS="${OCI_CONTROL_PLANE_SHAPE_OCPUS:-"1"}" -export OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS="${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS:-"16"}" -export OCI_WORKER_SHAPE="${OCI_WORKER_SHAPE:-"VM.Standard.E3.Flex"}" -export OCI_WORKER_SHAPE_OCPUS="${OCI_WORKER_SHAPE_OCPUS:-"1"}" -export OCI_WORKER_SHAPE_MEMORY_IN_GBS="${OCI_WORKER_SHAPE_MEMORY_IN_GBS:-"16"}" +export OCI_CONTROL_PLANE_MACHINE_TYPE="${OCI_CONTROL_PLANE_MACHINE_TYPE:-"VM.Standard.E3.Flex"}" +export OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS="${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS:-"1"}" +export OCI_NODE_MACHINE_TYPE="${OCI_NODE_MACHINE_TYPE:-"VM.Standard.E3.Flex"}" +export OCI_NODE_MACHINE_TYPE_OCPUS="${OCI_NODE_MACHINE_TYPE_OCPUS:-"1"}" export KIND_EXPERIMENTAL_DOCKER_NETWORK="bridge" # Generate SSH key. diff --git a/templates/cluster-template-antrea.yaml b/templates/cluster-template-antrea.yaml index 581bda470..716f2c71e 100644 --- a/templates/cluster-template-antrea.yaml +++ b/templates/cluster-template-antrea.yaml @@ -294,10 +294,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true} @@ -311,10 +310,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true} @@ -338,7 +336,7 @@ metadata: name: "${CLUSTER_NAME}-md-0" spec: clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} + replicas: ${NODE_MACHINE_COUNT} selector: matchLabels: template: diff --git a/templates/cluster-template-arm-free-tier.yaml b/templates/cluster-template-arm-free-tier.yaml index dbb8228a2..ac082d506 100644 --- a/templates/cluster-template-arm-free-tier.yaml +++ b/templates/cluster-template-arm-free-tier.yaml @@ -102,12 +102,11 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}" networkDetails: assignPublicIp: true shapeConfig: - ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" IsPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true} @@ -121,12 +120,11 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}" networkDetails: assignPublicIp: true shapeConfig: - ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" IsPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true} @@ -153,7 +151,7 @@ metadata: name: "${CLUSTER_NAME}-md-0" spec: clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} + replicas: ${NODE_MACHINE_COUNT} selector: matchLabels: template: diff --git a/templates/cluster-template-failure-domain-spread.yaml b/templates/cluster-template-failure-domain-spread.yaml index 82a23c551..fe4974bc1 100644 --- a/templates/cluster-template-failure-domain-spread.yaml +++ b/templates/cluster-template-failure-domain-spread.yaml @@ -80,10 +80,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true} @@ -97,10 +96,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true} @@ -124,7 +122,7 @@ metadata: name: "${CLUSTER_NAME}-fd-1-md-0" spec: clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} + replicas: ${NODE_MACHINE_COUNT} selector: matchLabels: template: @@ -148,7 +146,7 @@ metadata: name: "${CLUSTER_NAME}-fd-2-md-0" spec: clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} + replicas: ${NODE_MACHINE_COUNT} selector: matchLabels: template: @@ -172,7 +170,7 @@ metadata: name: "${CLUSTER_NAME}-fd-3-md-0" spec: clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} + replicas: ${NODE_MACHINE_COUNT} selector: matchLabels: template: diff --git a/templates/cluster-template-oci-addons.yaml b/templates/cluster-template-oci-addons.yaml index 22678856e..250ca114e 100644 --- a/templates/cluster-template-oci-addons.yaml +++ b/templates/cluster-template-oci-addons.yaml @@ -80,10 +80,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true} @@ -97,10 +96,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true} @@ -124,7 +122,7 @@ metadata: name: "${CLUSTER_NAME}-md-0" spec: clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} + replicas: ${NODE_MACHINE_COUNT} selector: matchLabels: template: diff --git a/templates/cluster-template-oraclelinux.yaml b/templates/cluster-template-oraclelinux.yaml index 9fd713ca0..70a0d1a3c 100644 --- a/templates/cluster-template-oraclelinux.yaml +++ b/templates/cluster-template-oraclelinux.yaml @@ -82,10 +82,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true} @@ -99,10 +98,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true} @@ -129,7 +127,7 @@ metadata: name: "${CLUSTER_NAME}-md-0" spec: clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} + replicas: ${NODE_MACHINE_COUNT} selector: matchLabels: template: diff --git a/templates/cluster-template.yaml b/templates/cluster-template.yaml index 7976a1c01..63c26e4f6 100644 --- a/templates/cluster-template.yaml +++ b/templates/cluster-template.yaml @@ -80,10 +80,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_CONTROL_PLANE_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_CONTROL_PLANE_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_CONTROL_PLANE_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_CONTROL_PLANE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_CONTROL_PLANE_PV_TRANSIT_ENCRYPTION=true} @@ -97,10 +96,9 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_WORKER_SHAPE=VM.Standard.E4.Flex}" + shape: "${OCI_NODE_MACHINE_TYPE=VM.Standard.E4.Flex}" shapeConfig: - ocpus: "${OCI_WORKER_SHAPE_OCPUS=1}" - memoryInGBs: "${OCI_WORKER_SHAPE_MEMORY_IN_GBS=16}" + ocpus: "${OCI_NODE_MACHINE_TYPE_OCPUS=1}" metadata: ssh_authorized_keys: "${OCI_SSH_KEY}" isPvEncryptionInTransitEnabled: ${OCI_NODE_PV_TRANSIT_ENCRYPTION=true} @@ -124,7 +122,7 @@ metadata: name: "${CLUSTER_NAME}-md-0" spec: clusterName: "${CLUSTER_NAME}" - replicas: ${WORKER_MACHINE_COUNT} + replicas: ${NODE_MACHINE_COUNT} selector: matchLabels: template: diff --git a/test/e2e/data/infrastructure-oci/v1beta1/bases/cluster.yaml b/test/e2e/data/infrastructure-oci/v1beta1/bases/cluster.yaml index 685b7bb53..0d8193006 100644 --- a/test/e2e/data/infrastructure-oci/v1beta1/bases/cluster.yaml +++ b/test/e2e/data/infrastructure-oci/v1beta1/bases/cluster.yaml @@ -81,7 +81,7 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_CONTROL_PLANE_SHAPE}" + shape: "${OCI_CONTROL_PLANE_MACHINE_TYPE}" shapeConfig: ocpus: "1" metadata: diff --git a/test/e2e/data/infrastructure-oci/v1beta1/bases/md.yaml b/test/e2e/data/infrastructure-oci/v1beta1/bases/md.yaml index 1bb63f33d..284cb8342 100644 --- a/test/e2e/data/infrastructure-oci/v1beta1/bases/md.yaml +++ b/test/e2e/data/infrastructure-oci/v1beta1/bases/md.yaml @@ -7,7 +7,7 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_WORKER_SHAPE}" + shape: "${OCI_NODE_MACHINE_TYPE}" shapeConfig: ocpus: "1" metadata: diff --git a/test/e2e/data/infrastructure-oci/v1beta1/cluster-template-multiple-node-nsg/md.yaml b/test/e2e/data/infrastructure-oci/v1beta1/cluster-template-multiple-node-nsg/md.yaml index 14a3a092a..4ffa15bd7 100644 --- a/test/e2e/data/infrastructure-oci/v1beta1/cluster-template-multiple-node-nsg/md.yaml +++ b/test/e2e/data/infrastructure-oci/v1beta1/cluster-template-multiple-node-nsg/md.yaml @@ -7,7 +7,7 @@ spec: spec: imageId: "${OCI_IMAGE_ID}" compartmentId: "${OCI_COMPARTMENT_ID}" - shape: "${OCI_WORKER_SHAPE}" + shape: "${OCI_NODE_MACHINE_TYPE}" subnetName: "worker-subnet-2" nsgName: "worker-nsg-2" shapeConfig: diff --git a/test/e2e/upgrade_test.go b/test/e2e/upgrade_test.go index 0911a8e01..53314b664 100644 --- a/test/e2e/upgrade_test.go +++ b/test/e2e/upgrade_test.go @@ -188,7 +188,7 @@ func makeOCIMachineTemplate(namespace, name string) *infrastructurev1beta1.OCIMa Template: infrastructurev1beta1.OCIMachineTemplateResource{ Spec: infrastructurev1beta1.OCIMachineSpec{ ImageId: os.Getenv("OCI_UPGRADE_IMAGE_ID"), - Shape: os.Getenv("OCI_WORKER_SHAPE"), + Shape: os.Getenv("OCI_NODE_MACHINE_TYPE"), ShapeConfig: infrastructurev1beta1.ShapeConfig{ Ocpus: "1", },