Skip to content

Add structural schemas for operator CRDs#1157

Draft
MaxRink wants to merge 1 commit into
NetApp:masterfrom
MaxRink:tcaas/add-operator-crd-schemas
Draft

Add structural schemas for operator CRDs#1157
MaxRink wants to merge 1 commit into
NetApp:masterfrom
MaxRink:tcaas/add-operator-crd-schemas

Conversation

@MaxRink

@MaxRink MaxRink commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • replace the top-level preserve-unknown schemas for TridentOrchestrator and TridentConfigurator with structural OpenAPI schemas
  • update the runtime embedded CRD YAML used by the operator installer
  • keep static deploy and Helm CRD copies in sync
  • update CRD YAML tests to assert the new schema shape

Notes

This is intentionally opened as a draft. It starts with the operator CRDs because they are the public install/configuration entry points and currently accept arbitrary top-level fields.

TridentConfigurator.spec remains a raw object with x-kubernetes-preserve-unknown-fields because the Go API type is runtime.RawExtension and backend configurator payloads are storage-driver-specific. The root CRD and status are now structural.

TridentOrchestrator.status.currentInstallationParams is also left preserve-unknown for this draft because it is an operator-produced status snapshot and contains nested install state that should be tightened separately if desired.

This branch is based on current master and does not include the sidecar image fields from #1156. If #1156 is accepted first, this schema PR should be rebased and extended with those new fields.

Validation

  • go test ./cli/k8s_client -run 'TestGet(Configurator|Orchestrator)CRDYAML' -count=1
  • go test ./cli/k8s_client -run 'TestGetCRDsYAML/tridentconfigurators.trident.netapp.io' -count=1
  • ruby YAML parse for all updated static CRD files
  • kubectl create --dry-run=client --validate=false for all updated static CRD files
  • helm lint ./helm/trident-operator
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant