Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the golden images feature gate to enableCommonBootImageImport #1535

Merged
merged 1 commit into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deploy/crds/hco00.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
duration: 24h0m0s
renewBefore: 12h0m0s
featureGates:
commonDataImportCronEnabled: false
enableCommonBootImageImport: false
sriovLiveMigration: true
withHostPassthroughCPU: false
liveMigrationConfig:
Expand Down Expand Up @@ -185,14 +185,14 @@ spec:
x-kubernetes-list-type: atomic
featureGates:
default:
commonDataImportCronEnabled: false
enableCommonBootImageImport: false
sriovLiveMigration: true
withHostPassthroughCPU: false
description: featureGates is a map of feature gate flags. Setting
a flag to `true` will enable the feature. Setting `false` or removing
the feature gate, disables the feature.
properties:
commonDataImportCronEnabled:
enableCommonBootImageImport:
default: false
description: 'Opt-in to automatic delivery/updates of the common
data import cron templates. There are two sources for the data
Expand Down
2 changes: 1 addition & 1 deletion deploy/hco.cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
duration: 24h0m0s
renewBefore: 12h0m0s
featureGates:
commonDataImportCronEnabled: false
enableCommonBootImageImport: false
sriovLiveMigration: true
withHostPassthroughCPU: false
infra: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
duration: 24h0m0s
renewBefore: 12h0m0s
featureGates:
commonDataImportCronEnabled: false
enableCommonBootImageImport: false
sriovLiveMigration: true
withHostPassthroughCPU: false
liveMigrationConfig:
Expand Down Expand Up @@ -185,14 +185,14 @@ spec:
x-kubernetes-list-type: atomic
featureGates:
default:
commonDataImportCronEnabled: false
enableCommonBootImageImport: false
sriovLiveMigration: true
withHostPassthroughCPU: false
description: featureGates is a map of feature gate flags. Setting
a flag to `true` will enable the feature. Setting `false` or removing
the feature gate, disables the feature.
properties:
commonDataImportCronEnabled:
enableCommonBootImageImport:
default: false
description: 'Opt-in to automatic delivery/updates of the common
data import cron templates. There are two sources for the data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
duration: 24h0m0s
renewBefore: 12h0m0s
featureGates:
commonDataImportCronEnabled: false
enableCommonBootImageImport: false
sriovLiveMigration: true
withHostPassthroughCPU: false
liveMigrationConfig:
Expand Down Expand Up @@ -185,14 +185,14 @@ spec:
x-kubernetes-list-type: atomic
featureGates:
default:
commonDataImportCronEnabled: false
enableCommonBootImageImport: false
sriovLiveMigration: true
withHostPassthroughCPU: false
description: featureGates is a map of feature gate flags. Setting
a flag to `true` will enable the feature. Setting `false` or removing
the feature gate, disables the feature.
properties:
commonDataImportCronEnabled:
enableCommonBootImageImport:
default: false
description: 'Opt-in to automatic delivery/updates of the common
data import cron templates. There are two sources for the data
Expand Down
6 changes: 3 additions & 3 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ HyperConverged is the Schema for the hyperconvergeds API
| Field | Description | Scheme | Default | Required |
| ----- | ----------- | ------ | -------- |-------- |
| metadata | | [metav1.ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectmeta-v1-meta) | | false |
| spec | | [HyperConvergedSpec](#hyperconvergedspec) | {"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}}, "featureGates": {"withHostPassthroughCPU": false, "sriovLiveMigration": true, "commonDataImportCronEnabled": false}, "liveMigrationConfig": {"bandwidthPerMigration": "64Mi", "completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150}} | false |
| spec | | [HyperConvergedSpec](#hyperconvergedspec) | {"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}}, "featureGates": {"withHostPassthroughCPU": false, "sriovLiveMigration": true, "enableCommonBootImageImport": false}, "liveMigrationConfig": {"bandwidthPerMigration": "64Mi", "completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150}} | false |
| status | | [HyperConvergedStatus](#hyperconvergedstatus) | | false |

[Back to TOC](#table-of-contents)
Expand Down Expand Up @@ -88,7 +88,7 @@ HyperConvergedFeatureGates is a set of optional feature gates to enable or disab
| ----- | ----------- | ------ | -------- |-------- |
| withHostPassthroughCPU | Allow migrating a virtual machine with CPU host-passthrough mode. This should be enabled only when the Cluster is homogeneous from CPU HW perspective doc here | bool | false | true |
| sriovLiveMigration | Allow migrating a virtual machine with SRIOV interfaces. | bool | true | true |
| commonDataImportCronEnabled | Opt-in to automatic delivery/updates of the common data import cron templates. There are two sources for the data import cron templates: hard coded list of common templates, and custom templates that can be added to the dataImportCronTemplates field. This feature gates only control the common templates. It is possible to use custom templates by adding them to the dataImportCronTemplates field. | bool | false | true |
| enableCommonBootImageImport | Opt-in to automatic delivery/updates of the common data import cron templates. There are two sources for the data import cron templates: hard coded list of common templates, and custom templates that can be added to the dataImportCronTemplates field. This feature gates only control the common templates. It is possible to use custom templates by adding them to the dataImportCronTemplates field. | bool | false | true |

[Back to TOC](#table-of-contents)

Expand Down Expand Up @@ -123,7 +123,7 @@ HyperConvergedSpec defines the desired state of HyperConverged
| localStorageClassName | LocalStorageClassName the name of the local storage class. | string | | false |
| infra | infra HyperConvergedConfig influences the pod configuration (currently only placement) for all the infra components needed on the virtualization enabled cluster but not necessarely directly on each node running VMs/VMIs. | [HyperConvergedConfig](#hyperconvergedconfig) | | false |
| workloads | workloads HyperConvergedConfig influences the pod configuration (currently only placement) of components which need to be running on a node where virtualization workloads should be able to run. Changes to Workloads HyperConvergedConfig can be applied only without existing workload. | [HyperConvergedConfig](#hyperconvergedconfig) | | false |
| featureGates | featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. | [HyperConvergedFeatureGates](#hyperconvergedfeaturegates) | {"withHostPassthroughCPU": false, "sriovLiveMigration": true, "commonDataImportCronEnabled": false} | false |
| featureGates | featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. | [HyperConvergedFeatureGates](#hyperconvergedfeaturegates) | {"withHostPassthroughCPU": false, "sriovLiveMigration": true, "enableCommonBootImageImport": false} | false |
| liveMigrationConfig | Live migration limits and timeouts are applied so that migration processes do not overwhelm the cluster. | [LiveMigrationConfigurations](#livemigrationconfigurations) | {"bandwidthPerMigration": "64Mi", "completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150} | false |
| permittedHostDevices | PermittedHostDevices holds information about devices allowed for passthrough | *[PermittedHostDevices](#permittedhostdevices) | | false |
| certConfig | certConfig holds the rotation policy for internal, self-signed certificates | [HyperConvergedCertConfig](#hyperconvergedcertconfig) | {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}} | false |
Expand Down
27 changes: 16 additions & 11 deletions docs/cluster-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,22 +140,26 @@ CPU HW perspective.
Additional information: [LibvirtXMLCPUModel](https://wiki.openstack.org/wiki/LibvirtXMLCPUModel)

### sriovLiveMigration Feature Gate
Set the `sriovLiveMigration` feature gate in order to allow migrating a virtual machine with SRIOV interfaces.
When enabled virt-launcher pods of virtual machines with SRIOV interfaces run with CAP_SYS_RESOURCE capability.
This may degrade virt-launcher security.

Set the `sriovLiveMigration` feature gate in order to allow migrating a virtual machine with SRIOV interfaces. When
enabled virt-launcher pods of virtual machines with SRIOV interfaces run with CAP_SYS_RESOURCE capability. This may
degrade virt-launcher security.

**Default**: `true`

### commonDataImportCronEnabled Feature Gate
Set the `commonDataImportCronEnabled` feature gate to `true` in order to enable the common golden images in the cluster.
For additional information, see here: https://github.com/kubevirt/community/blob/master/design-proposals/golden-image-delivery-and-update-pipeline.md
### enableCommonBootImageImport Feature Gate

Set the `enableCommonBootImageImport` feature gate to `true` in order to enable the common golden images in the cluster.
For additional information, see
here: https://github.com/kubevirt/community/blob/master/design-proposals/golden-image-delivery-and-update-pipeline.md

**Note**: Custom golden images are enabled by adding them the [dataImportCronTemplates field](#configure-custom-golden-images),
even if this feature gate is `false`.
**Note**: Custom golden images are enabled by adding them
the [dataImportCronTemplates field](#configure-custom-golden-images), even if this feature gate is `false`.

**Default**: `false`

### Feature Gates Example

```yaml
apiVersion: hco.kubevirt.io/v1beta1
kind: HyperConverged
Expand All @@ -167,7 +171,7 @@ spec:
featureGates:
withHostPassthroughCPU: true
sriovLiveMigration: true
commonDataImportCronEnabled: false
enableCommonBootImageImport: false
```

## Live Migration Configurations
Expand Down Expand Up @@ -479,10 +483,11 @@ spec:
Golden images are root disk images for commonly used operating systems. HCO provides several hard coded images, but it
is also possible to add custom golden images. For more details, see [the golden image documentation](https://github.com/kubevirt/community/blob/master/design-proposals/golden-image-delivery-and-update-pipeline.md).

To add a custom image, add a `DataImportCronTemplate` object to the `dataImportCronTemplates` under the `HyperConverged`'s
To add a custom image, add a `DataImportCronTemplate` object to the `dataImportCronTemplates` under
the `HyperConverged`'s
`spec` field.

**Note**: the commonDataImportCronEnabled feature does not block the custom golden images, but only the common ones.
**Note**: the `enableCommonBootImageImport` feature does not block the custom golden images, but only the common ones.

### Custom Golden Images example
```yaml
Expand Down
4 changes: 2 additions & 2 deletions hack/check_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo "Read the CR's spec before starting the test"
${KUBECTL_BINARY} get hco -n "${INSTALLED_NAMESPACE}" kubevirt-hyperconverged -o json | jq '.spec'

CERTCONFIGDEFAULTS='{"ca":{"duration":"48h0m0s","renewBefore":"24h0m0s"},"server":{"duration":"24h0m0s","renewBefore":"12h0m0s"}}'
FGDEFAULTS='{"commonDataImportCronEnabled":false,"sriovLiveMigration":true,"withHostPassthroughCPU":false}'
FGDEFAULTS='{"enableCommonBootImageImport":false,"sriovLiveMigration":true,"withHostPassthroughCPU":false}'
LMDEFAULTS='{"bandwidthPerMigration":"64Mi","completionTimeoutPerGiB":800,"parallelMigrationsPerCluster":5,"parallelOutboundMigrationsPerNode":2,"progressTimeout":150}'
PERMITTED_HOST_DEVICES_DEFAULT1='{"pciDeviceSelector":"10DE:1DB6","resourceName":"nvidia.com/GV100GL_Tesla_V100"}'
PERMITTED_HOST_DEVICES_DEFAULT2='{"pciDeviceSelector":"10DE:1EB8","resourceName":"nvidia.com/TU104GL_Tesla_T4"}'
Expand All @@ -40,7 +40,7 @@ CERTCONFIGPATHS=(
)

FGPATHS=(
"/spec/featureGates/commonDataImportCronEnabled"
"/spec/featureGates/enableCommonBootImageImport"
"/spec/featureGates/withHostPassthroughCPU"
"/spec/featureGates/sriovLiveMigration"
"/spec/featureGates"
Expand Down
6 changes: 3 additions & 3 deletions pkg/apis/hco/v1beta1/hyperconverged_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type HyperConvergedSpec struct {

// featureGates is a map of feature gate flags. Setting a flag to `true` will enable
// the feature. Setting `false` or removing the feature gate, disables the feature.
// +kubebuilder:default={"withHostPassthroughCPU": false, "sriovLiveMigration": true, "commonDataImportCronEnabled": false}
// +kubebuilder:default={"withHostPassthroughCPU": false, "sriovLiveMigration": true, "enableCommonBootImageImport": false}
// +optional
FeatureGates HyperConvergedFeatureGates `json:"featureGates,omitempty"`

Expand Down Expand Up @@ -210,7 +210,7 @@ type HyperConvergedFeatureGates struct {
// templates. It is possible to use custom templates by adding them to the dataImportCronTemplates field.
// +optional
// +kubebuilder:default=false
CommonDataImportCronEnabled bool `json:"commonDataImportCronEnabled"`
EnableCommonBootImageImport bool `json:"enableCommonBootImageImport"`
}

// PermittedHostDevices holds information about devices allowed for passthrough
Expand Down Expand Up @@ -437,7 +437,7 @@ type HyperConverged struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// +kubebuilder:default={"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}}, "featureGates": {"withHostPassthroughCPU": false, "sriovLiveMigration": true, "commonDataImportCronEnabled": false}, "liveMigrationConfig": {"bandwidthPerMigration": "64Mi", "completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150}}
// +kubebuilder:default={"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}}, "featureGates": {"withHostPassthroughCPU": false, "sriovLiveMigration": true, "enableCommonBootImageImport": false}, "liveMigrationConfig": {"bandwidthPerMigration": "64Mi", "completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150}}
// +optional
Spec HyperConvergedSpec `json:"spec,omitempty"`
Status HyperConvergedStatus `json:"status,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/hco/v1beta1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/controller/operands/ssp.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func readDataImportCronTemplatesFromFile() error {
func getDataImportCronTemplates(hc *hcov1beta1.HyperConverged) []sspv1beta1.DataImportCronTemplate {
var dataImportCronTemplateList []sspv1beta1.DataImportCronTemplate = nil

if hc.Spec.FeatureGates.CommonDataImportCronEnabled {
if hc.Spec.FeatureGates.EnableCommonBootImageImport {
dataImportCronTemplateList = append(dataImportCronTemplateList, dataImportCronTemplateHardCodedList...)
}
dataImportCronTemplateList = append(dataImportCronTemplateList, hc.Spec.DataImportCronTemplates...)
Expand Down
Loading