Bumping k8s dependencies to 1.13

This commit is contained in:
Cheng Xing
2018-11-16 14:08:25 -08:00
parent 305407125c
commit b4c0b68ec7
8002 changed files with 884099 additions and 276228 deletions

View File

@@ -139,6 +139,9 @@ type RCConfig struct {
// Node selector for pods in the RC.
NodeSelector map[string]string
// Tolerations for pods in the RC.
Tolerations []v1.Toleration
// 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.
@@ -563,6 +566,7 @@ func (config *RCConfig) create() error {
},
DNSPolicy: *config.DNSPolicy,
NodeSelector: config.NodeSelector,
Tolerations: config.Tolerations,
TerminationGracePeriodSeconds: &one,
PriorityClassName: config.PriorityClassName,
},
@@ -604,6 +608,9 @@ func (config *RCConfig) applyTo(template *v1.PodTemplateSpec) {
template.Spec.NodeSelector[k] = v
}
}
if config.Tolerations != nil {
template.Spec.Tolerations = append([]v1.Toleration{}, config.Tolerations...)
}
if config.Ports != nil {
for k, v := range config.Ports {
c := &template.Spec.Containers[0]