# Functions
No description provided by the author
create lvm volume.
deleteVolume deletes the directory for the hostpath volume.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
func UpdatePVForNodeAffinity(ctx context.Context, volumeID string, nodename string) error {
pv := GetPV(ctx, volumeID)
if pv == nil {
return fmt.Errorf("cant got pv for setnodeaddress")
}
var terms []v1.NodeSelectorTerm
var expressions []v1.NodeSelectorRequirement
expressions = append(expressions, v1.NodeSelectorRequirement{
Key: "kubernetes.io/hostname",
Operator: v1.NodeSelectorOpIn,
Values: []string{nodename},
})
terms = append(terms, v1.NodeSelectorTerm{
MatchExpressions: expressions,
})
na := v1.VolumeNodeAffinity{
Required: &v1.NodeSelector{
NodeSelectorTerms: terms,
},
}
_, err := kubeClient.CoreV1().PersistentVolumes().Delete(pv.Name, &metav1.DeleteOptions{})
pv.ResourceVersion=""
pv.Spec.NodeAffinity = &na
_, err := kubeClient.CoreV1().PersistentVolumes().Create(pv)
if err != nil {
log.Errorf("update Node Affir: fail to update pv, err: %v", err)
return err
}
return nil
}
*/.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
****************************.
No description provided by the author
No description provided by the author
No description provided by the author
*********.
No description provided by the author
loadFromSnapshot populates the given destPath with data from the snapshotID.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Run run shell command.
*************.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
LinearType linear type.
NsenterCmd is the nsenter command.
StripingType striping type.