mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-23 00:10:06 -05:00
Rename activation to joinservice
This commit is contained in:
parent
dea23604fb
commit
dc9e8e75df
@ -9,7 +9,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/edgelesssys/constellation/activation/activationproto"
|
||||
"github.com/edgelesssys/constellation/bootstrapper/internal/diskencryption"
|
||||
"github.com/edgelesssys/constellation/bootstrapper/internal/nodelock"
|
||||
"github.com/edgelesssys/constellation/bootstrapper/nodestate"
|
||||
@ -17,6 +16,7 @@ import (
|
||||
"github.com/edgelesssys/constellation/internal/cloud/metadata"
|
||||
"github.com/edgelesssys/constellation/internal/constants"
|
||||
"github.com/edgelesssys/constellation/internal/file"
|
||||
activationproto "github.com/edgelesssys/constellation/joinservice/joinproto"
|
||||
"github.com/spf13/afero"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
@ -29,7 +29,8 @@ const (
|
||||
timeout = 30 * time.Second
|
||||
)
|
||||
|
||||
// JoinClient is a client for self-activation of node.
|
||||
// JoinClient is a client for requesting the needed information and
|
||||
// joining an existing Kubernetes cluster.
|
||||
type JoinClient struct {
|
||||
nodeLock *nodelock.Lock
|
||||
diskUUID string
|
||||
@ -53,7 +54,7 @@ type JoinClient struct {
|
||||
stopDone chan struct{}
|
||||
}
|
||||
|
||||
// New creates a new SelfActivationClient.
|
||||
// New creates a new JoinClient.
|
||||
func New(lock *nodelock.Lock, dial grpcDialer, joiner ClusterJoiner, meta MetadataAPI, log *zap.Logger) *JoinClient {
|
||||
return &JoinClient{
|
||||
disk: diskencryption.New(),
|
||||
@ -68,8 +69,9 @@ func New(lock *nodelock.Lock, dial grpcDialer, joiner ClusterJoiner, meta Metada
|
||||
}
|
||||
}
|
||||
|
||||
// Start starts the client routine. The client will make the needed API calls to activate
|
||||
// the node as the role it receives from the metadata API.
|
||||
// Start starts the client routine. The client will make the needed API calls to join
|
||||
// the cluster with the role it receives from the metadata API.
|
||||
// After receiving the needed information, the node will join the cluster.
|
||||
// Multiple calls of start on the same client won't start a second routine if there is
|
||||
// already a routine running.
|
||||
func (c *JoinClient) Start() {
|
||||
|
@ -9,7 +9,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/edgelesssys/constellation/activation/activationproto"
|
||||
"github.com/edgelesssys/constellation/bootstrapper/internal/nodelock"
|
||||
"github.com/edgelesssys/constellation/bootstrapper/role"
|
||||
"github.com/edgelesssys/constellation/internal/cloud/metadata"
|
||||
@ -18,6 +17,7 @@ import (
|
||||
"github.com/edgelesssys/constellation/internal/grpc/atlscredentials"
|
||||
"github.com/edgelesssys/constellation/internal/grpc/dialer"
|
||||
"github.com/edgelesssys/constellation/internal/grpc/testdialer"
|
||||
activationproto "github.com/edgelesssys/constellation/joinservice/joinproto"
|
||||
"github.com/spf13/afero"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/goleak"
|
||||
|
@ -27,5 +27,5 @@ RUN CGO_ENABLED=0 go build -o activation-service -trimpath -buildvcs=false -ldfl
|
||||
|
||||
# We would like to use a scratch image here, but we require CA certificates to be installed for aTLS operations on GCP.
|
||||
FROM fedora@sha256:36af84ba69e21c9ef86a0424a090674c433b2b80c2462e57503886f1d823abe8 as release
|
||||
COPY --from=build /constellation/activation/activation-service /activation
|
||||
COPY --from=build /constellation/joinservice/activation-service /activation
|
||||
ENTRYPOINT [ "/activation" ]
|
@ -5,16 +5,16 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/edgelesssys/constellation/activation/kms"
|
||||
"github.com/edgelesssys/constellation/activation/kubeadm"
|
||||
"github.com/edgelesssys/constellation/activation/kubernetesca"
|
||||
"github.com/edgelesssys/constellation/activation/server"
|
||||
"github.com/edgelesssys/constellation/internal/atls"
|
||||
"github.com/edgelesssys/constellation/internal/constants"
|
||||
"github.com/edgelesssys/constellation/internal/file"
|
||||
"github.com/edgelesssys/constellation/internal/grpc/atlscredentials"
|
||||
"github.com/edgelesssys/constellation/internal/logger"
|
||||
"github.com/edgelesssys/constellation/internal/watcher"
|
||||
"github.com/edgelesssys/constellation/joinservice/kms"
|
||||
"github.com/edgelesssys/constellation/joinservice/kubeadm"
|
||||
"github.com/edgelesssys/constellation/joinservice/kubernetesca"
|
||||
"github.com/edgelesssys/constellation/joinservice/server"
|
||||
"github.com/spf13/afero"
|
||||
"go.uber.org/zap"
|
||||
)
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
||||
|
||||
package activation;
|
||||
|
||||
option go_package = "github.com/edgelesssys/constellation/activation/server/activationproto";
|
||||
option go_package = "github.com/edgelesssys/constellation/joinservice/server/activationproto";
|
||||
|
||||
service API {
|
||||
rpc ActivateWorkerNode(ActivateWorkerNodeRequest) returns (ActivateWorkerNodeResponse);
|
@ -7,12 +7,12 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
proto "github.com/edgelesssys/constellation/activation/activationproto"
|
||||
attestationtypes "github.com/edgelesssys/constellation/internal/attestation/types"
|
||||
"github.com/edgelesssys/constellation/internal/constants"
|
||||
"github.com/edgelesssys/constellation/internal/file"
|
||||
"github.com/edgelesssys/constellation/internal/grpc/grpclog"
|
||||
"github.com/edgelesssys/constellation/internal/logger"
|
||||
proto "github.com/edgelesssys/constellation/joinservice/joinproto"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
@ -8,11 +8,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/edgelesssys/constellation/activation/activationproto"
|
||||
attestationtypes "github.com/edgelesssys/constellation/internal/attestation/types"
|
||||
"github.com/edgelesssys/constellation/internal/constants"
|
||||
"github.com/edgelesssys/constellation/internal/file"
|
||||
"github.com/edgelesssys/constellation/internal/logger"
|
||||
activationproto "github.com/edgelesssys/constellation/joinservice/joinproto"
|
||||
"github.com/spf13/afero"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
Loading…
x
Reference in New Issue
Block a user