Skip to content

Commit

Permalink
Manifests update, compatibility matrix update and use of leases for o…
Browse files Browse the repository at this point in the history
…ci-ccm
  • Loading branch information
l-technicore committed Aug 29, 2022
1 parent 56ad332 commit 007ffbd
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 11 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ cloud-provider specific code out of the Kubernetes codebase.
| v1.19.12 | v1.19 | v1.21 |
| v1.22.0 | v1.22 | - |
| v1.23.0 | v1.23 | - |
| v1.24.0 | v1.24 | - |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ rules:
verbs:
- create

- apiGroups:
- "coordination.k8s.io"
resources:
- leases
verbs:
- get
- create
- update
- delete
- patch
- watch

- apiGroups:
- ""
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ spec:
serviceAccountName: cloud-controller-manager
hostNetwork: true
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
Expand All @@ -44,7 +47,7 @@ spec:
args:
- --cloud-config=/etc/oci/cloud-provider.yaml
- --cloud-provider=oci
- --leader-elect-resource-lock=configmaps
- --leader-elect-resource-lock=configmapsleases
- --v=2
volumeMounts:
- name: cfg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ spec:
role: csi-oci
spec:
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
containers:
- name: csi-volume-provisioner
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.1.0
image: k8s.gcr.io/sig-storage/csi-provisioner:v3.2.1
args:
- --csi-address=/var/run/shared-tmpfs/csi.sock
- --volume-name-prefix=csi
Expand All @@ -37,7 +37,7 @@ spec:
- mountPath: /var/run/shared-tmpfs
name: shared-tmpfs
- name: csi-attacher
image: k8s.gcr.io/sig-storage/csi-attacher:v3.4.0
image: k8s.gcr.io/sig-storage/csi-attacher:v3.5.0
args:
- --csi-address=/var/run/shared-tmpfs/csi.sock
- --timeout=120s
Expand All @@ -50,7 +50,7 @@ spec:
- mountPath: /var/run/shared-tmpfs
name: shared-tmpfs
- name: csi-resizer
image: k8s.gcr.io/sig-storage/csi-resizer:v1.4.0
image: k8s.gcr.io/sig-storage/csi-resizer:v1.5.0
args:
- --csi-address=/var/run/shared-tmpfs/csi.sock
- --leader-election
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ spec:
args:
- --csi-address=/csi/csi.sock
- --kubelet-registration-path=/var/lib/kubelet/plugins/blockvolume.csi.oraclecloud.com/csi.sock
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.0
image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.5.1
securityContext:
privileged: true
lifecycle:
Expand Down
5 changes: 4 additions & 1 deletion manifests/flexvolume-driver/oci-flexvolume-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ spec:
spec:
serviceAccountName: oci-flexvolume-driver
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
Expand Down
3 changes: 3 additions & 0 deletions manifests/volume-provisioner/oci-volume-provisioner-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ rules:
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get", "watch", "create", "update"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "create", "update", "patch", "delete"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
1 change: 0 additions & 1 deletion pkg/cloudprovider/providers/oci/load_balancer_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const (
NLBHealthCheckIntervalMax = 1800000
)

// TODO : Read this value from the oci-go-sdk project - JIRA : OKE-21772
const ProtocolTypeMixed = "TCP_AND_UDP"

const (
Expand Down
1 change: 0 additions & 1 deletion pkg/csi/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,6 @@ func (d *ControllerDriver) ControllerUnpublishVolume(ctx context.Context, req *c
if err != nil {
if apierrors.IsNotFound(err) {
log.Infof("Node with nodeID %s is not found, volume is likely already detached", req.NodeId)
// https://jira.oci.oraclecorp.com/browse/OKE-13873 : Cleanup of dangling volumeAttachments is deferred.
csiMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType)
dimensionsMap[metrics.ComponentDimension] = csiMetricDimension
metrics.SendMetricData(d.metricPusher, metrics.PVDetach, time.Since(startTime).Seconds(), dimensionsMap)
Expand Down
1 change: 0 additions & 1 deletion pkg/flexvolume/block/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ func (d OCIFlexvolumeDriver) Detach(logger *zap.SugaredLogger, pvOrVolumeName, n
compartmentID, err := util.LookupNodeCompartment(d.K, nodeName)
if err != nil {
if apierrors.IsNotFound(err) {
// https://jira.oci.oraclecorp.com/browse/OKE-14168 : Volume detachment is deferred
logger.Info("Node is not found, volume is likely already detached.")
fvdMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.FVDStorageType)
dimensionsMap[metrics.ComponentDimension] = fvdMetricDimension
Expand Down

0 comments on commit 007ffbd

Please sign in to comment.