Description of problem: Tried to apply the following CR and got a validation error apiVersion: agent-install.openshift.io/v1beta1 kind: InfraEnv metadata: name: osher namespace: assisted-installer spec: clusterRef: name: first-scenario namespace: namespace-1 agentLabelSelector: matchLabels: {} sshAuthorizedKey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKkS0souhtF+JS5bb8ycdsOO/UHownMiu6OCRvgR7C+8CGa0xzxc0+0oB5RrzWvd/+o3K9Xx+ZE0jwe7WZaKvXKXehP5dmrlFe/2SZkvwNN64/K14lZjhokNBy8HqysrKWxiSof6+GrHkjQIXrbtvBjuhsdLMc7sVoIHultxga8PfIR8qkUMaLc4FW6OnJtjhIaYVIatZazatL8FCnjh/wTlxcPg5753oxftH0e8kR8YXKpRm+E8CMQXhsGo91mlXg7y0/Kj6ICXVNoNDVdN81OiZXcE7ZkNsT6Il2yNJtVXhBZ1Bgh8j1LH60BUkiLHchDjNL+ZJxKdcW/hOmpY26nDBBK1TAE2s1eO/UDMaaR39CMo1C18tnnGEGgFDKWPf8hpmatzG1F+OAAcwbXIhe6YwLj0SfyOwpb422imxWg6teFSIhFNyLIoEnfKsZj8Zvz0N1O7GC7S1Ic4KGbYN+HkIK1HTA9jWwbcI/mfIjnHofG8k1COZhAffUn4iZswU= root.lab.eng.rdu2.redhat.com' [root@rdu-infra-edge-06 ~]# kubectl apply -f infra-env.yaml error: error validating "infra-env.yaml": error validating data: ValidationError(InfraEnv.spec): missing required field "pullSecretRef" in io.openshift.agent-install.v1beta1.InfraEnv.spec; if you choose to ignore these errors, turn validation off with --validate=false Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1.Deploy the operator 2.Try applying the CR above 3. Actual results: error: error validating "infra-env.yaml": error validating data: ValidationError(InfraEnv.spec): missing required field "pullSecretRef" in io.openshift.agent-install.v1beta1.InfraEnv.spec; if you choose to ignore these errors, turn validation off with --validate=false Expected results: Additional info:
I'm not sure that it's a bug because it will be required next version, @atraeger what do you think?
This is the example we have in the docs https://github.com/openshift/assisted-service/blob/master/docs/crds/infraEnv.yaml#L12 It says it's not required, so either we fix the docs to say it's required or we fix the code so it won't get validated. Currently from a user perspective, it's confusing.
Let's treat it as required so that we don't break the API later on.
Per comment #3, I reverted the doc update: https://github.com/openshift/assisted-service/pull/1938
Verified the doc update was reverted.