This file contains hidden or 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
| // create streaming server if configured. | |
| if streamingConfig != nil { | |
| var err error | |
| ds.streamingServer, err = streaming.NewServer(*streamingConfig, ds.streamingRuntime) | |
| if err != nil { | |
| return nil, err | |
| } | |
| } |
This file contains hidden or 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
| func (s *server) GetExec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) { | |
| if err := validateExecRequest(req); err != nil { | |
| return nil, err | |
| } | |
| token, err := s.cache.Insert(req) | |
| if err != nil { | |
| return nil, err | |
| } | |
| return &runtimeapi.ExecResponse{ | |
| Url: s.buildURL("exec", token), |
This file contains hidden or 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
| ds := &dockerService{ | |
| // ... | |
| streamingRuntime: &streamingRuntime{ | |
| client: client, | |
| execHandler: &NativeExecHandler{}, | |
| }, | |
| // ... | |
| } |
This file contains hidden or 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
| func (*NativeExecHandler) ExecInContainer(client libdocker.Interface, container *dockertypes.ContainerJSON, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error { | |
| // ... | |
| startOpts := dockertypes.ExecStartCheck{Detach: false, Tty: tty} | |
| streamOpts := libdocker.StreamOptions{ | |
| InputStream: stdin, | |
| OutputStream: stdout, | |
| ErrorStream: stderr, | |
| RawTerminal: tty, | |
| ExecStarted: execStarted, | |
| } |
This file contains hidden or 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
| ws := &restful.WebService{} | |
| endpoints := []struct { | |
| path string | |
| handler restful.RouteFunction | |
| }{ | |
| {"/exec/{token}", s.serveExec}, | |
| {"/attach/{token}", s.serveAttach}, | |
| {"/portforward/{token}", s.servePortForward}, | |
| } |
This file contains hidden or 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
| // ServeExec handles requests to execute a command in a container. After | |
| // creating/receiving the required streams, it delegates the actual execution | |
| // to the executor. | |
| func ServeExec(w http.ResponseWriter, req *http.Request, executor Executor, podName string, uid types.UID, container string, cmd []string, streamOpts *Options, idleTimeout, streamCreationTimeout time.Duration, supportedProtocols []string) { | |
| // ... | |
| err := executor.ExecInContainer(podName, uid, container, cmd, ctx.stdinStream, ctx.stdoutStream, ctx.stderrStream, ctx.tty, ctx.resizeChan, 0) | |
| if err != nil { | |
| // ... | |
| } else { | |
| // ... |
This file contains hidden or 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
| # the exact promql queries can be found in the stat-promql.sh below | |
| # need to add direction="inbound" label to the smi-metrics queries. | |
| $ linkerd -n <ns> stat <kind> | |
| $ linkerd -n <ns> stat <kind> <workload_name>... | |
| # need to add direction="outbound" label to the smi-metrics queries. | |
| # currently, the value of <dst_ns> isn't used in the promql of `linkerd stats`. | |
| # data is grouped by namespace and kind, instead of dst_namespace and dst_<kind>. Is this correct? | |
| $ linkerd -n <ns> stat <kind> --to-namespace <dst_ns> |
This file contains hidden or 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
| ```diff | |
| diff --git a/cli/cmd/install.go b/cli/cmd/install.go | |
| index a508760e..b7d4cfef 100644 | |
| --- a/cli/cmd/install.go | |
| +++ b/cli/cmd/install.go | |
| @@ -151,11 +151,6 @@ var ( | |
| "templates/tap.yaml", | |
| "templates/linkerd-values.yaml", | |
| } | |
| - |
This file contains hidden or 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
| diff --git a/charts/linkerd2/values.yaml b/charts/linkerd2/values.yaml | |
| index e21c8997..7ba88ee9 100644 | |
| --- a/charts/linkerd2/values.yaml | |
| +++ b/charts/linkerd2/values.yaml | |
| @@ -172,7 +172,7 @@ nodeSelector: | |
| # Configuration for Add-ons | |
| tracing: | |
| - enabled: false | |
| + enabled: true |
This file contains hidden or 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
| time="2020-03-05T05:01:03Z" level=info msg="running version " | |
| time="2020-03-05T05:01:03Z" level=info msg="trying to connect to dive@aks-dive-staging:TykQrnVh4ZRrxNqBCpE5AP0g1j76hISdPYtvV5Ia@tcp(aks-dive-staging.mysql.database.azure.com:3306)/dive_staging?parseTime=true&charset=utf8mb4&collation=utf8mb4_unicode_ci&tls=true" | |
| time="2020-03-05T05:01:03Z" level=warning msg="could not connect to dive@aks-dive-staging:TykQrnVh4ZRrxNqBCpE5AP0g1j76hISdPYtvV5Ia@tcp(aks-dive-staging.mysql.database.azure.com:3306)/dive_staging?parseTime=true&charset=utf8mb4&collation=utf8mb4_unicode_ci&tls=true; retrying in 10s" | |
| time="2020-03-05T05:01:13Z" level=info msg="connected to database at dive@aks-dive-staging:TykQrnVh4ZRrxNqBCpE5AP0g1j76hISdPYtvV5Ia@tcp(aks-dive-staging.mysql.database.azure.com:3306)/dive_staging?parseTime=true&charset=utf8mb4&collation=utf8mb4_unicode_ci&tls=true" | |
| time="2020-03-05T05:01:13Z" level=info msg="starting admin server on :9994" | |
| time="2020-03-05T05:01:13Z" level=info msg="starting HTTP server on :8084 |