Port forwarding support (#30)

* Port forwarding support

* .golangci.yml: remove and replace deprecated and archived linters

* Client: pass credentials when calling WebSocket API methods

* API: require ServiceAccountRoleComputeWrite role for port forwarding

* Use Buf

* Rename Poll() RPC method to Watch()

* Split Rendezvous into two parts: Watcher and Proxy (#32)

* Split Rendezvous into two parts: Watcher and Proxy

* Implement Proxy cancellation

* Use Protocol Buffers structure directly in Watcher

* Fix TestWatcher after switching to Protocol Buffers structure

* portForwardVM(): ensure we also check for gin's context
This commit is contained in:
Nikolay Edigaryev
2023-03-14 11:31:13 -04:00
committed by GitHub
parent 0582108ea6
commit 47fef47d1c
37 changed files with 2304 additions and 171 deletions
+2 -1
View File
@@ -11,6 +11,7 @@ import (
"errors"
"fmt"
"github.com/cirruslabs/orchard/internal/controller"
"github.com/cirruslabs/orchard/internal/netconstants"
v1 "github.com/cirruslabs/orchard/pkg/resource/v1"
"github.com/spf13/cobra"
"math/big"
@@ -142,7 +143,7 @@ func GenerateSelfSignedControllerCertificate() (tls.Certificate, error) {
BasicConstraintsValid: true,
KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth},
DNSNames: []string{controller.DefaultServerName},
DNSNames: []string{netconstants.DefaultControllerServerName},
}
certBytes, err := x509.CreateCertificate(cryptorand.Reader, cert, cert, privateKey.Public(), privateKey)