Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Add resource request for created pod when viewing pvcs #764

Merged
merged 1 commit into from
Mar 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plugin/kubernetes/pvc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/puppetlabs/wash/plugin"
"github.com/puppetlabs/wash/volume"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/watch"
typedv1 "k8s.io/client-go/kubernetes/typed/core/v1"
Expand Down Expand Up @@ -80,6 +81,12 @@ func (v *pvc) createPod(cmd []string) (string, error) {
Name: "busybox",
Image: "busybox",
Args: cmd,
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("1m"),
corev1.ResourceMemory: resource.MustParse("10Mi"),
},
},
VolumeMounts: []corev1.VolumeMount{
{
Name: v.Name(),
Expand Down