Skip to content

Commit

Permalink
changed patch to update
Browse files Browse the repository at this point in the history
  • Loading branch information
koin612 committed Mar 11, 2021
1 parent 0bb776a commit 3a7e456
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions ldp/local-directory-provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -226,16 +225,19 @@ func (p *cephFSProvisioner) PlaceOnLocalNode(ctx context.Context, oldClaim *v1.P
if len(patchBytes) > 0 {
}

_, err := p.client.CoreV1().PersistentVolumeClaims(claim.Namespace).Patch(
_, err := p.client.CoreV1().PersistentVolumeClaims(claim.Namespace).Update(
ctx,
claim.Name,
types.StrategicMergePatchType,
patchBytes,
metav1.PatchOptions{})
claim,
//claim.Name,
//types.StrategicMergePatchType,
//patchBytes,
//metav1.PatchOptions{})
metav1.UpdateOptions{})

glog.Infof("patch bytes: %s", string(patchBytes))

glog.Infof("I %s claimed claim %s", p.nodeName, claim.Name)
if err != nil {
glog.Infof("I %s claimed claim %s", p.nodeName, claim.Name)
}

return err
}
Expand Down

0 comments on commit 3a7e456

Please sign in to comment.