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

Commit

Permalink
Merge pull request #764 from MikaelSmith/resource-request
Browse files Browse the repository at this point in the history
Add resource request for created pod when viewing pvcs
  • Loading branch information
ekinanp authored Mar 31, 2020
2 parents d51c1f4 + 4d31eb2 commit 394e6df
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 394e6df

Please sign in to comment.