Comments (5)
Released with 2.3.0
from k8s.
Nice catch. I think it's not such a big deal. When I've implemented the mint client for the connect
operation, I was focusing on podExec
. Each frame you get from podExec
comes with a leading byte, annotating the channel (stdout
, stderr
, error
). That's why I'm pattern matching against that first byte in K8s.Client.Mint.Request.map_frame/1
.
Obviously, the binary stream sent when connecting to pods/log
is not prefixed. So I think all that's missing is something like this: def map_frame({:binary, <<msg::binary>>}), do: {:stdout, msg}
.
I will try to add a test and fix this weekend.
from k8s.
So I think all that's missing is something like this:
Line 216 in bf4100b
I think that this needs to accept the query params that pods/log
can put forward. Here's a good list for that: https://github.com/kube-rs/kube/blob/3e7f32e7b046c5428539050674e8d2404e3680d5/kube-core/src/subresource.rs#L40
from k8s.
I see, thanks for the hint.
I've created a PR (wip). I'm still considering splitting the pods/exec and pods/log cases for the params, though. The defaults are different and the "allowed params", too...
from k8s.
I've created a PR (wip).
Thank you. I like that; it's elegant in re-using what's already there.
I'm still considering splitting the pods/exec and pods/log cases for the params, though.
That makes sense; most of the clients I could find had separate APIs for exec/connect and logging. It would also allow for a cleaner API when not trying to follow the logs (aka :get
with the log subresource.)
from k8s.
Related Issues (20)
- Source links in the documentation are incorrect HOT 3
- Read kube config from string
- 2.0.0-rc.1 doesn't work with kind clusters HOT 6
- Configuration of http_provider and discovery_driver is ignored HOT 13
- Large resources unusable with 2.0.0 HOT 6
- Does the watch steam handle disconnects in V2? HOT 13
- Patch strategy should be configurable HOT 5
- hostname issues HOT 7
- Streams resetting resource version HOT 4
- K8s.Conn.Config does not exist HOT 4
- Improve documentation on in-cluster connection HOT 5
- what is different between k8s lib and swarm ? HOT 2
- Exception raised when running too many get requests HOT 6
- Mint HTTPAdapter failure cycle spams errors HOT 1
- Hex.pm Usage Guide doc is unavailable HOT 2
- Http2 Adapter causing 500 requests HOT 10
- Long-lasting shell connection example is broken HOT 4
- Connections being closed -- K8s.Client.Mint.HTTPAdapter Connection closed for reading and writing - stopping this process. HOT 2
- ArgumentError in K8s.Client.Mint.ConnectionRegistry on TCP Connection HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k8s.