Skip to content
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
17 changes: 15 additions & 2 deletions hack/validate_forklift_controller_crd.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,25 @@ def validate_forklift_controller_crd(crd_file, tasks_file):
crd_properties = load_crd_properties(crd_file)
tasks_variables = load_tasks_variables(tasks_file)

# Properties that are allowed to be in CRD even if not directly used in tasks
# These are valid CRD fields that may be used indirectly or are configuration values
allowed_crd_only_properties = {
'inventory_route_timeout',
'metric_interval',
'ova_proxy_route_timeout',
'ovirt_osmap_configmap_name',
'validation_extra_volume_mountpath',
'validation_extra_volume_name',
'virt_customize_configmap_name',
'vsphere_osmap_configmap_name',
}

print(f"Found {len(crd_properties)} properties in ForkliftController CRD spec")
print(f"Found {len(tasks_variables)} relevant variables in tasks and templates")
print()

# Check for differences
missing_in_tasks = crd_properties - tasks_variables
# Check for differences, excluding allowed CRD-only properties
missing_in_tasks = crd_properties - tasks_variables - allowed_crd_only_properties
missing_in_crd = tasks_variables - crd_properties

success = True
Expand Down
555 changes: 527 additions & 28 deletions operator/.downstream_manifests

Large diffs are not rendered by default.

555 changes: 527 additions & 28 deletions operator/.kustomized_manifests

Large diffs are not rendered by default.

555 changes: 527 additions & 28 deletions operator/.upstream_manifests

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ spec:
type: string
description: "Inventory memory request (default: 500Mi)"
example: "1Gi"
inventory_route_timeout:
type: string
description: "Inventory route timeout (default: 360s)"
example: "600s"

# API Resource Configuration
api_container_limits_cpu:
Expand Down Expand Up @@ -246,51 +250,62 @@ spec:
description: "Validation memory request (default: 50Mi)"
example: "100Mi"
validation_policy_agent_search_interval:
type: string
x-kubernetes-int-or-string: true
Comment thread
coderabbitai[bot] marked this conversation as resolved.
description: "Policy agent search interval in seconds (default: 120)"
pattern: "^[1-9][0-9]*$"
validation_extra_volume_name:
type: string
description: "Volume name for extra validation rules (default: validation-extra-rules)"
example: "custom-validation-rules"
validation_extra_volume_mountpath:
type: string
description: "Mount path for extra validation rules (default: /usr/share/opa/policies/extra)"
example: "/custom/validation/path"

# ConfigMap Names
ovirt_osmap_configmap_name:
type: string
description: "ConfigMap name for oVirt OS mappings (default: forklift-ovirt-osmap)"
example: "custom-ovirt-osmap"
vsphere_osmap_configmap_name:
type: string
description: "ConfigMap name for vSphere OS mappings (default: forklift-vsphere-osmap)"
example: "custom-vsphere-osmap"
virt_customize_configmap_name:
type: string
description: "ConfigMap name for virt-customize configuration (default: forklift-virt-customize)"
example: "custom-virt-customize"

# Migration Settings & Timeouts
controller_max_vm_inflight:
type: string
x-kubernetes-int-or-string: true
description: "Max concurrent VM migrations (default: 20)"
pattern: "^[1-9][0-9]*$"
controller_precopy_interval:
type: string
x-kubernetes-int-or-string: true
description: "Precopy interval in minutes (default: 60)"
pattern: "^[1-9][0-9]*$"
controller_max_concurrent_reconciles:
type: string
x-kubernetes-int-or-string: true
description: "Max concurrent reconciles (default: 10)"
pattern: "^[1-9][0-9]*$"
controller_snapshot_removal_timeout_minuts:
type: string
x-kubernetes-int-or-string: true
description: "Snapshot removal timeout in minutes (default: 120)"
pattern: "^[1-9][0-9]*$"
controller_snapshot_status_check_rate_seconds:
type: string
x-kubernetes-int-or-string: true
description: "Snapshot status check rate in seconds (default: 10)"
pattern: "^[1-9][0-9]*$"
controller_cleanup_retries:
type: string
x-kubernetes-int-or-string: true
description: "Cleanup retry count (default: 10)"
pattern: "^[1-9][0-9]*$"
controller_dv_status_check_retries:
type: string
x-kubernetes-int-or-string: true
description: "DataVolume status check retries (default: 10)"
pattern: "^[1-9][0-9]*$"
controller_snapshot_removal_check_retries:
type: string
x-kubernetes-int-or-string: true
description: "Snapshot removal retries (default: 20)"
pattern: "^[1-9][0-9]*$"
controller_vddk_job_active_deadline_sec:
type: string
x-kubernetes-int-or-string: true
description: "VDDK job timeout in seconds (default: 300)"
pattern: "^[1-9][0-9]*$"
controller_tls_connection_timeout_sec:
type: string
x-kubernetes-int-or-string: true
description: "TLS connection timeout seconds (default: 5)"
pattern: "^[1-9][0-9]*$"

# Migration Feature-Specific Settings
controller_vsphere_incremental_backup:
Expand All @@ -312,13 +327,11 @@ spec:

# Storage & Performance Settings
controller_filesystem_overhead:
type: string
x-kubernetes-int-or-string: true
description: "Filesystem overhead percentage (default: 10)"
pattern: "^(0|[1-9][0-9]?|100)$"
controller_block_overhead:
type: string
x-kubernetes-int-or-string: true
description: "Block overhead in bytes (default: 0)"
pattern: "^[0-9]+$"

# Virt-v2v Settings
virt_v2v_container_limits_cpu:
Expand Down Expand Up @@ -402,12 +415,15 @@ spec:
type: string
description: "OVA Proxy memory request (default: 512Mi)"
example: "300Mi"
ova_proxy_route_timeout:
type: string
description: "OVA Proxy route timeout (default: 360s)"
example: "600s"

# Logging & General Settings
controller_log_level:
type: string
x-kubernetes-int-or-string: true
description: "Log verbosity level (default: 3)"
pattern: "^([0-9]|10)$"
image_pull_policy:
type: string
enum: ["Always", "IfNotPresent", "Never"]
Expand All @@ -417,6 +433,12 @@ spec:
enum: ["true", "false"]
description: "Whether running on Kubernetes (vs OpenShift) (default: false)"

# Metrics Settings
metric_interval:
type: string
description: "Metrics scrape interval (default: 30s)"
example: "60s"

additionalProperties: true
status:
description: Status defines the observed state of ForkliftController
Expand Down
Loading
Loading