Summary
The OpenstackCredsCustomValidator webhook scaffold was added in # but the ValidateCreate, ValidateUpdate, and ValidateDelete methods are currently no-ops.
Work Required
- Implement validation logic in
k8s/migration/api/v1alpha1/openstackcreds_webhook.go:
ValidateCreate: validate required fields (auth URL, username, password, tenant, domain, region) are non-empty
ValidateUpdate: validate same fields; optionally prevent immutable field changes (e.g. auth URL)
ValidateDelete: optionally block deletion if referenced by an active MigrationPlan
- Expand
openstackcreds_webhook_test.go with table-driven tests covering accept/reject cases for each operation
- Remove the
TODO(user) placeholders in the test file
Acceptance Criteria
- Webhook rejects
OpenstackCreds with missing required fields at admission time
- Unit tests cover at minimum: missing auth URL, missing username, valid object, update with valid object
Summary
The
OpenstackCredsCustomValidatorwebhook scaffold was added in # but theValidateCreate,ValidateUpdate, andValidateDeletemethods are currently no-ops.Work Required
k8s/migration/api/v1alpha1/openstackcreds_webhook.go:ValidateCreate: validate required fields (auth URL, username, password, tenant, domain, region) are non-emptyValidateUpdate: validate same fields; optionally prevent immutable field changes (e.g. auth URL)ValidateDelete: optionally block deletion if referenced by an active MigrationPlanopenstackcreds_webhook_test.gowith table-driven tests covering accept/reject cases for each operationTODO(user)placeholders in the test fileAcceptance Criteria
OpenstackCredswith missing required fields at admission time