Skip to content
Open
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
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: openshift-virtualization-instance
description: OpenShift Virtualization
type: application
version: 0.1.4
version: 0.1.5
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# openshift-virtualization-instance

![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

OpenShift Virtualization

This chart is used to set up OpenShift Virtualization for the Validated Patterns framework

### Notable changes

* v0.1.5: Add non-default option to skip virt-autopilot managed configuration (virtAutopilot.enabled=false)
* v0.1.4: Remove withHostPassthroughCPU setting from hyperconverged. It was deprecated and ignored.
* v0.1.3: Be more selective about the common boot import; 4.18 does not accept it
* v0.1.2: Correct location of common boot import spec, and make debug/emulation work again
Expand All @@ -22,6 +23,7 @@ This chart is used to set up OpenShift Virtualization for the Validated Patterns
| global.clusterVersion | string | `"4.18"` | |
| namespaceOverride | string | `"openshift-cnv"` | |
| sriovLiveMigration | bool | `false` | |
| virtAutopilot | object | `{"enabled":true}` | Set to false to skip all virt-autopilot managed configuration (OpenShift Virtualization >= 5.0). virt-autopilot automatically applies opinionated postinstallation defaults: load-aware descheduler tuning, observability dashboards and alerts, swap and node tuning, and more. Skipping it adds the platform.kubevirt.io/disabled-resources annotation to the HyperConverged CR so that the controller does not create or reconcile those resources. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
1 change: 1 addition & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This chart is used to set up OpenShift Virtualization for the Validated Patterns

### Notable changes

* v0.1.5: Add non-default option to skip virt-autopilot managed configuration (virtAutopilot.enabled=false)
* v0.1.4: Remove withHostPassthroughCPU setting from hyperconverged. It was deprecated and ignored.
* v0.1.3: Be more selective about the common boot import; 4.18 does not accept it
* v0.1.2: Correct location of common boot import spec, and make debug/emulation work again
Expand Down
61 changes: 61 additions & 0 deletions templates/hyperconverged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,67 @@ kind: HyperConverged
metadata:
annotations:
deployOVS: "false"
{{- if not .Values.virtAutopilot.enabled }}
# Skip all virt-autopilot managed configuration (OpenShift Virtualization >= 5.0).
# Rules only match resources rendered by virt-autopilot itself. The kind
# list mirrors the asset catalog of virt-platform-autopilot and may need
# updating as new features are added there.
platform.kubevirt.io/disabled-resources: |
- kind: HyperConverged
name: kubevirt-hyperconverged
# Observability
- kind: Service
name: "*"
- kind: ServiceMonitor
name: "*"
- kind: PrometheusRule
name: "*"
- kind: PersesDashboard
name: "*"
- kind: PersesDatasource
name: "*"
# Node tuning
- kind: MachineConfig
name: "*"
- kind: MachineConfiguration
name: "*"
- kind: ConfigMap
name: "*"
# Operators and components
- kind: KubeDescheduler
name: "*"
- kind: UIPlugin
name: "*"
- kind: OperationRuleSet
name: "*"
- kind: ForkliftController
name: "*"
- kind: MetalLB
name: "*"
- kind: LokiStack
name: "*"
- kind: ClusterLogForwarder
name: "*"
- kind: NodeHealthCheck
name: "*"
- kind: StorageBasedRemediationConfig
name: "*"
- kind: DaemonSet
name: "*"
# Supporting resources
- kind: Namespace
name: "*"
- kind: ServiceAccount
name: "*"
- kind: ClusterRole
name: "*"
- kind: ClusterRoleBinding
name: "*"
- kind: SecurityContextConstraints
name: "*"
- kind: NetworkPolicy
name: "*"
{{- end }}
finalizers:
- kubevirt.io/hyperconverged
labels:
Expand Down
38 changes: 38 additions & 0 deletions tests/hyperconverged_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
suite: HyperConverged CR
templates:
- templates/hyperconverged.yaml
tests:
- it: does not disable virt-autopilot resources by default
asserts:
- notExists:
path: "metadata.annotations['platform.kubevirt.io/disabled-resources']"

- it: disables all virt-autopilot resources when virtAutopilot.enabled is false
set:
virtAutopilot:
enabled: false
asserts:
- exists:
path: "metadata.annotations['platform.kubevirt.io/disabled-resources']"
- matchRegex:
path: "metadata.annotations['platform.kubevirt.io/disabled-resources']"
pattern: "kind: HyperConverged"
- matchRegex:
path: "metadata.annotations['platform.kubevirt.io/disabled-resources']"
pattern: "kind: KubeDescheduler"
- matchRegex:
path: "metadata.annotations['platform.kubevirt.io/disabled-resources']"
pattern: "kind: MachineConfig"
- matchRegex:
path: "metadata.annotations['platform.kubevirt.io/disabled-resources']"
pattern: 'name: "\*"'

- it: keeps the deployOVS annotation when skipping virt-autopilot
set:
virtAutopilot:
enabled: false
asserts:
- equal:
path: metadata.annotations.deployOVS
value: "false"
10 changes: 10 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ global:
namespaceOverride: openshift-cnv
sriovLiveMigration: false
enableCommonBootImageImport: true

# -- Set to false to skip all virt-autopilot managed configuration
# (OpenShift Virtualization >= 5.0). virt-autopilot automatically applies
# opinionated postinstallation defaults: load-aware descheduler tuning,
# observability dashboards and alerts, swap and node tuning, and more.
# Skipping it adds the platform.kubevirt.io/disabled-resources annotation
# to the HyperConverged CR so that the controller does not create or
# reconcile those resources.
virtAutopilot:
enabled: true
Loading