Skip to content

Commit

Permalink
Add PublicKey and Response fields to v1a2 VirtualMachineWebConsoleReq…
Browse files Browse the repository at this point in the history
…uest CRD (#209)

This change adds the spec.PublicKey and status.Response fields to the v1a2 VirtualMachineWebConsoleRequest CRD similar the v1a1 CRD. These are still required
  • Loading branch information
sreyasn authored Aug 25, 2023
1 parent 340b363 commit 55c2dfa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1alpha2/virtualmachinewebconsolerequest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ type VirtualMachineWebConsoleRequestSpec struct {
// Name is the name of a VM in the same Namespace as this web console
// request.
Name string `json:"name"`
// PublicKey is used to encrypt the status.response. This is expected to be a RSA OAEP public key in X.509 PEM format.
PublicKey string `json:"publicKey"`
}

// VirtualMachineWebConsoleRequestStatus describes the observed state of the
// request.
type VirtualMachineWebConsoleRequestStatus struct {
// Response will be the authenticated ticket corresponding to this web console request.
Response string `json:"response,omitempty"`
// ExpiryTime is the time at which access via this request will expire.
ExpiryTime metav1.Time `json:"expiryTime,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ spec:
description: Name is the name of a VM in the same Namespace as this
web console request.
type: string
publicKey:
description: PublicKey is used to encrypt the status.response. This
is expected to be a RSA OAEP public key in X.509 PEM format.
type: string
required:
- name
- publicKey
type: object
status:
description: VirtualMachineWebConsoleRequestStatus describes the observed
Expand All @@ -65,6 +70,10 @@ spec:
by Go's https://pkg.go.dev/net#ResolveIPAddr and https://pkg.go.dev/net#ParseIP
functions."
type: string
response:
description: Response will be the authenticated ticket corresponding
to this web console request.
type: string
type: object
type: object
served: true
Expand Down

0 comments on commit 55c2dfa

Please sign in to comment.