-
Notifications
You must be signed in to change notification settings - Fork 19
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
Pod attach #325
base: master
Are you sure you want to change the base?
Pod attach #325
Conversation
import zio.stream.UStream | ||
|
||
case class AttachedProcessState( | ||
stdin: Option[Queue[Chunk[Byte]]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be nicer (at least more symmetric :) if this is a sink?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it looks better :)
new String(Base64.getEncoder.encode(arr)) | ||
} | ||
.mapError(toK8sError) | ||
stdin <- ZIO.effect(customParameters.get("stdin").exists(_.toBoolean)).mapError(toK8sError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not check the schema, just some thoughts:
- If all the
connect
operations havestdin
,stdout
andstderr
then these could be fix built-in parameters, like for example the delete parameters and the watch filters. - If it is not available for all, is the
AttachedProcessState
a good result type for those operations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- They don't, port forward only has a list of ports, and there are port, service and pod proxy endpoints that have action connect, they have just path as option
- No, it only makes sense for attach and exec
looks very good, added two questions |
use sink
command=ls&command=-all
but generated code accepts only one command"x-kubernetes-action": "connect"
other actions like port forward, service proxy contain even more, how should we filter or group them?