mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
use dedent for create_quota.go
This commit is contained in:
parent
63905492f0
commit
eaf257a993
@ -20,21 +20,23 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
|
"github.com/renstrom/dedent"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"k8s.io/kubernetes/pkg/kubectl"
|
"k8s.io/kubernetes/pkg/kubectl"
|
||||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
var (
|
||||||
quotaLong = `
|
quotaLong = dedent.Dedent(`
|
||||||
Create a resourcequota with the specified name, hard limits and optional scopes`
|
Create a resourcequota with the specified name, hard limits and optional scopes`)
|
||||||
|
|
||||||
quotaExample = ` // Create a new resourcequota named my-quota
|
quotaExample = dedent.Dedent(`
|
||||||
|
// Create a new resourcequota named my-quota
|
||||||
$ kubectl create quota my-quota --hard=cpu=1,memory=1G,pods=2,services=3,replicationcontrollers=2,resourcequotas=1,secrets=5,persistentvolumeclaims=10
|
$ kubectl create quota my-quota --hard=cpu=1,memory=1G,pods=2,services=3,replicationcontrollers=2,resourcequotas=1,secrets=5,persistentvolumeclaims=10
|
||||||
|
|
||||||
// Create a new resourcequota named best-effort
|
// Create a new resourcequota named best-effort
|
||||||
$ kubectl create quota best-effort --hard=pods=100 --scopes=BestEffort`
|
$ kubectl create quota best-effort --hard=pods=100 --scopes=BestEffort`)
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewCmdCreateQuota is a macro command to create a new quota
|
// NewCmdCreateQuota is a macro command to create a new quota
|
||||||
|
Loading…
Reference in New Issue
Block a user