Skip to content

Commit

Permalink
Merge pull request #6968 from jlamillan/jlamillan/update-example-mani…
Browse files Browse the repository at this point in the history
…fests

Update example manifests with the latest RBAC permissions.
  • Loading branch information
k8s-ci-robot committed Jun 25, 2024
2 parents 0f646e0 + 41b6671 commit 6d54cb7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ rules:
resources: ["endpoints"]
resourceNames: ["cluster-autoscaler"]
verbs: ["get", "update"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["watch", "list", "get"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["watch", "list", "get", "patch", "update"]
Expand All @@ -55,7 +58,7 @@ rules:
resources: ["statefulsets", "replicasets", "daemonsets"]
verbs: ["watch", "list", "get"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses", "csinodes"]
resources: ["storageclasses", "csinodes", "csistoragecapacities", "csidrivers"]
verbs: ["watch", "list", "get"]
- apiGroups: ["batch", "extensions"]
resources: ["jobs"]
Expand Down Expand Up @@ -158,6 +161,8 @@ spec:
env:
- name: OCI_USE_INSTANCE_PRINCIPAL
value: "false"
- name: OCI_SDK_APPEND_USER_AGENT
value: "oci-oke-cluster-autoscaler"
volumeMounts:
- name: oci-config-vol
mountPath: "/root/.oci"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ rules:
resources: ["endpoints"]
resourceNames: ["cluster-autoscaler"]
verbs: ["get", "update"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["watch", "list", "get"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["watch", "list", "get", "patch", "update"]
Expand All @@ -55,7 +58,7 @@ rules:
resources: ["statefulsets", "replicasets", "daemonsets"]
verbs: ["watch", "list", "get"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses", "csinodes"]
resources: ["storageclasses", "csinodes", "csistoragecapacities", "csidrivers"]
verbs: ["watch", "list", "get"]
- apiGroups: ["batch", "extensions"]
resources: ["jobs"]
Expand Down Expand Up @@ -158,3 +161,5 @@ spec:
env:
- name: OCI_USE_INSTANCE_PRINCIPAL
value: "true"
- name: OCI_SDK_APPEND_USER_AGENT
value: "oci-oke-cluster-autoscaler"
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ rules:
resources: ["endpoints"]
resourceNames: ["cluster-autoscaler"]
verbs: ["get", "update"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["watch", "list", "get"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["watch", "list", "get", "patch", "update"]
Expand All @@ -50,7 +53,7 @@ rules:
resources: ["statefulsets", "replicasets", "daemonsets"]
verbs: ["watch", "list", "get"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses", "csinodes"]
resources: ["storageclasses", "csinodes", "csistoragecapacities", "csidrivers"]
verbs: ["watch", "list", "get"]
- apiGroups: ["batch", "extensions"]
resources: ["jobs"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package instancepools

import (
"fmt"
npconsts "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/nodepools/consts"
"os"
"strconv"
"strings"
Expand Down Expand Up @@ -88,7 +89,7 @@ func CreateInstancePoolManager(cloudConfigPath string, discoveryOpts cloudprovid
return nil, err
}
// try instance principal is set to true
} else if os.Getenv(consts.OciUseInstancePrincipalEnvVar) == "true" {
} else if os.Getenv(consts.OciUseInstancePrincipalEnvVar) == "true" || os.Getenv(npconsts.OkeUseInstancePrincipalEnvVar) == "true" {
klog.V(4).Info("using instance principals...")
configProvider, err = auth.InstancePrincipalConfigurationProvider()
if err != nil {
Expand Down

0 comments on commit 6d54cb7

Please sign in to comment.