kubermatic / kubermatic/machine-controller
feat(kubevirt): configure runStrategy
- Dominant language
- Go
- Stars
- 326
- Forks
- 138
- Avg merge
- 2d 46m
- Merged PRs (30d)
- 12
Description
Hi. more like a question:
Is there a specific reason this is hard-coded to RunOnce for the kubevirt probvider?
[ RunStrategy: &runStrategyOnce,](https://github.com/kubermatic/machine-controller/blob/8f3166ae03b0a555bd518382ff668518a694ff44/pkg/cloudprovider/provider/kubevirt/provider.go#L665)
There's other strategies available: https://pkg.go.dev/kubevirt.io/api/core/v1#VirtualMachineRunStrategy
I guess it makes sense as default, but consider this: If a kubevirt host dives (restarts) all the kubermatic VMIs do not restart (unless you live-migrate to another host, if there's another available). Would it be possible to make this field configurable via machineTemplate? The default can still be RunOnce, but eg. in our use-case we would prefer to use `RerunOnFailure `
Contributor guide
Research direction
Start in pkg/cloudprovider/provider/kubevirt/provider.go around the RunStrategy assignment at line 665, then trace how machineTemplate settings reach the KubeVirt provider. Make the strategy configurable while preserving RunOnce as the default and supporting RerunOnFailure for users who need it. Verify that the resulting machine template behavior matches the selected strategy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100