Repository navigation
Update controller-pkg, Go, and dependencies - #70
Merged
Merged
Conversation
The operator uses the newest controller-pkg from the liquidmetal-dev organization. The new fields of the microvm spec are available in the Microvm, MicrovmReplicaSet, MicrovmDeployment, and MicrovmTemplate CRDs. The new fields are provider, allowGuestAgent, cpuConfig, and the mountPoint and virtiofsPath fields of additional volumes. These fields are available only with flintlock v0.16.0 or a newer version on the host. The project now builds with Go 1.26. The dependencies cluster-api, controller-runtime, and the k8s.io modules are at their newest versions. The tools controller-gen, kustomize, and counterfeiter are at their current versions. Changes to the code: - The conditions use the v1beta1 helpers in cluster-api and the condition types in api/core/v1beta2. The status schema of the CRDs does not change. - A local function reads the instance ID from the provider ID. The function noderefutil.NewProviderID is not in cluster-api v1.14. - The manager uses the metrics server options of controller-runtime. - The tests register the status subresource with the fake client. - The counterfeiter fake has the new ServerInfo method. - The Dockerfile copies the internal directory. Before this change, the image build failed. - The kustomization files use the kustomize v5 syntax. - The README and the samples show the new spec fields.
The default token for workflows in this repository is read-only. Because of this, the size labeler received a 403 error when it added the size label to the PR. This change gives the workflow read access to the contents and write access to the pull requests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR moves the operator to the newest controller-pkg and makes the new microvm spec fields available in the API. It also moves Go to 1.26 and moves the dependencies and the tools to their newest versions.
New API fields
The new fields are available in the
Microvm,MicrovmReplicaSet,MicrovmDeployment, andMicrovmTemplateCRDs:provider: the microvm provider on the host. If the field is empty, flintlock uses the default provider.allowGuestAgent: attaches a vsock device for the guest-agent.cpuConfig.featuresToEnableandcpuConfig.kvmCapabilitiesToDisable: CPU feature configuration. The values are specific to the provider.additionalVolumes[].mountPoint: the mount point of the volume in the guest.additionalVolumes[].virtiofsPath: the virtiofs source of the volume. A volumeimageis not mandatory.These fields are available only with flintlock v0.16.0 or a newer version on the host.
Dependency and tool versions
The k8s.io modules and controller-runtime are at the versions that cluster-api v1.14.3 uses. The newest kube-openapi module is for Go 1.27. Because of this, the direct dependencies are at the newest versions for Go 1.26.
Code changes
api/core/v1beta2. The JSON schema of the status conditions does not change.noderefutil.NewProviderIDis not in cluster-api v1.14.ServerInfomethod.internaldirectory. Before this change, the image build was not possible.mise.tomlfile sets the Go version for this repository.Tests
make buildandmake testcomplete without errors. All 31 tests pass.make generateandmake manifestscomplete without errors.kustomize build config/defaultcompletes without errors.docker build .completes without errors.Known problems that this PR does not correct
config/default/manager_auth_proxy_patch.yamlrefers to the imagegcr.io/kubebuilder/kube-rbac-proxy:v0.13.0. This image is not available.make deploywill not work until the operator uses the metrics authentication of controller-runtime.github.com/weaveworks-liquidmetal/microvm-operator. The repository is in the liquidmetal-dev organization.metav1.Condition.