Skip to content

Commit

Permalink
Expose SSH Private Keys
Browse files Browse the repository at this point in the history
Analogous to kubeconfig, in the Kubernetes service.  This allows access
to the cluster without having to faff with cloud init.
  • Loading branch information
spjmurray committed Dec 11, 2024
1 parent b0754ac commit a20ffc3
Show file tree
Hide file tree
Showing 12 changed files with 120 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ spec:
namespace:
description: Namespace defines the namespace a cluster resides in.
type: string
sshPrivateKey:
description: SSHPrivateKey is the key used to access the cluster.
type: string
workloadpools:
description: WorkloadPools is the status of all pools.
items:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/spjmurray/go-util v0.1.3
github.com/unikorn-cloud/core v0.1.85
github.com/unikorn-cloud/identity v0.2.45
github.com/unikorn-cloud/region v0.1.47-rc4
github.com/unikorn-cloud/region v0.1.47-rc5
go.opentelemetry.io/otel/sdk v1.31.0
k8s.io/api v0.31.1
k8s.io/apimachinery v0.31.1
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ github.com/unikorn-cloud/core v0.1.85 h1:S4B0nr0jhxF8SCsKyCRVwcx8+kJsI8fQVONLJDf
github.com/unikorn-cloud/core v0.1.85/go.mod h1:wEKzCwAnIyTbo27l++Wl+gK95TAxMsFS3y3jbFB03aw=
github.com/unikorn-cloud/identity v0.2.45 h1:YFmw3uunwdZMuYiimv4lfU6s7iTtYoc22xJqLTrlOVg=
github.com/unikorn-cloud/identity v0.2.45/go.mod h1:WzNNv05ReDMLfWsOtq53uzhX2GU2nXDw76Bdsf3BPnM=
github.com/unikorn-cloud/region v0.1.47-rc4 h1:rS5vyND9vqMCib5Vd+IktHB4+erRp/+oWzHO20quqsI=
github.com/unikorn-cloud/region v0.1.47-rc4/go.mod h1:cofPuJjseRKE95xAqNa23nSL7/+LDXOBxNIHwwODpys=
github.com/unikorn-cloud/region v0.1.47-rc4.0.20241211093153-bbb745ffcf71 h1:SRRXWXZwrjPq8UEPP5m4R4LDWyLnsb+mkwU1zj4hriA=
github.com/unikorn-cloud/region v0.1.47-rc4.0.20241211093153-bbb745ffcf71/go.mod h1:cofPuJjseRKE95xAqNa23nSL7/+LDXOBxNIHwwODpys=
github.com/unikorn-cloud/region v0.1.47-rc5 h1:rdQYyGGSC3xGtkR2PMW43IPAhbN79Th9241+mhXfGG0=
github.com/unikorn-cloud/region v0.1.47-rc5/go.mod h1:cofPuJjseRKE95xAqNa23nSL7/+LDXOBxNIHwwODpys=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/unikorn/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ type ComputeClusterWorkloadPoolsSpec struct {
type ComputeClusterStatus struct {
// Namespace defines the namespace a cluster resides in.
Namespace string `json:"namespace,omitempty"`
// SSHPrivateKey is the key used to access the cluster.
SSHPrivateKey *string `json:"sshPrivateKey,omitempty"`
// WorkloadPools is the status of all pools.
WorkloadPools []WorkloadPoolStatus `json:"workloadpools,omitempty"`
// Current service state of a Compute cluster.
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/unikorn/v1alpha1/zz_generated.deepcopy.go

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

182 changes: 91 additions & 91 deletions pkg/openapi/schema.go

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

3 changes: 3 additions & 0 deletions pkg/openapi/server.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ components:
description: Compute cluster status.
type: object
properties:
sshPrivateKey:
description: SSH private key that allows access to the cluster.
type: string
workloadPools:
$ref: '#/components/schemas/computeClusterWorkloadPoolsStatus'
computeClusterWorkloadPoolsStatus:
Expand Down
3 changes: 3 additions & 0 deletions pkg/openapi/types.go

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

Loading

0 comments on commit a20ffc3

Please sign in to comment.