Bug 1968172 - [master] Infra env require pullSecretRef although it shouldn't be required
Summary: [master] Infra env require pullSecretRef although it shouldn't be required
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Nir Magnezi
QA Contact: Omri Hochman
URL:
Whiteboard: AI-Team-Hive KNI-EDGE-4.8 KNI-EDGE-JU...
Depends On:
Blocks: 1968385
TreeView+ depends on / blocked
 
Reported: 2021-06-06 13:17 UTC by Eran Cohen
Modified: 2022-08-28 08:45 UTC (History)
4 users (show)

Fixed In Version: OCP-Metal-v1.0.22.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1968385 (view as bug list)
Environment:
Last Closed: 2022-08-28 08:45:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 1938 0 None closed OCPBUGSM-30068: Revert "Docs should clarify that the pullSecretRef is currently ignored (#1898)" 2021-06-07 08:53:11 UTC

Description Eran Cohen 2021-06-06 13:17:09 UTC
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:

Comment 1 Michael Filanov 2021-06-06 13:23:07 UTC
I'm not sure that it's a bug because it will be required next version, @atraeger what do you think?

Comment 2 Eran Cohen 2021-06-06 15:14:33 UTC
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.

Comment 3 Avishay Traeger 2021-06-07 06:16:40 UTC
Let's treat it as required so that we don't break the API later on.

Comment 4 Nir Magnezi 2021-06-07 08:53:12 UTC
Per comment #3, I reverted the doc update: https://github.com/openshift/assisted-service/pull/1938

Comment 5 Chad Crum 2021-06-07 23:12:20 UTC
Verified the doc update was reverted.


Note You need to log in before you can comment on or make changes to this bug.