mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-10 10:15:03 -04:00
kubernetes: support for certKey request / support for control-plane join
Signed-off-by: Benedict Schlueter <bs@edgeless.systems>
This commit is contained in:
parent
49def1e97f
commit
0ac9617dac
8 changed files with 84 additions and 11 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/edgelesssys/constellation/coordinator/kubernetes/k8sapi"
|
||||
"github.com/edgelesssys/constellation/coordinator/kubernetes/k8sapi/resources"
|
||||
"github.com/edgelesssys/constellation/coordinator/role"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
@ -64,6 +65,10 @@ func (s *stubClusterUtil) RestartKubelet() error {
|
|||
return s.restartKubeletErr
|
||||
}
|
||||
|
||||
func (s *stubClusterUtil) GetControlPlaneJoinCertificateKey() (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
type stubConfigProvider struct {
|
||||
InitConfig k8sapi.KubeadmInitYAML
|
||||
JoinConfig k8sapi.KubeadmJoinYAML
|
||||
|
@ -236,7 +241,7 @@ func TestJoinCluster(t *testing.T) {
|
|||
require := require.New(t)
|
||||
|
||||
kube := New(&tc.clusterUtil, &stubConfigProvider{}, &client)
|
||||
err := kube.JoinCluster(joinCommand, instanceName, nodeVPNIP, coordinatorProviderID)
|
||||
err := kube.JoinCluster(joinCommand, instanceName, nodeVPNIP, nodeVPNIP, coordinatorProviderID, "", role.Node)
|
||||
if tc.expectErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue