diff --git a/cloud/scope/managed_control_plane.go b/cloud/scope/managed_control_plane.go index 666b3261..cfd2aca8 100644 --- a/cloud/scope/managed_control_plane.go +++ b/cloud/scope/managed_control_plane.go @@ -18,6 +18,7 @@ package scope import ( "context" + "encoding/json" "fmt" "io/ioutil" "reflect" @@ -517,7 +518,16 @@ func (s *ManagedControlPlaneScope) UpdateControlPlane(ctx context.Context, okeCl actual := s.getSpecFromActual(okeCluster) if !reflect.DeepEqual(spec, actual) { - s.Logger.Info("Control plane", "spec", common.PointerString(*spec), "actual", common.PointerString(*actual)) + // printing json specs will help debug problems when there are spurious/unwanted updates + jsonSpec, err := json.Marshal(*spec) + if err != nil { + return false, err + } + jsonActual, err := json.Marshal(*actual) + if err != nil { + return false, err + } + s.Logger.Info("Control plane", "spec", jsonSpec, "actual", jsonActual) controlPlaneSpec := s.OCIManagedControlPlane.Spec updateOptions := oke.UpdateClusterOptionsDetails{} if controlPlaneSpec.ClusterOption.AdmissionControllerOptions != nil { @@ -540,7 +550,7 @@ func (s *ManagedControlPlaneScope) UpdateControlPlane(ctx context.Context, okeCl ClusterId: okeCluster.Id, UpdateClusterDetails: details, } - _, err := s.ContainerEngineClient.UpdateCluster(ctx, updateClusterRequest) + _, err = s.ContainerEngineClient.UpdateCluster(ctx, updateClusterRequest) if err != nil { return false, errors.Wrapf(err, "failed to update cluster") } diff --git a/cloud/scope/managed_machine_pool.go b/cloud/scope/managed_machine_pool.go index fe1efb49..caf593a5 100644 --- a/cloud/scope/managed_machine_pool.go +++ b/cloud/scope/managed_machine_pool.go @@ -18,6 +18,7 @@ package scope import ( "context" + "encoding/json" "fmt" "reflect" "sort" @@ -285,7 +286,7 @@ func (m *ManagedMachinePoolScope) CreateNodePool(ctx context.Context) (*oke.Node CompartmentId: common.String(m.OCIManagedCluster.Spec.CompartmentId), ClusterId: m.OCIManagedControlPlane.Spec.ID, Name: common.String(m.OCIManagedMachinePool.Name), - KubernetesVersion: m.MachinePool.Spec.Template.Spec.Version, + KubernetesVersion: m.OCIManagedMachinePool.Spec.Version, NodeShape: common.String(m.OCIManagedMachinePool.Spec.NodeShape), NodeShapeConfig: &nodeShapeConfig, NodeSourceDetails: &sourceDetails, @@ -500,10 +501,18 @@ func (m *ManagedMachinePoolScope) UpdateNodePool(ctx context.Context, pool *oke. actual := m.getSpecFromAPIObject(pool) if !reflect.DeepEqual(spec, actual) || - !reflect.DeepEqual(pool.KubernetesVersion, m.MachinePool.Spec.Template.Spec.Version) || m.OCIManagedMachinePool.Name != *pool.Name { m.Logger.Info("Updating node pool") - m.Logger.Info("Node pool", "spec", common.PointerString(*spec), "actual", common.PointerString(*actual)) + // printing json specs will help debug problems when there are spurious/unwanted updates + jsonSpec, err := json.Marshal(*spec) + if err != nil { + return false, err + } + jsonActual, err := json.Marshal(*actual) + if err != nil { + return false, err + } + m.Logger.Info("Node pool", "spec", jsonSpec, "actual", jsonActual) placementConfig, err := m.buildPlacementConfig(spec.NodePoolNodeConfig.PlacementConfigs) if err != nil { return false, err @@ -559,7 +568,7 @@ func (m *ManagedMachinePoolScope) UpdateNodePool(ctx context.Context, pool *oke. } nodePoolDetails := oke.UpdateNodePoolDetails{ Name: common.String(m.OCIManagedMachinePool.Name), - KubernetesVersion: m.MachinePool.Spec.Template.Spec.Version, + KubernetesVersion: m.OCIManagedMachinePool.Spec.Version, NodeShape: common.String(m.OCIManagedMachinePool.Spec.NodeShape), NodeShapeConfig: &nodeShapeConfig, NodeSourceDetails: &sourceDetails, @@ -602,6 +611,13 @@ func setMachinePoolSpecDefaults(spec *infrav1exp.OCIManagedMachinePoolSpec) { return *configs[i].AvailabilityDomain < *configs[j].AvailabilityDomain }) } + podNetworkOptions := spec.NodePoolNodeConfig.NodePoolPodNetworkOptionDetails + if podNetworkOptions != nil { + if podNetworkOptions.CniType == expinfra1.VCNNativeCNI { + // 31 is the default max pods per node returned by OKE API + spec.NodePoolNodeConfig.NodePoolPodNetworkOptionDetails.VcnIpNativePodNetworkOptions.MaxPodsPerNode = common.Int(31) + } + } } func (m *ManagedMachinePoolScope) getSpecFromAPIObject(pool *oke.NodePool) *expinfra1.OCIManagedMachinePoolSpec { @@ -638,6 +654,7 @@ func (m *ManagedMachinePoolScope) getSpecFromAPIObject(pool *oke.NodePool) *expi InitialNodeLabels: getInitialNodeLabels(pool.InitialNodeLabels), NodeShape: *pool.NodeShape, NodeMetadata: pool.NodeMetadata, + Version: pool.KubernetesVersion, } if pool.NodeEvictionNodePoolSettings != nil { spec.NodeEvictionNodePoolSettings = &expinfra1.NodeEvictionNodePoolSettings{ diff --git a/cloud/scope/managed_machine_pool_test.go b/cloud/scope/managed_machine_pool_test.go index 3f71c3f6..85faf7cf 100644 --- a/cloud/scope/managed_machine_pool_test.go +++ b/cloud/scope/managed_machine_pool_test.go @@ -19,7 +19,6 @@ package scope import ( "context" "fmt" - "reflect" "testing" "github.com/golang/mock/gomock" @@ -138,6 +137,9 @@ func TestManagedMachinePoolCreate(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "test", }, + Spec: infrav1exp.OCIManagedMachinePoolSpec{ + Version: common.String("v1.24.5"), + }, }, OCIManagedCluster: ociManagedCluster, Cluster: &clusterv1.Cluster{ @@ -145,11 +147,6 @@ func TestManagedMachinePoolCreate(t *testing.T) { }, MachinePool: &expclusterv1.MachinePool{ Spec: expclusterv1.MachinePoolSpec{ - Template: clusterv1.MachineTemplateSpec{ - Spec: clusterv1.MachineSpec{ - Version: common.String("v1.24.5"), - }, - }, Replicas: &size, }, }, @@ -177,6 +174,7 @@ func TestManagedMachinePoolCreate(t *testing.T) { testSpecificSetup: func(cs *ManagedMachinePoolScope, okeClient *mock_containerengine.MockClient) { ms.OCIManagedCluster.Spec.OCIResourceIdentifier = "resource_uid" ms.OCIManagedMachinePool.Spec = infrav1exp.OCIManagedMachinePoolSpec{ + Version: common.String("v1.24.5"), NodeMetadata: map[string]string{"key1": "value1"}, InitialNodeLabels: []infrav1exp.KeyValue{{ Key: common.String("key"), @@ -208,7 +206,7 @@ func TestManagedMachinePoolCreate(t *testing.T) { CniType: infrav1exp.VCNNativeCNI, VcnIpNativePodNetworkOptions: infrav1exp.VcnIpNativePodNetworkOptions{ SubnetNames: []string{"pod-subnet"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(25), NSGNames: []string{"pod-nsg"}, }, }, @@ -258,7 +256,7 @@ func TestManagedMachinePoolCreate(t *testing.T) { DefinedTags: definedTagsInterface, NodePoolPodNetworkOptionDetails: oke.OciVcnIpNativeNodePoolPodNetworkOptionDetails{ PodSubnetIds: []string{"pod-subnet-id"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(25), PodNsgIds: []string{"pod-nsg-id"}, }, }, @@ -302,6 +300,7 @@ func TestManagedMachinePoolCreate(t *testing.T) { testSpecificSetup: func(cs *ManagedMachinePoolScope, okeClient *mock_containerengine.MockClient) { ms.OCIManagedCluster.Spec.OCIResourceIdentifier = "resource_uid" ms.OCIManagedMachinePool.Spec = infrav1exp.OCIManagedMachinePoolSpec{ + Version: common.String("v1.24.5"), NodeMetadata: map[string]string{"key1": "value1"}, InitialNodeLabels: []infrav1exp.KeyValue{{ Key: common.String("key"), @@ -565,6 +564,9 @@ func TestManagedMachinePoolUpdate(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "test", }, + Spec: infrav1exp.OCIManagedMachinePoolSpec{ + Version: common.String("v1.24.5"), + }, }, OCIManagedCluster: ociManagedCluster, Cluster: &clusterv1.Cluster{ @@ -572,11 +574,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { }, MachinePool: &expclusterv1.MachinePool{ Spec: expclusterv1.MachinePoolSpec{ - Template: clusterv1.MachineTemplateSpec{ - Spec: clusterv1.MachineSpec{ - Version: common.String("v1.24.5"), - }, - }, + Template: clusterv1.MachineTemplateSpec{}, Replicas: &size, }, }, @@ -605,6 +603,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { testSpecificSetup: func(cs *ManagedMachinePoolScope, okeClient *mock_containerengine.MockClient) { ms.OCIManagedCluster.Spec.OCIResourceIdentifier = "resource_uid" ms.OCIManagedMachinePool.Spec = infrav1exp.OCIManagedMachinePoolSpec{ + Version: common.String("v1.24.5"), NodeMetadata: map[string]string{"key1": "value1"}, InitialNodeLabels: []infrav1exp.KeyValue{{ Key: common.String("key"), @@ -634,9 +633,8 @@ func TestManagedMachinePoolUpdate(t *testing.T) { NodePoolPodNetworkOptionDetails: &infrav1exp.NodePoolPodNetworkOptionDetails{ CniType: infrav1exp.VCNNativeCNI, VcnIpNativePodNetworkOptions: infrav1exp.VcnIpNativePodNetworkOptions{ - SubnetNames: []string{"pod-subnet"}, - MaxPodsPerNode: common.Int(15), - NSGNames: []string{"pod-nsg"}, + SubnetNames: []string{"pod-subnet"}, + NSGNames: []string{"pod-nsg"}, }, }, }, @@ -684,7 +682,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { DefinedTags: definedTagsInterface, NodePoolPodNetworkOptionDetails: oke.OciVcnIpNativeNodePoolPodNetworkOptionDetails{ PodSubnetIds: []string{"pod-subnet-id"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), PodNsgIds: []string{"pod-nsg-id"}, }, }, @@ -700,6 +698,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { testSpecificSetup: func(cs *ManagedMachinePoolScope, okeClient *mock_containerengine.MockClient) { ms.OCIManagedCluster.Spec.OCIResourceIdentifier = "resource_uid" ms.OCIManagedMachinePool.Spec = infrav1exp.OCIManagedMachinePoolSpec{ + Version: common.String("v1.24.5"), ID: common.String("node-pool-id"), NodeMetadata: map[string]string{"key1": "value1"}, InitialNodeLabels: []infrav1exp.KeyValue{{ @@ -731,7 +730,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { CniType: infrav1exp.VCNNativeCNI, VcnIpNativePodNetworkOptions: infrav1exp.VcnIpNativePodNetworkOptions{ SubnetNames: []string{"pod-subnet"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), NSGNames: []string{"pod-nsg"}, }, }, @@ -775,7 +774,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { IsPvEncryptionInTransitEnabled: common.Bool(true), NodePoolPodNetworkOptionDetails: oke.OciVcnIpNativeNodePoolPodNetworkOptionDetails{ PodSubnetIds: []string{"pod-subnet-id"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), PodNsgIds: []string{"pod-nsg-id"}, }, }, @@ -828,7 +827,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { DefinedTags: definedTagsInterface, NodePoolPodNetworkOptionDetails: oke.OciVcnIpNativeNodePoolPodNetworkOptionDetails{ PodSubnetIds: []string{"pod-subnet-id"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), PodNsgIds: []string{"pod-nsg-id"}, }, }, @@ -844,6 +843,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { testSpecificSetup: func(cs *ManagedMachinePoolScope, okeClient *mock_containerengine.MockClient) { ms.OCIManagedCluster.Spec.OCIResourceIdentifier = "resource_uid" ms.OCIManagedMachinePool.Spec = infrav1exp.OCIManagedMachinePoolSpec{ + Version: common.String("v1.24.5"), ID: common.String("node-pool-id"), NodeMetadata: map[string]string{"key1": "value1"}, InitialNodeLabels: []infrav1exp.KeyValue{{ @@ -875,7 +875,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { CniType: infrav1exp.VCNNativeCNI, VcnIpNativePodNetworkOptions: infrav1exp.VcnIpNativePodNetworkOptions{ SubnetNames: []string{"pod-subnet"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), NSGNames: []string{"pod-nsg"}, }, }, @@ -919,7 +919,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { IsPvEncryptionInTransitEnabled: common.Bool(true), NodePoolPodNetworkOptionDetails: oke.OciVcnIpNativeNodePoolPodNetworkOptionDetails{ PodSubnetIds: []string{"pod-subnet-id"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), PodNsgIds: []string{"pod-nsg-id"}, }, }, @@ -989,6 +989,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { ms.OCIManagedCluster.Spec.OCIResourceIdentifier = "resource_uid" ms.OCIManagedMachinePool.Name = "changed" ms.OCIManagedMachinePool.Spec = infrav1exp.OCIManagedMachinePoolSpec{ + Version: common.String("v1.24.5"), ID: common.String("node-pool-id"), NodeMetadata: map[string]string{"key1": "value1"}, InitialNodeLabels: []infrav1exp.KeyValue{{ @@ -1020,7 +1021,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { CniType: infrav1exp.VCNNativeCNI, VcnIpNativePodNetworkOptions: infrav1exp.VcnIpNativePodNetworkOptions{ SubnetNames: []string{"pod-subnet"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), NSGNames: []string{"pod-nsg"}, }, }, @@ -1064,7 +1065,7 @@ func TestManagedMachinePoolUpdate(t *testing.T) { IsPvEncryptionInTransitEnabled: common.Bool(true), NodePoolPodNetworkOptionDetails: oke.OciVcnIpNativeNodePoolPodNetworkOptionDetails{ PodSubnetIds: []string{"pod-subnet-id"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), PodNsgIds: []string{"pod-nsg-id"}, }, }, @@ -1149,35 +1150,3 @@ func TestManagedMachinePoolUpdate(t *testing.T) { }) } } - -func allMatcher(request interface{}, request2 oke.CreateNodePoolRequest) error { - r, ok := request.(oke.CreateNodePoolRequest) - if !ok { - return errors.New("expecting LaunchInstanceRequest type") - } - if !reflect.DeepEqual(r.NodeEvictionNodePoolSettings, request2.NodeEvictionNodePoolSettings) { - return errors.New(fmt.Sprintf("node eviction mismatch")) - } - if !reflect.DeepEqual(r.NodeShapeConfig, request2.NodeShapeConfig) { - return errors.New(fmt.Sprintf("node shape mismatch")) - } - if !reflect.DeepEqual(r.NodeConfigDetails.DefinedTags, request2.NodeConfigDetails.DefinedTags) { - return errors.New(fmt.Sprintf("node shape mismatch")) - } - if !reflect.DeepEqual(r.NodeConfigDetails.Size, request2.NodeConfigDetails.Size) { - return errors.New(fmt.Sprintf("node shape mismatch")) - } - if !reflect.DeepEqual(r.NodeConfigDetails.PlacementConfigs, request2.NodeConfigDetails.PlacementConfigs) { - return errors.New(fmt.Sprintf("node shape mismatch")) - } - if !reflect.DeepEqual(r.NodeConfigDetails.FreeformTags, request2.NodeConfigDetails.FreeformTags) { - return errors.New(fmt.Sprintf("node shape mismatch")) - } - if !reflect.DeepEqual(r.NodeConfigDetails.NodePoolPodNetworkOptionDetails, request2.NodeConfigDetails.NodePoolPodNetworkOptionDetails) { - return errors.New(fmt.Sprintf("node shape mismatch")) - } - if !reflect.DeepEqual(r.NodeConfigDetails.NsgIds, request2.NodeConfigDetails.NsgIds) { - return errors.New(fmt.Sprintf("node shape mismatch")) - } - return nil -} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepools.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepools.yaml index fe632989..639431d2 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepools.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepools.yaml @@ -205,6 +205,9 @@ spec: description: SshPublicKey defines the SSH public key on each node in the node pool on launch. type: string + version: + description: Version represents the version of the OKE node pool. + type: string type: object status: description: OCIManagedMachinePoolStatus defines the observed state of diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepooltemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepooltemplates.yaml index a4063dcc..1dc32b01 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepooltemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_ocimanagedmachinepooltemplates.yaml @@ -222,6 +222,10 @@ spec: description: SshPublicKey defines the SSH public key on each node in the node pool on launch. type: string + version: + description: Version represents the version of the OKE node + pool. + type: string type: object required: - spec diff --git a/exp/api/v1beta1/ocimanagedmachinepool_types.go b/exp/api/v1beta1/ocimanagedmachinepool_types.go index de4bb0a3..3fe214b0 100644 --- a/exp/api/v1beta1/ocimanagedmachinepool_types.go +++ b/exp/api/v1beta1/ocimanagedmachinepool_types.go @@ -21,6 +21,9 @@ type OCIManagedMachinePoolSpec struct { // +optional ProviderID *string `json:"providerID,omitempty"` + // Version represents the version of the OKE node pool. + Version *string `json:"version,omitempty"` + // ID is the OCID of the associated NodePool // +optional ID *string `json:"id,omitempty"` diff --git a/exp/api/v1beta1/zz_generated.deepcopy.go b/exp/api/v1beta1/zz_generated.deepcopy.go index c63ed3a0..822a4dc1 100644 --- a/exp/api/v1beta1/zz_generated.deepcopy.go +++ b/exp/api/v1beta1/zz_generated.deepcopy.go @@ -1037,6 +1037,11 @@ func (in *OCIManagedMachinePoolSpec) DeepCopyInto(out *OCIManagedMachinePoolSpec *out = new(string) **out = **in } + if in.Version != nil { + in, out := &in.Version, &out.Version + *out = new(string) + **out = **in + } if in.ID != nil { in, out := &in.ID, &out.ID *out = new(string) diff --git a/exp/controllers/ocimanaged_machinepool_controller_test.go b/exp/controllers/ocimanaged_machinepool_controller_test.go index cb2d6479..4c87d2fe 100644 --- a/exp/controllers/ocimanaged_machinepool_controller_test.go +++ b/exp/controllers/ocimanaged_machinepool_controller_test.go @@ -245,7 +245,7 @@ func TestNormalReconciliationFunction(t *testing.T) { }, }, { - name: "node pool in created, no update", + name: "node pool is created, no update", errorExpected: false, conditionAssertion: []conditionAssertion{{infrav1exp.NodePoolReadyCondition, corev1.ConditionTrue, "", ""}}, testSpecificSetup: func(machinePoolScope *scope.ManagedMachinePoolScope, okeClient *mock_containerengine.MockClient) { @@ -291,7 +291,7 @@ func TestNormalReconciliationFunction(t *testing.T) { FreeformTags: tags, NodePoolPodNetworkOptionDetails: oke.OciVcnIpNativeNodePoolPodNetworkOptionDetails{ PodSubnetIds: []string{"pod-subnet-id"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), PodNsgIds: []string{"pod-nsg-id"}, }, }, @@ -350,7 +350,7 @@ func TestNormalReconciliationFunction(t *testing.T) { FreeformTags: tags, NodePoolPodNetworkOptionDetails: oke.OciVcnIpNativeNodePoolPodNetworkOptionDetails{ PodSubnetIds: []string{"pod-subnet-id"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), PodNsgIds: []string{"pod-nsg-id"}, }, }, @@ -633,6 +633,7 @@ func getOCIManagedMachinePool() *infrav1exp.OCIManagedMachinePool { Key: common.String("key"), Value: common.String("value"), }}, + Version: common.String("v1.24.5"), NodeShape: "test-shape", NodeShapeConfig: &infrav1exp.NodeShapeConfig{ Ocpus: common.String("2"), @@ -658,7 +659,7 @@ func getOCIManagedMachinePool() *infrav1exp.OCIManagedMachinePool { CniType: infrav1exp.VCNNativeCNI, VcnIpNativePodNetworkOptions: infrav1exp.VcnIpNativePodNetworkOptions{ SubnetNames: []string{"pod-subnet"}, - MaxPodsPerNode: common.Int(15), + MaxPodsPerNode: common.Int(31), NSGNames: []string{"pod-nsg"}, }, }, @@ -680,11 +681,7 @@ func getMachinePool() *expclusterv1.MachinePool { }, Spec: expclusterv1.MachinePoolSpec{ Replicas: &replicas, - Template: clusterv1.MachineTemplateSpec{ - Spec: clusterv1.MachineSpec{ - Version: common.String("v1.24.5"), - }, - }, + Template: clusterv1.MachineTemplateSpec{}, }, } return machinePool diff --git a/templates/cluster-template-managed-private.yaml b/templates/cluster-template-managed-private.yaml index c605a20d..359b8f24 100644 --- a/templates/cluster-template-managed-private.yaml +++ b/templates/cluster-template-managed-private.yaml @@ -78,8 +78,13 @@ metadata: name: ${CLUSTER_NAME}-mp-0 namespace: default spec: + version: "${KUBERNETES_VERSION}" nodeShape: "${OCI_MANAGED_NODE_SHAPE}" sshPublicKey: "${OCI_SSH_KEY}" nodeSourceViaImage: - imageId: "${OCI_MANAGED_NODE_IMAGED_ID}" + imageId: "${OCI_MANAGED_NODE_IMAGE_ID}" + bootVolumeSizeInGBs: ${OCI_MANAGED_NODE_BOOT_VOLUME_SIZE=50} + nodeShapeConfig: + memoryInGBs: "${OCI_MANAGED_NODE_MACHINE_MEMORY=16}" + ocpus: "${OCI_MANAGED_NODE_MACHINE_TYPE_OCPUS=1}" --- \ No newline at end of file diff --git a/templates/cluster-template-managed.yaml b/templates/cluster-template-managed.yaml index b47ae405..ad6c4567 100644 --- a/templates/cluster-template-managed.yaml +++ b/templates/cluster-template-managed.yaml @@ -59,6 +59,7 @@ metadata: name: ${CLUSTER_NAME}-mp-0 namespace: default spec: + version: "${KUBERNETES_VERSION}" nodeShape: "${OCI_MANAGED_NODE_SHAPE}" sshPublicKey: "${OCI_SSH_KEY}" nodeSourceViaImage: