Closed nikhil-thomas closed 2 years ago
@nikhil-thomas mind making a PR?
/kind feature
sure :+1: /assign @nikhil-thomas
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.
Bug Report
operator-sdk generate bundle
command can only read from pipe but not from STDIN redirected from a file.What did you do?
kustomize <manifests-dir> | operator-sdk generate bundle <--args>
works fine.However, i cannot provide a pre-rendered (for example from
ko resolve
) yaml file as input to this command.At present, we have to do:
this works.
but I want to do
What did you expect to see?
generating bundle manifests.
What did you see instead? Under which circumstances?
Environment
Operator type:
Kubernetes cluster type:
$ operator-sdk version
1.8.0$ go version
(if language is Go)$ kubectl version
Possible Solution
This happens because the STDIN use case of the command is validated using IsPipeReader().
Currently, the function checks of type of STDIN using
return info.Mode()&os.ModeNamedPipe != 0
. So regular files will not be accepted.I could get
operator-sdk generate bundle --args < release.yaml
working locally by,replacing (checks whether input is a Pipe)
with (checks whether input is a Pipe or a regular file)
Additional context