Add labels configuration to Shell node pod (#1847)
* Add labels config to shell node pod spec * Add labels to config testsmine
parent
82fecb9804
commit
ff4bfe1162
|
|
@ -315,6 +315,7 @@ var expectedConfig = `k9s:
|
|||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
labels: {}
|
||||
portForwardAddress: localhost
|
||||
fred:
|
||||
namespace:
|
||||
|
|
@ -338,6 +339,7 @@ var expectedConfig = `k9s:
|
|||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
labels: {}
|
||||
portForwardAddress: localhost
|
||||
minikube:
|
||||
namespace:
|
||||
|
|
@ -361,6 +363,7 @@ var expectedConfig = `k9s:
|
|||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
labels: {}
|
||||
portForwardAddress: localhost
|
||||
thresholds:
|
||||
cpu:
|
||||
|
|
@ -411,6 +414,7 @@ var resetConfig = `k9s:
|
|||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
labels: {}
|
||||
portForwardAddress: localhost
|
||||
thresholds:
|
||||
cpu:
|
||||
|
|
|
|||
|
|
@ -12,11 +12,12 @@ type Limits map[v1.ResourceName]string
|
|||
|
||||
// ShellPod represents k9s shell configuration.
|
||||
type ShellPod struct {
|
||||
Image string `json:"image"`
|
||||
Command []string `json:"command,omitempty"`
|
||||
Args []string `json:"args,omitempty"`
|
||||
Namespace string `json:"namespace"`
|
||||
Limits Limits `json:"resources,omitempty"`
|
||||
Image string `json:"image"`
|
||||
Command []string `json:"command,omitempty"`
|
||||
Args []string `json:"args,omitempty"`
|
||||
Namespace string `json:"namespace"`
|
||||
Limits Limits `json:"resources,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
}
|
||||
|
||||
// NewShellPod returns a new instance.
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ func k9sShellPod(node string, cfg *config.ShellPod) v1.Pod {
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: k9sShellPodName(),
|
||||
Namespace: cfg.Namespace,
|
||||
Labels: cfg.Labels,
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
NodeName: node,
|
||||
|
|
|
|||
Loading…
Reference in New Issue