Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Support CPU topology and resource limits #22

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

mfranczy
Copy link
Contributor

@mfranczy mfranczy commented Oct 6, 2020

Signed-off-by: Marcin Franczyk [email protected]

What this PR does / why we need it:
supports CPU topology and resource limits

Which issue(s) this PR fixes:
Fixes gardener-attic/gardener-extension-provider-kubevirt#36

Special notes for your reviewer:

Release note:

improvement_user

@mfranczy mfranczy requested a review from a team as a code owner October 6, 2020 14:50
@mfranczy mfranczy changed the title support CPU topology and resource limits Support CPU topology and resource limits Oct 6, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 6, 2020
@mfranczy mfranczy added the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label Oct 6, 2020
@mfranczy
Copy link
Contributor Author

mfranczy commented Oct 6, 2020

still testing the PR

@gardener-robot-ci-2 gardener-robot-ci-2 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 6, 2020
// SourceURL is the HTTP URL of the source image imported by CDI.
SourceURL string `json:"sourceURL,omitempty"`
// StorageClassName is the name which CDI uses to in order to create claims.
// +optional
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all `+optional' as there is no code generator

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to keep them, for documentation purposes, and ensure that they are placed correctly.

pkg/kubevirt/core/core.go Outdated Show resolved Hide resolved
// SourceURL is the HTTP URL of the source image imported by CDI.
SourceURL string `json:"sourceURL,omitempty"`
// StorageClassName is the name which CDI uses to in order to create claims.
// +optional
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to keep them, for documentation purposes, and ensure that they are placed correctly.

pkg/kubevirt/apis/provider_spec.go Outdated Show resolved Hide resolved
pkg/kubevirt/apis/provider_spec.go Outdated Show resolved Hide resolved
pkg/kubevirt/apis/provider_spec.go Outdated Show resolved Hide resolved
pkg/kubevirt/core/core.go Outdated Show resolved Hide resolved
pkg/kubevirt/core/core.go Outdated Show resolved Hide resolved
pkg/kubevirt/core/core.go Outdated Show resolved Hide resolved
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 7, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 7, 2020
@@ -16,21 +16,20 @@ package api

import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
kubevirtv1 "kubevirt.io/client-go/api/v1"
)

// KubeVirtProviderSpec is the spec to be used while parsing the calls.
type KubeVirtProviderSpec struct {
Copy link
Contributor Author

@mfranczy mfranczy Oct 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stoyanr I didn't touch Region and Zone since you've created a PR about that.

@stoyanr
Copy link
Contributor

stoyanr commented Oct 7, 2020

/lgtm

There are some linter errors (run make check):

./pkg/kubevirt/validation/validation.go:29:1: comment on exported function ValidateKubevirtProviderSpec should be of the form "ValidateKubevirtProviderSpec ..."
./pkg/kubevirt/validation/validation.go:80:1: exported function ValidateKubevirtProviderSecrets should have comment or be unexported

@gardener-robot gardener-robot added the reviewed/lgtm Has approval for merging label Oct 7, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 7, 2020
@mfranczy
Copy link
Contributor Author

mfranczy commented Oct 7, 2020

@stoyanr fixed, I've added validation for Region and Zone as well.

@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 7, 2020
@mfranczy mfranczy removed the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label Oct 7, 2020
@stoyanr stoyanr merged commit 4980abc into gardener-attic:master Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add additional VM configuration options
5 participants