mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 01:23:48 +00:00
sched: adjust events to register for VolumeBinding plugin
This commit is contained in:
@@ -285,6 +285,17 @@ func (p *PodWrapper) HostPort(port int32) *PodWrapper {
|
||||
return p
|
||||
}
|
||||
|
||||
// PVC creates a Volume with a PVC and injects into the inner pod.
|
||||
func (p *PodWrapper) PVC(name string) *PodWrapper {
|
||||
p.Spec.Volumes = append(p.Spec.Volumes, v1.Volume{
|
||||
Name: name,
|
||||
VolumeSource: v1.VolumeSource{
|
||||
PersistentVolumeClaim: &v1.PersistentVolumeClaimVolumeSource{ClaimName: name},
|
||||
},
|
||||
})
|
||||
return p
|
||||
}
|
||||
|
||||
// PodAffinityKind represents different kinds of PodAffinity.
|
||||
type PodAffinityKind int
|
||||
|
||||
|
Reference in New Issue
Block a user