Extending initial support for kerberos-based ticket mounting.
Previously, cache has been written directly to the expected file - krb5cc_*.
With this change, cache is written to the base64(volumeID) file,
and then symlink krb5cc_* created pointing to the file with the cache.
During unstage phase only volumeID and mount path is available, and
having volumeID it's possible to do the cleanup with simple traversing
directory containing the caches.
When mounting with kerberos security, ticket cache
is expected to be set up on the host, pointing to the
/var/lib/kubelet/kubernetes/krb5cc_${uid}.
Credential cache is then taken from the creds secret and
written to the file, that is available to the host for
using.
This commit adds unit test for nodeserver.
A fake mounter is also added to support the
unit tests.
Redundant checks for target path in
NodePublishVolume has been removed. A typo
is also fixed in NodeUnstageVolume.
Signed-off-by: Animesh Kumar <animuz111@gmail.com>
This commit adds unit tests for csi-common,
mounter and smb.
A testMode parameter has been introduced in
server to enable running of unit tests.
Unit tests for unimplemented methods are also
added.
Signed-off-by: Animesh Kumar <animuz111@gmail.com>