Skip to content

Commit 6aa6f02

Browse files
committed
Enable IMDS to avoid specifying OCI_REGION_METADATA
1 parent 9c9cdce commit 6aa6f02

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cluster-autoscaler/cloudprovider/oci/instancepools/oci_cloud_provider.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Copyright 2021-2023 Oracle and/or its affiliates.
55
package instancepools
66

77
import (
8+
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/vendor-internal/github.com/oracle/oci-go-sdk/v65/common"
89
"strings"
910

1011
"github.com/pkg/errors"
@@ -150,6 +151,7 @@ func (ocp *OciCloudProvider) Refresh() error {
150151

151152
// BuildOCI constructs the OciCloudProvider object that implements the could provider interface (InstancePoolManager).
152153
func BuildOCI(opts *coreoptions.AutoscalerOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider {
154+
common.EnableInstanceMetadataServiceLookup()
153155
ocidType, err := ocicommon.GetAllPoolTypes(opts.NodeGroups)
154156
if err != nil {
155157
klog.Fatalf("Failed to get pool type: %v", err)

0 commit comments

Comments
 (0)