When the probe is run with --probe.kubernetes.role=cluster, disable
host reporting and endpoint reporting since it duplicates what is
being done by the per-host probe.
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
* Pass Go context down to Renderers
This is useful for cancellation or tracing.
* Add tracing spans to app
Also log things like number of nodes in Map, total number of reports.
- Change apigroups to apiGroups in cluster-role.yaml
- Change resourcenames to resourceNames in cluster-role.yaml
- Add selector in deploy.yaml and ds.yaml
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
This will add rules to cluster role for k8s snapshot components.
These RBAC permissions are required for scope to fetch details about
volumesnapshots and volumesnapshotdata resources.
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
- 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>