Skip to content

Commit c98eefc

Browse files
k8s: set default kubernetes version when empty in config (#1255)
1 parent b1d8fcc commit c98eefc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

environment/container/kubernetes/kubernetes.go

+6
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ func (c *kubernetesRuntime) Provision(ctx context.Context) error {
104104
conf = c.config()
105105
}
106106

107+
if conf.Version == "" {
108+
// this ensure if `version` tag in `kubernetes` section in yaml is empty,
109+
// it should assign with the `DefaultVersion` for the baseURL
110+
conf.Version = DefaultVersion
111+
}
112+
107113
if c.isVersionInstalled(conf.Version) {
108114
// runtime has changed, ensure the required images are in the registry
109115
if currentRuntime := c.runtime(); currentRuntime != "" && currentRuntime != runtime {

0 commit comments

Comments
 (0)