Closed leecalcote closed 3 years ago
@leecalcote @kumarabd I think this issue is because of meshery server's caching issue rather than meshery adapter.
How did I reproduce the issue?
minkube start
- docker as driver)Error creating adapter instance.Error validating kubeconfig.open /home/utkarsh/.minikube/ca.crt: no such file or directory
My Conclusion
It may seem that adapter has cached the kubeconfig but instead it is because the meshery server cached the kubeconfig at step 9. This kubeconfig is not minified and flattened but because the context is not minikube
so meshery server couldn't care less about it. However meshery server sends this kubeconfig to the adapter where it tries to validate the config, there it complains that the certificate path is not reachable and hence throws an error.
How did the minikube config worked in step 7 then? It worked because the config was minified and flattened hence it had all of the certificate data in them.
How can we fix it?
I am not sure if we should be fixing this because this seems like an appropriate behaviour. In order to avoid the error, we can definitely filter out the invalid certificate authority credentials (like we do for authentication info) but in that case we may end up with the issue that the current-context
is referring to a cluster which no longer exists in the internal kubeconfig.
On the user's end, all they have to do is to upload a flattened kubeconfig and this issue should go away with that :sweat_smile:
1
- Adapter was not reachable because non minified and non flattened configs were being fed to the adapters
2
- K8s was not reachable because non minified and non flattened configs were being used while the context was still minikube
3
- Both were available because config is flattened
4
- Context has changed to KinD
which has the valid creds hence k8s is reachable however kubeconfig validation fails on the adapter side because the config is not flattened.
High quality write-up. It takes this level of thought to make great software.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.
@kumarabd considerations to account for in Meshery Server, too.
@utkarsh-pro, Do you consider this a completed issue from the perspective of the adapters?
Un-assigning myself as this is covered in meshery server.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue.
Description
Expected Behavior
Screenshots
Environment:
[Optional] To Reproduce Steps to reproduce the behavior:
[Optional] Additional Context