Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions api/client/proto/inventory.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 16 additions & 5 deletions api/gen/proto/go/teleport/presence/v1/relay_server.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions api/proto/teleport/legacy/client/proto/inventory.proto
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ message UpstreamInventoryHello {
string ExternalUpgraderVersion = 6;
// UpdaterInfo is used by Teleport to send information about how the Teleport updater is doing.
types.UpdaterV2Info UpdaterInfo = 8;
// The advertized scope of the instance. An instance's scope can not change once assigned, so future
// heartbeats must include a scope value matching the one declared in the hello message.
string scope = 9;
}

// UpstreamInventoryAgentMetadata is the message sent up the inventory control stream containing
Expand Down
8 changes: 8 additions & 0 deletions api/proto/teleport/legacy/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ message DatabaseServerV3 {
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "status"
];
// The advertized scope of the server which can not change once assigned.
string scope = 7;
}

// DatabaseServerSpecV3 is the database server spec.
Expand Down Expand Up @@ -923,6 +925,8 @@ message ServerV2 {
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "spec"
];
// The advertized scope of the server which can not change once assigned.
string scope = 6;
}

// ServerSpecV2 is a specification for V2 Server
Expand Down Expand Up @@ -1030,6 +1034,8 @@ message AppServerV3 {
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "spec"
];
// The advertized scope of the server which can not change once assigned.
string scope = 6;
}

// AppServerSpecV3 is the app access server spec.
Expand Down Expand Up @@ -5240,6 +5246,8 @@ message KubernetesServerV3 {
];
// Status is the Kubernetes server status.
KubernetesServerStatusV3 status = 6;
// The advertized scope of the server which can not change once assigned.
string scope = 7;
}

// KubernetesServerSpecV3 is the Kubernetes server spec.
Expand Down
3 changes: 3 additions & 0 deletions api/proto/teleport/presence/v1/relay_server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ message RelayServer {
bool terminating = 6;
}
Spec spec = 5;
// The advertized scope of the server. A server's scope can not change once assigned, so
// heartbeats must include a scope value matching the one declared in the hello message.
string scope = 6;
}
7 changes: 7 additions & 0 deletions api/types/appserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ type AppServer interface {
// GetRelayIDs returns the list of Relay host IDs that the app server is
// connected to.
GetRelayIDs() []string
// GetScope returns the scope this server belongs to.
GetScope() string
}

// NewAppServerV3 creates a new app server instance.
Expand Down Expand Up @@ -353,6 +355,11 @@ func (s *AppServerV3) MatchSearch(values []string) bool {
return MatchSearch(nil, values, nil)
}

// GetScope returns the scope this server belongs to.
func (s *AppServerV3) GetScope() string {
return s.Scope
}

// AppServers represents a list of app servers.
type AppServers []AppServer

Expand Down
7 changes: 7 additions & 0 deletions api/types/databaseserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ type DatabaseServer interface {
GetTargetHealthStatus() TargetHealthStatus
// SetTargetHealthStatus sets target health status
SetTargetHealthStatus(status TargetHealthStatus)
// GetScope returns the scope this server belongs to.
GetScope() string
}

// NewDatabaseServerV3 creates a new database server instance.
Expand Down Expand Up @@ -304,6 +306,11 @@ func (s *DatabaseServerV3) Copy() DatabaseServer {
return utils.CloneProtoMsg(s)
}

// GetScope returns the scope this server belongs to.
func (s *DatabaseServerV3) GetScope() string {
return s.Scope
}

// CloneResource returns a copy of this database server object.
func (s *DatabaseServerV3) CloneResource() ResourceWithLabels {
return s.Copy()
Expand Down
3 changes: 2 additions & 1 deletion api/types/derived.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions api/types/kubernetes_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ type KubeServer interface {
// GetRelayIDs returns the list of Relay host IDs that the kube server is
// connected to.
GetRelayIDs() []string
// GetScope returns the scope this server belongs to.
GetScope() string
}

// NewKubernetesServerV3 creates a new kube server instance.
Expand Down Expand Up @@ -380,6 +382,11 @@ func (s *KubernetesServerV3) GetStatus() *KubernetesServerStatusV3 {
return s.Status
}

// GetScope returns the scope this server belongs to.
func (s *KubernetesServerV3) GetScope() string {
return s.Scope
}

// GetTargetHealth gets the health of a Kubernetes cluster.
func (s *KubernetesServerStatusV3) GetTargetHealth() *TargetHealth {
if s == nil {
Expand Down
7 changes: 7 additions & 0 deletions api/types/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ type Server interface {

// GetGitHub returns the GitHub server spec.
GetGitHub() *GitHubServerMetadata
// GetScope returns the scope this server belongs to.
GetScope() string
}

// NewServer creates an instance of Server.
Expand Down Expand Up @@ -749,6 +751,11 @@ func (s *ServerV2) SetCloudMetadata(meta *CloudMetadata) {
s.Spec.CloudMetadata = meta
}

// GetScope returns the scope this server belongs to.
func (s *ServerV2) GetScope() string {
return s.Scope
}

// CommandLabel is a label that has a value as a result of the
// output generated by running command, e.g. hostname
type CommandLabel interface {
Expand Down
Loading
Loading