Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(/api bump) bundle validate does not fail on invalid env in deployment spec #5888

Closed
itroyano opened this issue Jun 20, 2022 · 14 comments
Closed
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Milestone

Comments

@itroyano
Copy link

itroyano commented Jun 20, 2022

Bug Report

Given a CSV yaml with the following spec

deployments:
- name: controller-manager
   spec:
   .....
     template:
     .....
       spec:
         containers:
         .....
           env:
           - name: MY_IMAGE
             image: docker.io/foo:bar

operator-sdk bundle validate is successful, despite {name. image} not being a valid env spec in Deployment.
it should be {name, value}.

What did you expect to see?

validation to fail on

env:
           - name: MY_IMAGE
              image: docker.io/foo:bar

What did you see instead? Under which circumstances?

INFO[0000] All validation tests have completed successfully

Environment

N/A

$ operator-sdk version

v1.21.0

$ go version (if language is Go)

go1.18.3

$ kubectl version

v1.20.1-5-g76a04fc

Possible Solution

validate each of the nested deployments in CSV, as a k8s deployment object. throw the underlying error (if any) to the validation output.

@camilamacedo86
Copy link
Contributor

I think that is definitely something that we need to do.
However, the implementation must be done here: https://github.com/operator-framework/api/blob/master/pkg/validation/internal/csv.go

Would you like to contribute with?

c/c @ryantking

@jberkhahn jberkhahn added this to the v1.24.0 milestone Jun 27, 2022
@asmacdo asmacdo added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jul 20, 2022
@jmrodri
Copy link
Member

jmrodri commented Jul 20, 2022

Once issue operator-framework/api#248 is merged, we should bump to that version in operator-sdk to complete this ticket.

@asmacdo asmacdo removed the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Aug 31, 2022
@asmacdo asmacdo changed the title bundle validate does not fail on invalid env in deployment spec (/api bump) bundle validate does not fail on invalid env in deployment spec Aug 31, 2022
@asmacdo asmacdo modified the milestones: v1.24.0, v1.25.0 Sep 21, 2022
@asmacdo asmacdo removed their assignment Sep 21, 2022
@asmacdo asmacdo modified the milestones: v1.25.0, Backlog Sep 21, 2022
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 21, 2022
@itroyano
Copy link
Author

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 21, 2022
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 22, 2023
@itroyano
Copy link
Author

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 22, 2023
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 20, 2023
@itroyano
Copy link
Author

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 20, 2023
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 19, 2023
@itroyano
Copy link
Author

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 19, 2023
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 18, 2023
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 18, 2024
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this as completed Feb 17, 2024
Copy link

openshift-ci bot commented Feb 17, 2024

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants