Merge branch 'master' of github.com-derailed:derailed/k9s
commit
afd7bf74c1
|
|
@ -14,4 +14,5 @@ popeye1.go
|
|||
gen.sh
|
||||
cluster_info_test.go
|
||||
*.test
|
||||
*.log
|
||||
*.log
|
||||
*~
|
||||
|
|
|
|||
|
|
@ -195,6 +195,8 @@ K9s uses aliases to navigate most K8s resources.
|
|||
| `<Esc>` | Bails out of command mode | |
|
||||
| `d`,`v`, `e`, `l`,... | Key mapping to describe, view, edit, view logs,... | `d` (describes a resource) |
|
||||
| `:`ctx`<ENTER>` | To view and switch to another Kubernetes context | `:`+`ctx`+`<ENTER>` |
|
||||
| `Ctrl-d` | To delete a resource (TAB and ENTER to confirm) | |
|
||||
| `Ctrl-k` | To delete a resource (no confirmation dialog) | |
|
||||
| `:q`, `Ctrl-c` | To bail out of K9s | |
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -4,24 +4,24 @@ import (
|
|||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// PeristentVolume represents a Kubernetes PersistentVolume.
|
||||
type PeristentVolume struct {
|
||||
// PersistentVolume represents a Kubernetes PersistentVolume.
|
||||
type PersistentVolume struct {
|
||||
*base
|
||||
Connection
|
||||
}
|
||||
|
||||
// NewPersistentVolume returns a new PeristentVolume.
|
||||
func NewPersistentVolume(c Connection) *PeristentVolume {
|
||||
return &PeristentVolume{&base{}, c}
|
||||
// NewPersistentVolume returns a new PersistentVolume.
|
||||
func NewPersistentVolume(c Connection) *PersistentVolume {
|
||||
return &PersistentVolume{&base{}, c}
|
||||
}
|
||||
|
||||
// Get a PeristentVolume.
|
||||
func (p *PeristentVolume) Get(_, n string) (interface{}, error) {
|
||||
// Get a PersistentVolume.
|
||||
func (p *PersistentVolume) Get(_, n string) (interface{}, error) {
|
||||
return p.DialOrDie().CoreV1().PersistentVolumes().Get(n, metav1.GetOptions{})
|
||||
}
|
||||
|
||||
// List all PeristentVolumes in a given namespace.
|
||||
func (p *PeristentVolume) List(_ string) (Collection, error) {
|
||||
// List all PersistentVolumes in a given namespace.
|
||||
func (p *PersistentVolume) List(_ string) (Collection, error) {
|
||||
opts := metav1.ListOptions{
|
||||
LabelSelector: p.labelSelector,
|
||||
FieldSelector: p.fieldSelector,
|
||||
|
|
@ -39,7 +39,7 @@ func (p *PeristentVolume) List(_ string) (Collection, error) {
|
|||
return cc, nil
|
||||
}
|
||||
|
||||
// Delete a PeristentVolume.
|
||||
func (p *PeristentVolume) Delete(_, n string, cascade, force bool) error {
|
||||
// Delete a PersistentVolume.
|
||||
func (p *PersistentVolume) Delete(_, n string, cascade, force bool) error {
|
||||
return p.DialOrDie().CoreV1().PersistentVolumes().Delete(n, nil)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ func (r *PersistentVolume) Marshal(path string) (string, error) {
|
|||
|
||||
pv := i.(*v1.PersistentVolume)
|
||||
pv.TypeMeta.APIVersion = "v1"
|
||||
pv.TypeMeta.Kind = "PeristentVolume"
|
||||
pv.TypeMeta.Kind = "PersistentVolume"
|
||||
|
||||
return r.marshalObject(pv)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ func newPV() resource.Columnar {
|
|||
|
||||
func pvYaml() string {
|
||||
return `apiVersion: v1
|
||||
kind: PeristentVolume
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
creationTimestamp: "2018-12-14T17:36:43Z"
|
||||
name: fred
|
||||
|
|
|
|||
Loading…
Reference in New Issue