Skip to content

Commit

Permalink
k8s: set default kubernetes version when empty in config (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason19970210 authored Jan 24, 2025
1 parent b1d8fcc commit c98eefc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions environment/container/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ func (c *kubernetesRuntime) Provision(ctx context.Context) error {
conf = c.config()
}

if conf.Version == "" {
// this ensure if `version` tag in `kubernetes` section in yaml is empty,
// it should assign with the `DefaultVersion` for the baseURL
conf.Version = DefaultVersion
}

if c.isVersionInstalled(conf.Version) {
// runtime has changed, ensure the required images are in the registry
if currentRuntime := c.runtime(); currentRuntime != "" && currentRuntime != runtime {
Expand Down

0 comments on commit c98eefc

Please sign in to comment.