Skip to content

Commit

Permalink
Remove ClusterConfig resource (#8150)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejtokarcik authored Sep 23, 2021
1 parent 6187d00 commit bddc54d
Show file tree
Hide file tree
Showing 39 changed files with 1,561 additions and 4,216 deletions.
1,120 changes: 519 additions & 601 deletions api/client/proto/authservice.pb.go

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions api/client/proto/authservice.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ enum Operation {

// Event returns cluster event
message Event {
reserved 7;

// Operation identifies operation
Operation Type = 1 [ (gogoproto.jsontag) = "type,omitempty" ];
// Resource contains the updated resource
Expand All @@ -58,9 +60,6 @@ message Event {
[ (gogoproto.jsontag) = "provision_token,omitempty" ];
// ClusterNameV2 is a cluster name resource
types.ClusterNameV2 ClusterName = 6 [ (gogoproto.jsontag) = "cluster_name,omitempty" ];
// ClusterConfig is a cluster configuration resource
types.ClusterConfigV3 ClusterConfig = 7
[ (gogoproto.jsontag) = "cluster_config,omitempty" ];
// User is a user resource
types.UserV2 User = 8 [ (gogoproto.jsontag) = "user,omitempty" ];
// Role is a role resource
Expand Down
3 changes: 0 additions & 3 deletions api/client/streamwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ func eventFromGRPC(in proto.Event) (*types.Event, error) {
} else if r := in.GetClusterName(); r != nil {
out.Resource = r
return &out, nil
} else if r := in.GetClusterConfig(); r != nil {
out.Resource = r
return &out, nil
} else if r := in.GetUser(); r != nil {
out.Resource = r
return &out, nil
Expand Down
325 changes: 0 additions & 325 deletions api/types/clusterconfig.go

This file was deleted.

4 changes: 3 additions & 1 deletion api/types/clustername.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ func (c *ClusterNameV2) CheckAndSetDefaults() error {
if c.Spec.ClusterName == "" {
return trace.BadParameter("cluster name is required")
}

if c.Spec.ClusterID == "" {
return trace.BadParameter("cluster ID is required")
}
return nil
}

Expand Down
6 changes: 3 additions & 3 deletions api/types/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ const (
MetaNameSessionRecordingConfig = "session-recording-config"

// KindClusterConfig is the resource that holds cluster level configuration.
// Deprecated: This does not correspond to an actual resource anymore but is
// still used when checking access to the new configuration resources, as an
// alternative to their individual resource kinds.
KindClusterConfig = "cluster_config"

// MetaNameClusterConfig is the exact name of the cluster config singleton resource.
MetaNameClusterConfig = "cluster-config"

// KindClusterAuditConfig is the resource that holds cluster audit configuration.
KindClusterAuditConfig = "cluster_audit_config"

Expand Down
Loading

0 comments on commit bddc54d

Please sign in to comment.