PodSpec: {
// The 'first' container is used in various defaults in k8s.
local container_names = std.objectFields(self.containers_),
default_container:: if std.length(container_names) > 1 then "default" else container_names[0]
[...]
}
"default" as default_container should be used when std.length(container_names) < 1. In current code container_names[0] is used when container_names is empty.
Steps to reproduce:
Evaluation of this fails when put in tests directory:
Cause
in kube.jibsonnet:
"default" as default_container should be used when std.length(container_names) < 1. In current code container_names[0] is used when container_names is empty.