Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Commit

Permalink
fix(provison): add isPatch into http req header (#93)
Browse files Browse the repository at this point in the history
This commit add isPatch key into header, used for filtering the RunTask to get executed only for provisioner's read request.

Signed-off-by: Utkarsh Mani Tripathi <[email protected]>
  • Loading branch information
utkarshmani1997 authored and Amit Kumar Das committed May 10, 2019
1 parent ed4e1d9 commit a3cdb97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openebs/pkg/apis/openebs.io/v1alpha1/cas_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ const (
// PersistentVolumeClaimKey is the key to fetch name of PersistentVolumeClaim
PersistentVolumeClaimKey CASKey = "openebs.io/persistentvolumeclaim"

// IsPatchJivaReplicaNodeAffinityHeader is the key to fetch value of IsPatchKey
// Its value is "Enable".
IsPatchJivaReplicaNodeAffinityHeader CASKey = "Is-Patch-Jiva-Replica-Node-Affinity"

// StorageClassKey is the key to fetch name of StorageClass
StorageClassKey CASKey = "openebs.io/storageclass"

Expand Down
1 change: 1 addition & 0 deletions openebs/pkg/volume/v1alpha1/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func (v CASVolume) ReadVolume(vname, namespace, storageclass string, obj interfa
// passing storageclass info as a request header which will extracted by the
// Maya-apiserver to get the CAS template name
req.Header.Set(string(v1alpha1.StorageClassHeaderKey), storageclass)
req.Header.Set(string(v1alpha1.IsPatchJivaReplicaNodeAffinityHeader), "enabled")

c := &http.Client{
Timeout: timeout,
Expand Down

0 comments on commit a3cdb97

Please sign in to comment.