Skip to content

Commit b458861

Browse files
iQQBotmustard-mhcsweichelsagor999
committed
[workspace] support user upload ssh keys
Co-authored-by: Huiwen <[email protected]> Co-authored-by: Christian Weichel <[email protected]> Co-authored-by: Pavel Tumik <[email protected]>
1 parent f0daee2 commit b458861

File tree

16 files changed

+1809
-352
lines changed

16 files changed

+1809
-352
lines changed

components/common-go/kubernetes/kubernetes.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ const (
5959

6060
// WorkspaceExposedPorts contains the exposed ports in the workspace
6161
WorkspaceExposedPorts = "gitpod/exposedPorts"
62+
63+
// WorkspaceSSHPublicKeys contains all authorized ssh public keys that can be connected to the workspace
64+
WorkspaceSSHPublicKeys = "gitpod.io/sshPublicKeys"
6265
)
6366

6467
// WorkspaceSupervisorEndpoint produces the supervisor endpoint of a workspace.

components/ws-manager-api/core.proto

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ service WorkspaceManager {
4343

4444
// deleteVolumeSnapshot asks ws-manager to delete specific volume snapshot and delete source from cloud provider as well
4545
rpc DeleteVolumeSnapshot(DeleteVolumeSnapshotRequest) returns (DeleteVolumeSnapshotResponse) {}
46+
47+
// UpdateSSHKey update ssh keys
48+
rpc UpdateSSHKey(UpdateSSHKeyRequest) returns (UpdateSSHKeyResponse) {}
4649
}
4750

4851
// MetadataFilter describes conditions for matching a set of workspaces.
@@ -252,6 +255,18 @@ message BackupWorkspaceResponse {
252255
string url = 1;
253256
}
254257

258+
// UpdateSSHKeyRequest update ssh public key
259+
message UpdateSSHKeyRequest {
260+
// ID is the unique identifier of the workspace
261+
string id = 1;
262+
263+
// keys is a set of authorized_keys
264+
repeated string keys = 2;
265+
}
266+
267+
// UpdateSSHKeyResponse is the answer to a upload ssh key request
268+
message UpdateSSHKeyResponse {}
269+
255270
// WorkspaceStatus describes a workspace status
256271
message WorkspaceStatus {
257272
// ID is the unique identifier of the workspace
@@ -534,6 +549,9 @@ message StartWorkspaceSpec {
534549

535550
// volume_snapshot to use to restore PVC from, if set
536551
VolumeSnapshotInfo volume_snapshot = 14;
552+
553+
// ssh_public_keys is user's uploaded ssh public keys
554+
repeated string ssh_public_keys = 15;
537555
}
538556

539557
// WorkspaceFeatureFlag enable non-standard behaviour in workspaces
@@ -618,3 +636,9 @@ message ExposedPorts {
618636
// ports is the set of ports which ought to be exposed to the internet
619637
repeated PortSpec ports = 1;
620638
}
639+
640+
// SSHPublicKeys describes the user's uploaded ssh public keys, it will be used only in annotations.
641+
message SSHPublicKeys {
642+
// keys is the set of ssh public key
643+
repeated string keys = 1;
644+
}

0 commit comments

Comments
 (0)