operator-sdk
operator-sdk copied to clipboard
(/api bump) bundle validate does not fail on invalid env in deployment spec
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.
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
Once issue https://github.com/operator-framework/api/issues/248 is merged, we should bump to that version in operator-sdk to complete this ticket.
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
/remove-lifecycle stale
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
/remove-lifecycle stale
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
/remove-lifecycle stale
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
/remove-lifecycle stale
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
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
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-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.