-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add autoupdate resources config/version (#46173)
* Add autoupdate resources config/version * Rename Autoupdate to AutoUpdate Add auto update to audit events * Rename Autoupdate to AutoUpdate
- Loading branch information
Showing
9 changed files
with
7,435 additions
and
2,847 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
456 changes: 456 additions & 0 deletions
456
api/gen/proto/go/teleport/autoupdate/v1/autoupdate.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
832 changes: 832 additions & 0 deletions
832
api/gen/proto/go/teleport/autoupdate/v1/autoupdate_service.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
477 changes: 477 additions & 0 deletions
477
api/gen/proto/go/teleport/autoupdate/v1/autoupdate_service_grpc.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2024 Gravitational, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package teleport.autoupdate.v1; | ||
|
||
import "teleport/header/v1/metadata.proto"; | ||
|
||
option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1;autoupdate"; | ||
|
||
// AutoUpdateConfig is a config singleton used to configure cluster | ||
// autoupdate settings. | ||
message AutoUpdateConfig { | ||
string kind = 1; | ||
string sub_kind = 2; | ||
string version = 3; | ||
teleport.header.v1.Metadata metadata = 4; | ||
|
||
AutoUpdateConfigSpec spec = 5; | ||
} | ||
|
||
// AutoUpdateConfigSpec encodes the parameters of the autoupdate config object. | ||
message AutoUpdateConfigSpec { | ||
// ToolsAutoupdate encodes the feature flag to enable/disable tools autoupdates. | ||
bool tools_autoupdate = 1; | ||
} | ||
|
||
// AutoUpdateVersion is a resource singleton with version required for | ||
// tools autoupdate. | ||
message AutoUpdateVersion { | ||
string kind = 1; | ||
string sub_kind = 2; | ||
string version = 3; | ||
teleport.header.v1.Metadata metadata = 4; | ||
|
||
AutoUpdateVersionSpec spec = 5; | ||
} | ||
|
||
// AutoUpdateVersionSpec encodes the parameters of the autoupdate versions. | ||
message AutoUpdateVersionSpec { | ||
// ToolsVersion is the semantic version required for tools autoupdates. | ||
string tools_version = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
// Copyright 2024 Gravitational, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package teleport.autoupdate.v1; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "teleport/autoupdate/v1/autoupdate.proto"; | ||
|
||
option go_package = "github.com/gravitational/teleport/api/gen/proto/go/teleport/autoupdate/v1;autoupdate"; | ||
|
||
// AutoUpdateService provides an API to manage autoupdates. | ||
service AutoUpdateService { | ||
// GetAutoUpdateConfig gets the current autoupdate config singleton. | ||
rpc GetAutoUpdateConfig(GetAutoUpdateConfigRequest) returns (AutoUpdateConfig); | ||
|
||
// CreateAutoUpdateConfig creates a new AutoUpdateConfig. | ||
rpc CreateAutoUpdateConfig(CreateAutoUpdateConfigRequest) returns (AutoUpdateConfig); | ||
|
||
// CreateAutoUpdateConfig updates AutoUpdateConfig singleton. | ||
rpc UpdateAutoUpdateConfig(UpdateAutoUpdateConfigRequest) returns (AutoUpdateConfig); | ||
|
||
// UpsertAutoUpdateConfig creates a new AutoUpdateConfig or replaces an existing AutoUpdateConfig. | ||
rpc UpsertAutoUpdateConfig(UpsertAutoUpdateConfigRequest) returns (AutoUpdateConfig); | ||
|
||
// DeleteAutoUpdateConfig hard deletes the specified AutoUpdateConfig. | ||
rpc DeleteAutoUpdateConfig(DeleteAutoUpdateConfigRequest) returns (google.protobuf.Empty); | ||
|
||
// GetAutoUpdateVersion gets the current autoupdate version singleton. | ||
rpc GetAutoUpdateVersion(GetAutoUpdateVersionRequest) returns (AutoUpdateVersion); | ||
|
||
// CreateAutoUpdateVersion creates a new AutoUpdateVersion. | ||
rpc CreateAutoUpdateVersion(CreateAutoUpdateVersionRequest) returns (AutoUpdateVersion); | ||
|
||
// UpdateAutoUpdateVersion updates AutoUpdateVersion singleton. | ||
rpc UpdateAutoUpdateVersion(UpdateAutoUpdateVersionRequest) returns (AutoUpdateVersion); | ||
|
||
// UpsertAutoUpdateVersion creates a new AutoUpdateVersion or replaces an existing AutoUpdateVersion. | ||
rpc UpsertAutoUpdateVersion(UpsertAutoUpdateVersionRequest) returns (AutoUpdateVersion); | ||
|
||
// DeleteAutoUpdateVersion hard deletes the specified AutoUpdateVersionRequest. | ||
rpc DeleteAutoUpdateVersion(DeleteAutoUpdateVersionRequest) returns (google.protobuf.Empty); | ||
} | ||
|
||
// Request for GetAutoUpdateConfig. | ||
message GetAutoUpdateConfigRequest {} | ||
|
||
// Request for CreateAutoUpdateConfig. | ||
message CreateAutoUpdateConfigRequest { | ||
AutoUpdateConfig config = 1; | ||
} | ||
|
||
// Request for UpdateAutoUpdateConfig. | ||
message UpdateAutoUpdateConfigRequest { | ||
AutoUpdateConfig config = 1; | ||
} | ||
|
||
// Request for UpsertAutoUpdateConfig. | ||
message UpsertAutoUpdateConfigRequest { | ||
AutoUpdateConfig config = 1; | ||
} | ||
|
||
// Request for DeleteAutoUpdateConfig. | ||
message DeleteAutoUpdateConfigRequest {} | ||
|
||
// Request for GetAutoUpdateVersion. | ||
message GetAutoUpdateVersionRequest {} | ||
|
||
// Request for CreateAutoUpdateVersion. | ||
message CreateAutoUpdateVersionRequest { | ||
AutoUpdateVersion version = 1; | ||
} | ||
|
||
// Request for UpdateAutoUpdateConfig. | ||
message UpdateAutoUpdateVersionRequest { | ||
AutoUpdateVersion version = 1; | ||
} | ||
|
||
// Request for UpsertAutoUpdateVersion. | ||
message UpsertAutoUpdateVersionRequest { | ||
AutoUpdateVersion version = 1; | ||
} | ||
|
||
// Request for DeleteAutoUpdateVersion. | ||
message DeleteAutoUpdateVersionRequest {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.