Read all the PVC source from a pod spec
and add adjacency between the pod and its PVCs.
Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
This avoids side-effects from reporting Kubernetes from a
cluster-level probe, and removes a lie from the probe data.
Rather than do the work every time the probe sends a report, we do it
every time the app renders endpoints, which should be once per merged
report set.
When the probe first starts we should only be interested in active
connections, and if the loop re-starts it's probably because too many
connections are opening and closing to keep up with, so it's good to
drop any that are already closed then too.
Refactor the code so `handleFlow` is only called on events, and handle
the initial list of connections directly.
- don't need another wrapper round `conntrack.Connections()`
- logPipe() was only for the command-line conntrack
- nobody closes the `event` chan now, so no need to pre-check for quit
When we receive an endpoint address without a protocol, our code states we
don't support them and that the format is deprecated.
In reality it was not the case, e.g:
When we received an address in the form of `127.0.0.1`, we'd attempt to
parse the scheme from it, we'd realise is does have one (would be
equivalent to "") and our function `parseEndpoint` would return `"", "", fmt.Error`.
Then, our `parseEndpointWithFallbackProtocol` would use the
fallback protocol (unix) and attempt to connect to `unix://127.0.0.1`.
This meant two things:
1. The error returned from `parseEndpoint` would never be thrown
2. We would connect anyways since the address is valid
This commit changes the assertion logic to match the intention of using
a fallback protocol when one is not supplied.
Unhappy path tests try to cover three scenarios:
- When the endpoint URL scheme is not explicitly supported e.g. HTTP
- When the endpoint URL scheme is TCP which is also not supported
- When the fail to parse the given URL (to extract the scheme)
The happy path covers two scenarios:
- When we specify the supported scheme in the URL which is an unix
socket e.g. unix///var/run/dockershim.sock
- When we pass a socket address but fail to specify the scheme but our registry attempts
to use the fallback protocol e.g. var/run/dockershim.sock
- Add control on volume snapshot to take clone
- Add control on volume snapshot to delete it
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
- Add a new client in probe/kubernetes/client.go
which will be used to fetch details of Snapshot CRD
- Visualize VolumeSnapshot and VolumeSnapshotData
- Add adjacency between PV and VolumeSnapshot
- Add adjacency between VolumeSnapshot and VolumeSnapshotData
- Add snapshot filter to hide and show snapshots
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
So that, if many shortcut reports are produced in quick succession,
they will tend to get merged together.
Expand the queue size for shortcut reports, to avoid holding up the
producer so much.