Documentation ¶
Index ¶
- Variables
- func DeleteClusterCertificate(client *kubernetes.Clientset) error
- func ExistingCluster(domain string, cluster map[string]string) string
- func FQDN(domain, hostname, ip string) string
- func GetAuthGateway(client *kubernetes.Clientset, identity users.Identity) (storage.AuthGateway, error)
- func GetClusterCertificate(client *kubernetes.Clientset) ([]byte, []byte, error)
- func GetClusterMetrics(ctx context.Context, metrics monitoring.Metrics, req ops.ClusterMetricsRequest) (*ops.ClusterMetricsResponse, error)
- func GetMounts(m schema.Manifest, server storage.Server) ([]storage.Mount, error)
- func NewConfigurationConfigMap(config []byte) *v1.ConfigMap
- func NewEnvironmentConfigMap(data map[string]string) *v1.ConfigMap
- func PackageSuffix(node remoteServer, clusterName string) string
- func PlanetCertAuthorityPackage(repository string) loc.Locator
- func ReadCertAuthorityPackage(packages pack.PackageService, clusterName string) (utils.TLSArchive, error)
- func UpdateClusterCertificate(client *kubernetes.Clientset, req ops.UpdateCertificateRequest) error
- func UpsertAuthGateway(client *kubernetes.Clientset, identity users.Identity, gw storage.AuthGateway) error
- func ValidateServers(ctx context.Context, operator ops.Operator, req ops.ValidateServersRequest) error
- type AgentPeerStore
- type AgentService
- func (r *AgentService) AbortAgents(ctx context.Context, key ops.SiteOperationKey) error
- func (r *AgentService) CheckBandwidth(ctx context.Context, key ops.SiteOperationKey, game checks.PingPongGame) (checks.PingPongGameResults, error)
- func (r *AgentService) CheckDisks(ctx context.Context, key ops.SiteOperationKey, addr string, ...) (*validationpb.CheckDisksResponse, error)
- func (r *AgentService) CheckPorts(ctx context.Context, key ops.SiteOperationKey, game checks.PingPongGame) (checks.PingPongGameResults, error)
- func (r *AgentService) CompleteAgents(ctx context.Context, key ops.SiteOperationKey) error
- func (r *AgentService) Exec(ctx context.Context, key ops.SiteOperationKey, addr string, args []string, ...) error
- func (r *AgentService) ExecNoLog(ctx context.Context, key ops.SiteOperationKey, addr string, args []string, ...) error
- func (r *AgentService) GetServerInfos(ctx context.Context, key ops.SiteOperationKey) (checks.ServerInfos, error)
- func (r *AgentService) ServerAddr() string
- func (r *AgentService) StopAgents(ctx context.Context, key ops.SiteOperationKey) error
- func (r *AgentService) Validate(ctx context.Context, key ops.SiteOperationKey, addr string, ...) ([]*agentpb.Probe, error)
- func (r *AgentService) Wait(ctx context.Context, key ops.SiteOperationKey, numAgents int) error
- type CloudProvider
- type Command
- type Config
- type LogForwardersControl
- type OpenEBSConfig
- type OpenEBSControl
- type Operator
- func (o *Operator) ActivateSite(req ops.ActivateSiteRequest) error
- func (o *Operator) CheckSiteStatus(ctx context.Context, key ops.SiteKey) error
- func (o *Operator) CompleteFinalInstallStep(req ops.CompleteFinalInstallStepRequest) error
- func (o *Operator) ConfigureNode(req ops.ConfigureNodeRequest) error
- func (o *Operator) ConfigurePackages(req ops.ConfigurePackagesRequest) error
- func (o *Operator) CreateAPIKey(ctx context.Context, req ops.NewAPIKeyRequest) (*storage.APIKey, error)
- func (o *Operator) CreateAccount(req ops.NewAccountRequest) (*ops.Account, error)
- func (o *Operator) CreateClusterGarbageCollectOperation(ctx context.Context, r ops.CreateClusterGarbageCollectOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateClusterReconfigureOperation(ctx context.Context, req ops.CreateClusterReconfigureOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateInstallToken(req ops.NewInstallTokenRequest) (*storage.InstallToken, error)
- func (o *Operator) CreateLogEntry(key ops.SiteOperationKey, entry ops.LogEntry) error
- func (o *Operator) CreateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error
- func (o *Operator) CreateOperationPlan(key ops.SiteOperationKey, plan storage.OperationPlan) error
- func (o *Operator) CreateOperationPlanChange(key ops.SiteOperationKey, change storage.PlanChange) error
- func (o *Operator) CreateProgressEntry(key ops.SiteOperationKey, entry ops.ProgressEntry) error
- func (o *Operator) CreateProvisioningToken(token storage.ProvisioningToken) error
- func (o *Operator) CreateSite(r ops.NewSiteRequest) (*ops.Site, error)
- func (o *Operator) CreateSiteAppUpdateOperation(ctx context.Context, r ops.CreateSiteAppUpdateOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateSiteExpandOperation(ctx context.Context, r ops.CreateSiteExpandOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateSiteInstallOperation(ctx context.Context, r ops.CreateSiteInstallOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateSiteShrinkOperation(ctx context.Context, r ops.CreateSiteShrinkOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateSiteUninstallOperation(ctx context.Context, r ops.CreateSiteUninstallOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateUpdateConfigOperation(ctx context.Context, req ops.CreateUpdateConfigOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateUpdateEnvarsOperation(ctx context.Context, r ops.CreateUpdateEnvarsOperationRequest) (*ops.SiteOperationKey, error)
- func (o *Operator) CreateUser(req ops.NewUserRequest) error
- func (o *Operator) CreateUserInvite(ctx context.Context, req ops.CreateUserInviteRequest) (*storage.UserToken, error)
- func (o *Operator) CreateUserReset(ctx context.Context, req ops.CreateUserResetRequest) (*storage.UserToken, error)
- func (o *Operator) DeactivateSite(req ops.DeactivateSiteRequest) error
- func (o *Operator) DeleteAPIKey(ctx context.Context, userEmail, token string) error
- func (o *Operator) DeleteAlert(ctx context.Context, key ops.SiteKey, name string) error
- func (o *Operator) DeleteAlertTarget(ctx context.Context, key ops.SiteKey) error
- func (o *Operator) DeleteClusterCertificate(ctx context.Context, key ops.SiteKey) error
- func (o *Operator) DeleteGithubConnector(ctx context.Context, key ops.SiteKey, name string) error
- func (o *Operator) DeleteLocalUser(email string) error
- func (o *Operator) DeleteLogForwarder(ctx context.Context, key ops.SiteKey, name string) error
- func (o *Operator) DeleteSMTPConfig(ctx context.Context, key ops.SiteKey) error
- func (o *Operator) DeleteSite(key ops.SiteKey) error
- func (o *Operator) DeleteSiteOperation(key ops.SiteOperationKey) (err error)
- func (o *Operator) DeleteUser(ctx context.Context, key ops.SiteKey, name string) error
- func (o *Operator) DeleteUserInvite(ctx context.Context, req ops.DeleteUserInviteRequest) error
- func (o *Operator) EmitAuditEvent(ctx context.Context, req ops.AuditEventRequest) error
- func (o *Operator) GetAPIKeys(userEmail string) ([]storage.APIKey, error)
- func (o *Operator) GetAccount(accountID string) (*ops.Account, error)
- func (o *Operator) GetAccounts() ([]ops.Account, error)
- func (o *Operator) GetAlertTargets(key ops.SiteKey) (targets []storage.AlertTarget, err error)
- func (o *Operator) GetAlerts(key ops.SiteKey) (alerts []storage.Alert, err error)
- func (o *Operator) GetAppInstaller(req ops.AppInstallerRequest) (io.ReadCloser, error)
- func (o *Operator) GetApplicationEndpoints(key ops.SiteKey) ([]ops.Endpoint, error)
- func (o *Operator) GetAuthGateway(key ops.SiteKey) (storage.AuthGateway, error)
- func (o *Operator) GetClusterAgent(req ops.ClusterAgentRequest) (*storage.LoginEntry, error)
- func (o *Operator) GetClusterAuthPreference(key ops.SiteKey) (teleservices.AuthPreference, error)
- func (o *Operator) GetClusterCertificate(key ops.SiteKey, withSecrets bool) (*ops.ClusterCertificate, error)
- func (o *Operator) GetClusterConfiguration(key ops.SiteKey) (config clusterconfig.Interface, err error)
- func (o *Operator) GetClusterEnvironmentVariables(key ops.SiteKey) (env storage.EnvironmentVariables, err error)
- func (o *Operator) GetClusterMetrics(ctx context.Context, req ops.ClusterMetricsRequest) (*ops.ClusterMetricsResponse, error)
- func (o *Operator) GetClusterNodes(key ops.SiteKey) ([]ops.Node, error)
- func (o *Operator) GetConfig() Config
- func (o *Operator) GetCurrentUser() (storage.User, error)
- func (o *Operator) GetCurrentUserInfo() (*ops.UserInfo, error)
- func (o *Operator) GetExpandToken(key ops.SiteKey) (*storage.ProvisioningToken, error)
- func (o *Operator) GetGithubConnector(key ops.SiteKey, name string, withSecrets bool) (teleservices.GithubConnector, error)
- func (o *Operator) GetGithubConnectors(key ops.SiteKey, withSecrets bool) ([]teleservices.GithubConnector, error)
- func (o *Operator) GetKubeClient() (*kubernetes.Clientset, error)
- func (o *Operator) GetLocalSite(context.Context) (*ops.Site, error)
- func (o *Operator) GetLocalUser(key ops.SiteKey) (storage.User, error)
- func (o *Operator) GetLogForwarders(key ops.SiteKey) ([]storage.LogForwarder, error)
- func (o *Operator) GetOperationPlan(key ops.SiteOperationKey) (*storage.OperationPlan, error)
- func (o *Operator) GetPersistentStorage(ctx context.Context, key ops.SiteKey) (storage.PersistentStorage, error)
- func (o *Operator) GetSMTPConfig(key ops.SiteKey) (storage.SMTPConfig, error)
- func (o *Operator) GetSite(key ops.SiteKey) (*ops.Site, error)
- func (o *Operator) GetSiteByDomain(domainName string) (*ops.Site, error)
- func (o *Operator) GetSiteExpandOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)
- func (o *Operator) GetSiteInstallOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)
- func (o *Operator) GetSiteInstructions(tokenID string, serverProfile string, params url.Values) (string, error)
- func (o *Operator) GetSiteOperation(key ops.SiteOperationKey) (*ops.SiteOperation, error)
- func (o *Operator) GetSiteOperationLogs(key ops.SiteOperationKey) (io.ReadCloser, error)
- func (o *Operator) GetSiteOperationProgress(key ops.SiteOperationKey) (*ops.ProgressEntry, error)
- func (o *Operator) GetSiteOperations(key ops.SiteKey, f ops.OperationsFilter) (ops.SiteOperations, error)
- func (o *Operator) GetSiteReport(ctx context.Context, req ops.GetClusterReportRequest) (io.ReadCloser, error)
- func (o *Operator) GetSites(accountID string) ([]ops.Site, error)
- func (o *Operator) GetTrustedClusterToken(key ops.SiteKey) (storage.Token, error)
- func (o *Operator) GetUser(key ops.SiteKey, name string) (teleservices.User, error)
- func (o *Operator) GetUserInvites(ctx context.Context, key ops.SiteKey) ([]storage.UserInvite, error)
- func (o *Operator) GetUsers(key ops.SiteKey) ([]teleservices.User, error)
- func (o *Operator) GetVersion(ctx context.Context) (*proto.Version, error)
- func (o *Operator) ListReleases(req ops.ListReleasesRequest) ([]storage.Release, error)
- func (o *Operator) Lock()
- func (o *Operator) RemoteOpsClient(cluster teleservices.TrustedCluster) (*opsclient.Client, error)
- func (o *Operator) ResetUserPassword(req ops.ResetUserPasswordRequest) (string, error)
- func (o *Operator) ResumeShrink(key ops.SiteKey) (*ops.SiteOperationKey, error)
- func (o *Operator) RotatePlanetConfig(req ops.RotatePlanetConfigRequest) (*ops.RotatePackageResponse, error)
- func (o *Operator) RotateSecrets(req ops.RotateSecretsRequest) (resp *ops.RotatePackageResponse, err error)
- func (o *Operator) RotateTeleportConfig(req ops.RotateTeleportConfigRequest) (masterConfig *ops.RotatePackageResponse, nodeConfig *ops.RotatePackageResponse, ...)
- func (o *Operator) SetKubeClient(client *kubernetes.Clientset)
- func (o *Operator) SetOperationState(ctx context.Context, key ops.SiteOperationKey, ...) error
- func (o *Operator) SignSSHKey(req ops.SSHSignRequest) (*ops.SSHSignResponse, error)
- func (o *Operator) SignTLSKey(req ops.TLSSignRequest) (*ops.TLSSignResponse, error)
- func (o *Operator) SiteExpandOperationStart(key ops.SiteOperationKey) error
- func (o *Operator) SiteInstallOperationStart(key ops.SiteOperationKey) error
- func (o *Operator) StepDown(key ops.SiteKey) error
- func (o *Operator) StreamOperationLogs(key ops.SiteOperationKey, reader io.Reader) error
- func (o *Operator) Unlock()
- func (o *Operator) UpdateAlert(ctx context.Context, key ops.SiteKey, alert storage.Alert) error
- func (o *Operator) UpdateAlertTarget(ctx context.Context, key ops.SiteKey, target storage.AlertTarget) error
- func (o *Operator) UpdateClusterCertificate(ctx context.Context, req ops.UpdateCertificateRequest) (*ops.ClusterCertificate, error)
- func (o *Operator) UpdateClusterConfiguration(req ops.UpdateClusterConfigRequest) error
- func (o *Operator) UpdateClusterEnvironmentVariables(req ops.UpdateClusterEnvironRequest) error
- func (o *Operator) UpdateExpandOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) error
- func (o *Operator) UpdateInstallOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) error
- func (o *Operator) UpdateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error
- func (o *Operator) UpdateLogForwarders(key ops.SiteKey, forwarders []storage.LogForwarderV1) error
- func (o *Operator) UpdatePersistentStorage(ctx context.Context, req ops.UpdatePersistentStorageRequest) error
- func (o *Operator) UpdateSMTPConfig(ctx context.Context, key ops.SiteKey, config storage.SMTPConfig) error
- func (o *Operator) UpdateUser(ctx context.Context, req ops.UpdateUserRequest) error
- func (o *Operator) UpsertAuthGateway(ctx context.Context, key ops.SiteKey, gw storage.AuthGateway) error
- func (o *Operator) UpsertClusterAuthPreference(ctx context.Context, key ops.SiteKey, auth teleservices.AuthPreference) error
- func (o *Operator) UpsertGithubConnector(ctx context.Context, key ops.SiteKey, connector teleservices.GithubConnector) error
- func (o *Operator) UpsertUser(ctx context.Context, key ops.SiteKey, user teleservices.User) error
- func (o *Operator) ValidateDomainName(domainName string) error
- func (o *Operator) ValidateRemoteAccess(req ops.ValidateRemoteAccessRequest) (*ops.ValidateRemoteAccessResponse, error)
- func (o *Operator) ValidateServers(ctx context.Context, req ops.ValidateServersRequest) (*ops.ValidateServersResponse, error)
- type ProvisionedServer
- func (s *ProvisionedServer) Address() string
- func (s *ProvisionedServer) AgentName(domain string) string
- func (s *ProvisionedServer) Debug() string
- func (s *ProvisionedServer) EtcdMemberName(domain string) string
- func (s *ProvisionedServer) FQDN(domain string) string
- func (s *ProvisionedServer) HostName() string
- func (s *ProvisionedServer) InGravity(dir ...string) string
- func (s *ProvisionedServer) IsMaster() bool
- func (s *ProvisionedServer) String() string
- func (s *ProvisionedServer) UnqualifiedName(clusterName string) string
- type TestServices
- type Versions
Constants ¶
This section is empty.
Variables ¶
var ( // DirectUpgradeVersions contains gravity versions where there's a direct // upgrade path to the current gravity version. // // Specified versions are treated as a minimum version of the respective // release line from which the direct upgrade is possible. // // For instance, if the version is 5.2.10, the current version can upgrade // directly from 5.2.10, 5.2.11 and so on. DirectUpgradeVersions = Versions{ semver.New("7.1.0"), semver.New("8.0.0"), semver.New("9.0.0"), } // UpgradeViaVersions maps older gravity versions to versions that can be // used as an intermediate step when upgrading to the current version. // // Specified versions are treated as described above. // // This version does not currently support upgrades via intermediate // runtimes. UpgradeViaVersions = map[*semver.Version]Versions{} )
Functions ¶
func DeleteClusterCertificate ¶
func DeleteClusterCertificate(client *kubernetes.Clientset) error
DeleteClusterCertificate deletes cluster certificate
func ExistingCluster ¶
ExistingCluster returns combined addresses of all the existing servers as reported by etcd member add
func GetAuthGateway ¶
func GetAuthGateway(client *kubernetes.Clientset, identity users.Identity) (storage.AuthGateway, error)
GetAuthGateway returns auth gateway configuration
func GetClusterCertificate ¶
func GetClusterCertificate(client *kubernetes.Clientset) ([]byte, []byte, error)
GetClusterCertificate returns certificate and private key data stored in a secret inside the cluster
The method is supposed to be called from within deployed Kubernetes cluster
func GetClusterMetrics ¶
func GetClusterMetrics(ctx context.Context, metrics monitoring.Metrics, req ops.ClusterMetricsRequest) (*ops.ClusterMetricsResponse, error)
GetClusterMetrics retrieves all cluster metrics from the provided client.
func NewConfigurationConfigMap ¶
NewConfigurationConfigMap creates the backing ConfigMap to host cluster configuration
func NewEnvironmentConfigMap ¶
NewEnvironmentConfigMap creates the backing ConfigMap to host cluster runtime environment variables
func PackageSuffix ¶
PackageSuffix returns a new package suffix used in package names from the specified node address and given cluster name
func PlanetCertAuthorityPackage ¶
PlanetCertAuthorityPackage returns the name of the planet CA package
func ReadCertAuthorityPackage ¶
func ReadCertAuthorityPackage(packages pack.PackageService, clusterName string) (utils.TLSArchive, error)
ReadCertAuthorityPackage returns the certificate authority package for the specified cluster
func UpdateClusterCertificate ¶
func UpdateClusterCertificate(client *kubernetes.Clientset, req ops.UpdateCertificateRequest) error
UpdateClusterCertificate updates the cluster certificate and private key
The method is supposed to be called from within deployed Kubernetes cluster
func UpsertAuthGateway ¶
func UpsertAuthGateway(client *kubernetes.Clientset, identity users.Identity, gw storage.AuthGateway) error
UpsertAuthGateway updates auth gateway configuration.
func ValidateServers ¶
func ValidateServers(ctx context.Context, operator ops.Operator, req ops.ValidateServersRequest) error
ValidateServers executes preflight checks and returns formatted error if any of the checks fail.
Types ¶
type AgentPeerStore ¶
type AgentPeerStore struct { log.FieldLogger // contains filtered or unexported fields }
AgentPeerStore manages groups of agents based on operation context. Implements rpcserver.PeerStore
func NewAgentPeerStore ¶
func NewAgentPeerStore(backend storage.Backend, users users.Users, teleport ops.TeleportProxyService, log log.FieldLogger) *AgentPeerStore
NewAgentPeerStore creates a new instance of this agent peer store
func (*AgentPeerStore) NewPeer ¶
func (r *AgentPeerStore) NewPeer(ctx context.Context, req pb.PeerJoinRequest, peer rpcserver.Peer) error
NewPeer adds a new peer
func (*AgentPeerStore) RemovePeer ¶
func (r *AgentPeerStore) RemovePeer(ctx context.Context, req pb.PeerLeaveRequest, peer rpcserver.Peer) error
RemovePeer removes the specified peer from the store
type AgentService ¶
type AgentService struct { log.FieldLogger rpcserver.Server // contains filtered or unexported fields }
AgentService is a controller for install agents. Implements ops.AgentService
func NewAgentService ¶
func NewAgentService(server rpcserver.Server, peerStore *AgentPeerStore, advertiseAddr string, log log.FieldLogger) *AgentService
NewAgentService returns a new agent service
func (*AgentService) AbortAgents ¶
func (r *AgentService) AbortAgents(ctx context.Context, key ops.SiteOperationKey) error
AbortAgents shuts down remote agents and cleans up state
func (*AgentService) CheckBandwidth ¶
func (r *AgentService) CheckBandwidth(ctx context.Context, key ops.SiteOperationKey, game checks.PingPongGame) (checks.PingPongGameResults, error)
CheckBandwidth executes the bandwidth test in the agent cluster
func (*AgentService) CheckDisks ¶
func (r *AgentService) CheckDisks(ctx context.Context, key ops.SiteOperationKey, addr string, req *validationpb.CheckDisksRequest) (*validationpb.CheckDisksResponse, error)
CheckDisks executes disk performance test on the specified node
func (*AgentService) CheckPorts ¶
func (r *AgentService) CheckPorts(ctx context.Context, key ops.SiteOperationKey, game checks.PingPongGame) (checks.PingPongGameResults, error)
CheckPorts executes the ports pingpong network test in the agent cluster
func (*AgentService) CompleteAgents ¶
func (r *AgentService) CompleteAgents(ctx context.Context, key ops.SiteOperationKey) error
CompleteAgents shuts down remote agents after a successfully completed operation
func (*AgentService) Exec ¶
func (r *AgentService) Exec(ctx context.Context, key ops.SiteOperationKey, addr string, args []string, stdout, stderr io.Writer) error
Exec executes command on a remote server that is identified by meeting point and agent's address addr
func (*AgentService) ExecNoLog ¶
func (r *AgentService) ExecNoLog(ctx context.Context, key ops.SiteOperationKey, addr string, args []string, stdout, stderr io.Writer) error
ExecNoLog executes the command specified with args on a remote server given with addr. It streams the process's output to the given writer out. Underlying remote call output is not logged
func (*AgentService) GetServerInfos ¶
func (r *AgentService) GetServerInfos(ctx context.Context, key ops.SiteOperationKey) (checks.ServerInfos, error)
GetServerInfos collects system information from all agents given with addrs
func (*AgentService) ServerAddr ¶
func (r *AgentService) ServerAddr() string
ServerAddr returns the address the install server is listening on
func (*AgentService) StopAgents ¶
func (r *AgentService) StopAgents(ctx context.Context, key ops.SiteOperationKey) error
StopAgents shuts down remote agents
func (*AgentService) Validate ¶
func (r *AgentService) Validate(ctx context.Context, key ops.SiteOperationKey, addr string, manifest schema.Manifest, profileName string) ([]*agentpb.Probe, error)
Validate executes preflight checks on the node specified with addr using the specified manifest.
func (*AgentService) Wait ¶
func (r *AgentService) Wait(ctx context.Context, key ops.SiteOperationKey, numAgents int) error
Wait blocks until the specified number of agents have connected for the the given operation. Context can be used for canceling the operation.
type CloudProvider ¶
type CloudProvider interface { }
CloudProvider defines an interface to customize certain aspects of deployment
type Command ¶
type Command struct { // Args is a slice of command arguments Args []string // Description is a user friendly description of this command Description string // Retry indicates whether the command should be retried upon failure Retry bool }
Command is a command to execute, includes arguments and user-facing description
type Config ¶
type Config struct { // StateDir is for some state is stored locally for now StateDir string // Backend is a storage backend Backend storage.Backend // Leader specifies the leader campaign implementation Leader storage.Leader // Agents service controls install agents that run on the hosts Agents *AgentService // Clients provides access to clients for remote clusters such as operator or apps Clients *clients.ClusterClients // Packages service controls release and remote access to software // packages Packages pack.PackageService // Apps service manages application packages Apps appservice.Applications // TeleportProxyService is a teleport proxy service TeleportProxy ops.TeleportProxyService // AuthClient is teleport auth server client. AuthClient *auth.Client // Tunnel is a reverse tunnel server providing access to remote sites Tunnel reversetunnel.Server // Users service provides access to users Users users.Identity // Metrics provides interface for cluster metrics collection. Metrics monitoring.Metrics // Clock is used to mock time in tests Clock timetools.TimeProvider // Devmode sets/removes some insecure flags acceptable for development Devmode bool // Local flag indicates whether the process is running in the local gravity site mode Local bool // Wizard flag indicates whether the process is running in wizard install mode Wizard bool // Proxy lets this ops center service communicate with other serices Proxy ops.Proxy // SNIHost if set, sets a base SNI host for APIServer SNIHost string // SeedConfig defines optional OpsCenter configuration to start with SeedConfig ops.SeedConfig // ProcessID uniquely identifies gravity process ProcessID string // PublicAddr is the operator service public advertise address PublicAddr teleutils.NetAddr // InstallLogFiles is a list of additional install log files // to add to install and expand operations for local troubleshooting InstallLogFiles []string // LogForwarders allows to manage log forwarders via Kubernetes config maps LogForwarders LogForwardersControl // OpenEBS provides access to managing OpenEBS in the cluster. OpenEBS OpenEBSControl // Client specifies an optional kubernetes client Client *kubernetes.Clientset // AuditLog is used to submit events to the audit log AuditLog teleevents.IAuditLog }
Config holds configuration parameters for operator service
func (*Config) CheckAndSetDefaults ¶
func (*Config) CheckRelaxed ¶
type LogForwardersControl ¶
type LogForwardersControl interface { // Get returns a list of log forwarders from config map Get() ([]storage.LogForwarder, error) // Replace replaces all log forwarders in config map with the provided ones Replace([]storage.LogForwarder) error // Create adds a new log forwarder in config map Create(storage.LogForwarder) error // Update updates an existing log forwarder in config map Update(storage.LogForwarder) error // Delete deletes log forwarder from config map Delete(string) error // Reload forces log collector to reload forwarder configuration Reload() error }
LogForwardersControl defines methods for managing log forwarders in Kubernetes, mostly so implementation can be substituted in tests w/o Kubernetes
func NewLogForwardersControl ¶
func NewLogForwardersControl(client *kubernetes.Clientset) LogForwardersControl
NewLogForwardersControl returns a default Kubernetes-managed log forwarder controller
type OpenEBSConfig ¶
type OpenEBSConfig struct { // Client is the Kubernetes client. Client *kubernetes.Clientset // Namespace is the namespace where OpenEBS components reside. Namespace string // ConfigMapName is the name of the config map with node device manager configuration. ConfigMapName string // DaemonSetName is the name of the node device manager daemon set. DaemonSetName string }
OpenEBSConfig is the OpenEBS controller configuration.
func (*OpenEBSConfig) CheckAndSetDefaults ¶
func (c *OpenEBSConfig) CheckAndSetDefaults() error
CheckAndSetDefaults validates the config and sets defaults.
type OpenEBSControl ¶
type OpenEBSControl interface { // GetNDMConfig returns node device manager configuration. GetNDMConfig() (*storage.NDMConfig, error) // UpdateNDMConfig updates node device manager configuration. UpdateNDMConfig(*storage.NDMConfig) error // RestartNDM restarts node device manager pods. RestartNDM() error }
OpenEBSControl provides interface for managing OpenEBS in the cluster.
func NewOpenEBSControl ¶
func NewOpenEBSControl(config OpenEBSConfig) (OpenEBSControl, error)
NewOpenEBSControl returns a new OpenEBS controller for the provided client.
type Operator ¶
type Operator struct { // FieldLogger allows this operator to log messages log.FieldLogger // contains filtered or unexported fields }
Operator implements Operator interface
func NewLocalOperator ¶
NewLocalOperator creates an instance of the operator service that is used in a restricted context to allow access to the up-to-date APIs (i.e. during update)
func (*Operator) ActivateSite ¶
func (o *Operator) ActivateSite(req ops.ActivateSiteRequest) error
ActivateSite moves site to the active state and, if requested, starts an application.
func (*Operator) CheckSiteStatus ¶
CheckSiteStatus runs application status hook and updates cluster status appropriately
func (*Operator) CompleteFinalInstallStep ¶
func (o *Operator) CompleteFinalInstallStep(req ops.CompleteFinalInstallStepRequest) error
CompleteFinalInstallStep marks the site as having completed the mandatory last installation step
func (*Operator) ConfigureNode ¶
func (o *Operator) ConfigureNode(req ops.ConfigureNodeRequest) error
ConfigureNode prepares the node for the upgrade, for example updates necessary directories permissions and creates missing ones
func (*Operator) ConfigurePackages ¶
func (o *Operator) ConfigurePackages(req ops.ConfigurePackagesRequest) error
ConfigurePackages packages configures packages for the specified install operation
func (*Operator) CreateAPIKey ¶
func (*Operator) CreateAccount ¶
func (*Operator) CreateClusterGarbageCollectOperation ¶
func (o *Operator) CreateClusterGarbageCollectOperation(ctx context.Context, r ops.CreateClusterGarbageCollectOperationRequest) (*ops.SiteOperationKey, error)
CreateClusterGarbageCollectOperation creates a new garbage collection operation in the cluster
func (*Operator) CreateClusterReconfigureOperation ¶
func (o *Operator) CreateClusterReconfigureOperation(ctx context.Context, req ops.CreateClusterReconfigureOperationRequest) (*ops.SiteOperationKey, error)
CreateClusterReconfigureOperation creates a new cluster reconfiguration operation.
func (*Operator) CreateInstallToken ¶
func (o *Operator) CreateInstallToken(req ops.NewInstallTokenRequest) (*storage.InstallToken, error)
CreateInstallToken creates a new install token for the specified request. If the token already exists, it returns an existing token
func (*Operator) CreateLogEntry ¶
CreateLogEntry appends the provided log entry to the operation's log file
func (*Operator) CreateLogForwarder ¶
func (o *Operator) CreateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error
CreateLogForwarder creates a new log forwarder
func (*Operator) CreateOperationPlan ¶
func (o *Operator) CreateOperationPlan(key ops.SiteOperationKey, plan storage.OperationPlan) error
CreateOperationPlan saves the provided operation plan
func (*Operator) CreateOperationPlanChange ¶
func (o *Operator) CreateOperationPlanChange(key ops.SiteOperationKey, change storage.PlanChange) error
CreateOperationPlanChange creates a new changelog entry for a plan
func (*Operator) CreateProgressEntry ¶
func (o *Operator) CreateProgressEntry(key ops.SiteOperationKey, entry ops.ProgressEntry) error
func (*Operator) CreateProvisioningToken ¶
func (o *Operator) CreateProvisioningToken(token storage.ProvisioningToken) error
func (*Operator) CreateSite ¶
func (*Operator) CreateSiteAppUpdateOperation ¶
func (o *Operator) CreateSiteAppUpdateOperation(ctx context.Context, r ops.CreateSiteAppUpdateOperationRequest) (*ops.SiteOperationKey, error)
func (*Operator) CreateSiteExpandOperation ¶
func (o *Operator) CreateSiteExpandOperation(ctx context.Context, r ops.CreateSiteExpandOperationRequest) (*ops.SiteOperationKey, error)
func (*Operator) CreateSiteInstallOperation ¶
func (o *Operator) CreateSiteInstallOperation(ctx context.Context, r ops.CreateSiteInstallOperationRequest) (*ops.SiteOperationKey, error)
func (*Operator) CreateSiteShrinkOperation ¶
func (o *Operator) CreateSiteShrinkOperation(ctx context.Context, r ops.CreateSiteShrinkOperationRequest) (*ops.SiteOperationKey, error)
func (*Operator) CreateSiteUninstallOperation ¶
func (o *Operator) CreateSiteUninstallOperation(ctx context.Context, r ops.CreateSiteUninstallOperationRequest) (*ops.SiteOperationKey, error)
func (*Operator) CreateUpdateConfigOperation ¶
func (o *Operator) CreateUpdateConfigOperation(ctx context.Context, req ops.CreateUpdateConfigOperationRequest) (*ops.SiteOperationKey, error)
CreateUpdateConfigOperation creates a new operation to update cluster configuration
func (*Operator) CreateUpdateEnvarsOperation ¶
func (o *Operator) CreateUpdateEnvarsOperation(ctx context.Context, r ops.CreateUpdateEnvarsOperationRequest) (*ops.SiteOperationKey, error)
CreateUpdateEnvarsOperation creates a new operation to update cluster environment variables
func (*Operator) CreateUser ¶
func (o *Operator) CreateUser(req ops.NewUserRequest) error
func (*Operator) CreateUserInvite ¶
func (o *Operator) CreateUserInvite(ctx context.Context, req ops.CreateUserInviteRequest) (*storage.UserToken, error)
CreateUserInvite creates a new invite token for a user.
func (*Operator) CreateUserReset ¶
func (o *Operator) CreateUserReset(ctx context.Context, req ops.CreateUserResetRequest) (*storage.UserToken, error)
CreateUserReset creates a new reset token for a user.
func (*Operator) DeactivateSite ¶
func (o *Operator) DeactivateSite(req ops.DeactivateSiteRequest) error
DeactivateSite puts the site in the degraded state and, if requested, stops an application.
func (*Operator) DeleteAPIKey ¶
func (*Operator) DeleteAlert ¶
DeleteAlert deletes the specified monitoring alert
func (*Operator) DeleteAlertTarget ¶
DeleteAlertTarget deletes the cluster monitoring alert target
func (*Operator) DeleteClusterCertificate ¶
DeleteClusterCertificate deletes cluster certificate
func (*Operator) DeleteGithubConnector ¶
DeleteGithubConnector deletes a Github connector by name
func (*Operator) DeleteLocalUser ¶
func (*Operator) DeleteLogForwarder ¶
DeleteLogForwarder deletes a log forwarder
func (*Operator) DeleteSMTPConfig ¶
DeleteSMTPConfig deletes the cluster SMTP configuration
func (*Operator) DeleteSiteOperation ¶
func (o *Operator) DeleteSiteOperation(key ops.SiteOperationKey) (err error)
DeleteSiteOperation removes an unstarted operation and resets site state to active
func (*Operator) DeleteUser ¶
DeleteUser deletes a user by name
func (*Operator) DeleteUserInvite ¶
DeleteUserInvite deletes the specified user invite.
func (*Operator) EmitAuditEvent ¶
EmitAuditEvent saves the provided event in the audit log.
func (*Operator) GetAPIKeys ¶
func (*Operator) GetAlertTargets ¶
GetAlertTargets returns a list of configured monitoring alert targets
func (*Operator) GetAppInstaller ¶
func (o *Operator) GetAppInstaller(req ops.AppInstallerRequest) (io.ReadCloser, error)
GetAppInstaller returns an installer tarball for application specified with locator
func (*Operator) GetApplicationEndpoints ¶
GetApplicationEndpoints returns a list of application endpoints for a deployed site
func (*Operator) GetAuthGateway ¶
GetAuthGateway returns auth gateway configuration
func (*Operator) GetClusterAgent ¶
func (o *Operator) GetClusterAgent(req ops.ClusterAgentRequest) (*storage.LoginEntry, error)
func (*Operator) GetClusterAuthPreference ¶
func (o *Operator) GetClusterAuthPreference(key ops.SiteKey) (teleservices.AuthPreference, error)
GetClusterAuthPreference returns cluster authentication preference
func (*Operator) GetClusterCertificate ¶
func (o *Operator) GetClusterCertificate(key ops.SiteKey, withSecrets bool) (*ops.ClusterCertificate, error)
GetClusterCertificate returns the cluster certificate
func (*Operator) GetClusterConfiguration ¶
func (o *Operator) GetClusterConfiguration(key ops.SiteKey) (config clusterconfig.Interface, err error)
GetClusterConfiguration retrieves the cluster configuration
func (*Operator) GetClusterEnvironmentVariables ¶
func (o *Operator) GetClusterEnvironmentVariables(key ops.SiteKey) (env storage.EnvironmentVariables, err error)
GetClusterEnvironmentVariables retrieves the cluster environment variables
func (*Operator) GetClusterMetrics ¶
func (o *Operator) GetClusterMetrics(ctx context.Context, req ops.ClusterMetricsRequest) (*ops.ClusterMetricsResponse, error)
GetClusterMetrics returns basic CPU/RAM metrics for the specified cluster.
func (*Operator) GetClusterNodes ¶
GetClusterNodes returns a real-time information about cluster nodes
func (*Operator) GetCurrentUserInfo ¶
func (*Operator) GetExpandToken ¶
func (*Operator) GetGithubConnector ¶
func (o *Operator) GetGithubConnector(key ops.SiteKey, name string, withSecrets bool) (teleservices.GithubConnector, error)
GetGithubConnector returns a Github connector by name
Returned connector exclude client secret unless withSecrets is true.
func (*Operator) GetGithubConnectors ¶
func (o *Operator) GetGithubConnectors(key ops.SiteKey, withSecrets bool) ([]teleservices.GithubConnector, error)
GetGithubConnectors returns all Github connectors
Returned connectors exclude client secret unless withSecrets is true.
func (*Operator) GetKubeClient ¶
func (o *Operator) GetKubeClient() (*kubernetes.Clientset, error)
GetKubeClient lazy initializes K8s client
func (*Operator) GetLocalSite ¶
GetLocalSite returns local cluster record for this Ops Center
func (*Operator) GetLocalUser ¶
GetLocalUser returns local gravity site admin
func (*Operator) GetLogForwarders ¶
GetLogForwarders returns a list of configured log forwarders
func (*Operator) GetOperationPlan ¶
func (o *Operator) GetOperationPlan(key ops.SiteOperationKey) (*storage.OperationPlan, error)
GetOperationPlan returns plan for the specified operation
func (*Operator) GetPersistentStorage ¶
func (o *Operator) GetPersistentStorage(ctx context.Context, key ops.SiteKey) (storage.PersistentStorage, error)
GetPersistentStorage retrieves the current persistent storage configuration.
func (*Operator) GetSMTPConfig ¶
GetSMTPConfig returns the cluster SMTP configuration
func (*Operator) GetSiteByDomain ¶
func (*Operator) GetSiteExpandOperationAgentReport ¶
func (o *Operator) GetSiteExpandOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)
func (*Operator) GetSiteInstallOperationAgentReport ¶
func (o *Operator) GetSiteInstallOperationAgentReport(ctx context.Context, key ops.SiteOperationKey) (*ops.AgentReport, error)
func (*Operator) GetSiteInstructions ¶
func (o *Operator) GetSiteInstructions(tokenID string, serverProfile string, params url.Values) (string, error)
GetSiteInstructions returns shell script with instructions to execute for particular install agent. params are optional URL query parameters that can specify additional configuration attributes.
func (*Operator) GetSiteOperation ¶
func (o *Operator) GetSiteOperation(key ops.SiteOperationKey) (*ops.SiteOperation, error)
GetSiteOperation returns the operation information based on it's key
func (*Operator) GetSiteOperationLogs ¶
func (o *Operator) GetSiteOperationLogs(key ops.SiteOperationKey) (io.ReadCloser, error)
func (*Operator) GetSiteOperationProgress ¶
func (o *Operator) GetSiteOperationProgress(key ops.SiteOperationKey) (*ops.ProgressEntry, error)
func (*Operator) GetSiteOperations ¶
func (o *Operator) GetSiteOperations(key ops.SiteKey, f ops.OperationsFilter) (ops.SiteOperations, error)
func (*Operator) GetSiteReport ¶
func (o *Operator) GetSiteReport(ctx context.Context, req ops.GetClusterReportRequest) (io.ReadCloser, error)
func (*Operator) GetTrustedClusterToken ¶
func (*Operator) GetUserInvites ¶
func (o *Operator) GetUserInvites(ctx context.Context, key ops.SiteKey) ([]storage.UserInvite, error)
GetUserInvites returns all active user invites.
func (*Operator) GetVersion ¶
GetVersion returns the gravity binary version information.
func (*Operator) ListReleases ¶
ListReleases returns all currently installed application releases.
func (*Operator) RemoteOpsClient ¶
func (o *Operator) RemoteOpsClient(cluster teleservices.TrustedCluster) (*opsclient.Client, error)
RemoteOpsClient returns remote Ops Center client using the provided trusted cluster token for authentication
func (*Operator) ResetUserPassword ¶
func (o *Operator) ResetUserPassword(req ops.ResetUserPasswordRequest) (string, error)
ResetUserPassword resets the user password and returns the new one
func (*Operator) ResumeShrink ¶
ResumeShrink resumes the started shrink operation if the node being shrunk gave up its leadership
func (*Operator) RotatePlanetConfig ¶
func (o *Operator) RotatePlanetConfig(req ops.RotatePlanetConfigRequest) (*ops.RotatePackageResponse, error)
RotatePlanetConfig rotates planet configuration package for the server specified in the request
func (*Operator) RotateSecrets ¶
func (o *Operator) RotateSecrets(req ops.RotateSecretsRequest) (resp *ops.RotatePackageResponse, err error)
RotateSecrets rotates secrets package for the server specified in the request
func (*Operator) RotateTeleportConfig ¶
func (o *Operator) RotateTeleportConfig(req ops.RotateTeleportConfigRequest) (masterConfig *ops.RotatePackageResponse, nodeConfig *ops.RotatePackageResponse, err error)
RotateTeleportConfig generates teleport configuration for the server specified in the provided request
func (*Operator) SetKubeClient ¶
func (o *Operator) SetKubeClient(client *kubernetes.Clientset)
SetKubeClient sets Kubernetes client for this operator.
func (*Operator) SetOperationState ¶
func (o *Operator) SetOperationState(ctx context.Context, key ops.SiteOperationKey, req ops.SetOperationStateRequest) error
func (*Operator) SignSSHKey ¶
func (o *Operator) SignSSHKey(req ops.SSHSignRequest) (*ops.SSHSignResponse, error)
SignSSHKey signs SSH Public Key with teleport's certificate
func (*Operator) SignTLSKey ¶
func (o *Operator) SignTLSKey(req ops.TLSSignRequest) (*ops.TLSSignResponse, error)
SignTLSKey signs X509 Public Key with X509 certificate authority of this site
func (*Operator) SiteExpandOperationStart ¶
func (o *Operator) SiteExpandOperationStart(key ops.SiteOperationKey) error
func (*Operator) SiteInstallOperationStart ¶
func (o *Operator) SiteInstallOperationStart(key ops.SiteOperationKey) error
func (*Operator) StepDown ¶
StepDown asks the process to pause its leader election heartbeat so it can give up its leadership
func (*Operator) StreamOperationLogs ¶
StreamOperationLogs appends the logs from the provided reader to the specified operation (user-facing) log file
func (*Operator) UpdateAlert ¶
UpdateAlert updates the specified monitoring alert
func (*Operator) UpdateAlertTarget ¶
func (o *Operator) UpdateAlertTarget(ctx context.Context, key ops.SiteKey, target storage.AlertTarget) error
UpdateAlertTarget updates the cluster monitoring alert target
func (*Operator) UpdateClusterCertificate ¶
func (o *Operator) UpdateClusterCertificate(ctx context.Context, req ops.UpdateCertificateRequest) (*ops.ClusterCertificate, error)
UpdateClusterCertificate updates the cluster certificate
func (*Operator) UpdateClusterConfiguration ¶
func (o *Operator) UpdateClusterConfiguration(req ops.UpdateClusterConfigRequest) error
UpdateClusterConfiguration updates the cluster configuration to the value given in the specified request
func (*Operator) UpdateClusterEnvironmentVariables ¶
func (o *Operator) UpdateClusterEnvironmentVariables(req ops.UpdateClusterEnvironRequest) error
UpdateClusterEnvironmentVariables updates the cluster runtime environment variables from the specified request
func (*Operator) UpdateExpandOperationState ¶
func (o *Operator) UpdateExpandOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) error
UpdateExpandOperationState updates the state of an expand operation
func (*Operator) UpdateInstallOperationState ¶
func (o *Operator) UpdateInstallOperationState(key ops.SiteOperationKey, req ops.OperationUpdateRequest) error
UpdateInstallOperationState updates the state of an install operation
func (*Operator) UpdateLogForwarder ¶
func (o *Operator) UpdateLogForwarder(ctx context.Context, key ops.SiteKey, forwarder storage.LogForwarder) error
UpdateLogForwarder updates an existing log forwarder
func (*Operator) UpdateLogForwarders ¶
UpdateLogForwarders replaces the list of active log forwarders TODO(r0mant,alexeyk) this is a legacy method used only by UI, alexeyk to remove it when refactoring resources and use upsert/delete instead
func (*Operator) UpdatePersistentStorage ¶
func (o *Operator) UpdatePersistentStorage(ctx context.Context, req ops.UpdatePersistentStorageRequest) error
UpdatePersistentStorage updates cluster persistent storage configuration.
func (*Operator) UpdateSMTPConfig ¶
func (o *Operator) UpdateSMTPConfig(ctx context.Context, key ops.SiteKey, config storage.SMTPConfig) error
UpdateSMTPConfig updates the cluster SMTP configuration
func (*Operator) UpdateUser ¶
UpdateUser updates the specified user information.
func (*Operator) UpsertAuthGateway ¶
func (o *Operator) UpsertAuthGateway(ctx context.Context, key ops.SiteKey, gw storage.AuthGateway) error
UpsertAuthGateway updates auth gateway configuration.
func (*Operator) UpsertClusterAuthPreference ¶
func (o *Operator) UpsertClusterAuthPreference(ctx context.Context, key ops.SiteKey, auth teleservices.AuthPreference) error
UpsertClusterAuthPreference updates cluster authentication preference
func (*Operator) UpsertGithubConnector ¶
func (o *Operator) UpsertGithubConnector(ctx context.Context, key ops.SiteKey, connector teleservices.GithubConnector) error
UpsertGithubConnector creates or updates a Github connector
func (*Operator) UpsertUser ¶
UpsertUser creates or updates a user
func (*Operator) ValidateDomainName ¶
func (*Operator) ValidateRemoteAccess ¶
func (o *Operator) ValidateRemoteAccess(req ops.ValidateRemoteAccessRequest) (*ops.ValidateRemoteAccessResponse, error)
func (*Operator) ValidateServers ¶
func (o *Operator) ValidateServers(ctx context.Context, req ops.ValidateServersRequest) (*ops.ValidateServersResponse, error)
ValidateServers runs preflight checks before the installation and returns failed probes.
type ProvisionedServer ¶
type ProvisionedServer struct { storage.Server Profile schema.NodeProfile }
ProvisionedServer has all information we need to set up the server
func (*ProvisionedServer) Address ¶
func (s *ProvisionedServer) Address() string
Address returns the address this server is accessible on Address implements remoteServer.Address
func (*ProvisionedServer) AgentName ¶
func (s *ProvisionedServer) AgentName(domain string) string
AgentName returns a unique agent name for this server. The name of the agent is used to refer to this server in the cluster.
func (*ProvisionedServer) Debug ¶
func (s *ProvisionedServer) Debug() string
Debug provides a reference to the specified server useful for logging Debug implements remoteServer.Debug
func (*ProvisionedServer) EtcdMemberName ¶
func (s *ProvisionedServer) EtcdMemberName(domain string) string
EtcdMemberName returns generated unique etcd member name for this server
func (*ProvisionedServer) FQDN ¶
func (s *ProvisionedServer) FQDN(domain string) string
FQDN returns this server's fully qualified domain name
func (*ProvisionedServer) HostName ¶
func (s *ProvisionedServer) HostName() string
HostName returns the hostname of this server. HostName implements remoteServer.HostName
func (*ProvisionedServer) InGravity ¶
func (s *ProvisionedServer) InGravity(dir ...string) string
InGravity returns a directory within gravity state dir on this server
func (*ProvisionedServer) IsMaster ¶
func (s *ProvisionedServer) IsMaster() bool
IsMaster determines whether this server is a master
func (*ProvisionedServer) String ¶
func (s *ProvisionedServer) String() string
String returns a text description of this server
func (*ProvisionedServer) UnqualifiedName ¶
func (s *ProvisionedServer) UnqualifiedName(clusterName string) string
UnqualifiedName returns unqualified name - without cluster name
type TestServices ¶
type TestServices struct { appservice.TestServices // Agents is the RPC agents service Agents *AgentService // AgentServer is the RPC agent server AgentServer rpcserver.Server // Operator is the ops service Operator *Operator // Users is the users service Users users.Identity // Dir is the temporary directory where all data is stored Dir string // Clock provides time interface Clock clockwork.Clock }
TestServices contains a set of services that are used in tests
func SetupTestServices ¶
func SetupTestServices(c *check.C) TestServices
SetupTestServices initializes backend and package and application services that can be used in tests
Source Files ¶
- agents.go
- auth.go
- authgateway.go
- certificates.go
- checks.go
- cloudprovider.go
- clusterconfig.go
- cmd.go
- common.go
- configure.go
- ctx.go
- deploy.go
- endpoints.go
- environment.go
- expand.go
- gc.go
- hooks.go
- identity.go
- install.go
- instructions.go
- leader.go
- logforwarders.go
- monitoring.go
- operationgroup.go
- operationplan.go
- packages.go
- persistentstorage.go
- plan.go
- provision.go
- reconfigure.go
- releases.go
- report.go
- resume.go
- runner.go
- service.go
- shrink.go
- site.go
- smtp.go
- status.go
- systemupdate.go
- teleport.go
- testhelpers.go
- uninstall.go
- update.go
- users.go
- utils.go
- versions.go