Change Kubelet test to run also in large clusters
This commit is contained in:
@@ -278,6 +278,9 @@ type RCConfig struct {
|
||||
// Extra labels added to every pod.
|
||||
Labels map[string]string
|
||||
|
||||
// Node selector for pods in the RC.
|
||||
NodeSelector map[string]string
|
||||
|
||||
// Ports to declare in the container (map of name to containerPort).
|
||||
Ports map[string]int
|
||||
// Ports to declare in the container as host and container ports.
|
||||
@@ -2232,6 +2235,12 @@ func (config *RCConfig) applyTo(template *api.PodTemplateSpec) {
|
||||
template.ObjectMeta.Labels[k] = v
|
||||
}
|
||||
}
|
||||
if config.NodeSelector != nil {
|
||||
template.Spec.NodeSelector = make(map[string]string)
|
||||
for k, v := range config.NodeSelector {
|
||||
template.Spec.NodeSelector[k] = v
|
||||
}
|
||||
}
|
||||
if config.Ports != nil {
|
||||
for k, v := range config.Ports {
|
||||
c := &template.Spec.Containers[0]
|
||||
|
Reference in New Issue
Block a user