Implement Kubeconfig endpoint in DCM 04/113204/6
authorIgor D.C <igor.duarte.cardoso@intel.com>
Fri, 25 Sep 2020 05:28:09 +0000 (05:28 +0000)
committerIgor D.C <igor.duarte.cardoso@intel.com>
Tue, 29 Sep 2020 20:14:46 +0000 (20:14 +0000)
commit8a25158d77311eec27d1fb3dc41e16bfbfceebcc
tree930471e99f87b4cd20bb90ae58583ba1de92f0d3
parentb069e7e63469a34e380e2a139aa2bfeaa9fb4c7f
Implement Kubeconfig endpoint in DCM

The /kubeconfig API path allows a client to retrieve a kubeconfig
file for a specified cluster reference of a logical cloud.
- includes CA cert, address, user private key and signed cert.

This commit includes the "lazy-loading" implementation of certificate
retrieval per cluster from Rsync (which happens when clients call).

The certificate is read from the cluster status in appcontext.
Thus, Monitor and Rsync need to be configured and running.

Issue-ID: MULTICLOUD-1143
Change-Id: Ie94cd128e14c8a944861eced2bdc886d95fab6ed
Signed-off-by: Igor D.C <igor.duarte.cardoso@intel.com>
src/dcm/api/api.go
src/dcm/api/clusterHandler.go
src/dcm/go.mod
src/dcm/go.sum
src/dcm/pkg/module/cluster.go
src/dcm/pkg/module/logicalcloud.go