mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-27 01:05:18 -04:00
Install kubernetes on init / join and restart kubelet after reboot
Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
parent
f67cf2d31f
commit
1331ee4077
9 changed files with 141 additions and 18 deletions
|
@ -1,6 +1,7 @@
|
|||
package kubernetes
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -20,12 +21,14 @@ func TestMain(m *testing.M) {
|
|||
}
|
||||
|
||||
type stubClusterUtil struct {
|
||||
installComponentsErr error
|
||||
initClusterErr error
|
||||
setupPodNetworkErr error
|
||||
setupAutoscalingError error
|
||||
setupCloudControllerManagerError error
|
||||
setupCloudNodeManagerError error
|
||||
joinClusterErr error
|
||||
startKubeletErr error
|
||||
restartKubeletErr error
|
||||
createJoinTokenResponse *kubeadm.BootstrapTokenDiscovery
|
||||
createJoinTokenErr error
|
||||
|
@ -34,6 +37,10 @@ type stubClusterUtil struct {
|
|||
joinConfigs [][]byte
|
||||
}
|
||||
|
||||
func (s *stubClusterUtil) InstallComponents(ctx context.Context, version string) error {
|
||||
return s.installComponentsErr
|
||||
}
|
||||
|
||||
func (s *stubClusterUtil) InitCluster(initConfig []byte) error {
|
||||
s.initConfigs = append(s.initConfigs, initConfig)
|
||||
return s.initClusterErr
|
||||
|
@ -60,6 +67,10 @@ func (s *stubClusterUtil) JoinCluster(joinConfig []byte) error {
|
|||
return s.joinClusterErr
|
||||
}
|
||||
|
||||
func (s *stubClusterUtil) StartKubelet() error {
|
||||
return s.startKubeletErr
|
||||
}
|
||||
|
||||
func (s *stubClusterUtil) RestartKubelet() error {
|
||||
return s.restartKubeletErr
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue