Repository: linkerd/linkerd2
Pull request #6450 (2021-07-08 14:11:20)

Fix minor typo about formatting
Signed-off-by: Takumi Sue <u630868b@alumni.osaka-u.ac.jp>

<!--  Thanks for sending a pull request!

If you already have a well-structured git commit message, chances are GitHub
set the title and description of this PR to the git commit message subject and
body, respectively. If so, you may delete these instructions and submit your PR.

If this is your first time, please read our contributor guide:
https://github.com/linkerd/linkerd2/blob/main/CONTRIBUTING.md

The title and description of your Pull Request should match the git commit
subject and body, respectively. Git commit messages are structured as follows:

```
Subject

Problem

Solution

Validation

Fixes #[GitHub issue ID]

DCO Sign off
```

Example git commit message:

```
Introduce Pull Request Template

GitHub's community guidelines recommend a pull request template, the repo was
lacking one.

Introduce a `PULL_REQUEST_TEMPLATE.md` file.

Once merged, the
[Community profile checklist](https://github.com/linkerd/linkerd2/community)
should indicate the repo now provides a pull request template.

Fixes #3321

Signed-off-by: Jane Smith <jane.smith@example.com>
```

Note the git commit message subject becomes the pull request title.

For more details around git commits, see the section on Committing in our
contributor guide:
https://github.com/linkerd/linkerd2/blob/main/CONTRIBUTING.md#committing
-->


codecov-commenter: # [Codecov](https://codecov.io/gh/linkerd/linkerd2/pull/6450?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd) Report
> Merging [#6450](https://codecov.io/gh/linkerd/linkerd2/pull/6450?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd) (ad154e2) into [main](https://codecov.io/gh/linkerd/linkerd2/commit/706d3f7d78d11c063cca6936bbdf7cbf6fd62247?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd) (706d3f7) will **increase** coverage by `22.37%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/linkerd/linkerd2/pull/6450/graphs/tree.svg?width=650&height=150&src=pr&token=FCBISvpqTv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd)](https://codecov.io/gh/linkerd/linkerd2/pull/6450?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd)

```diff
@@             Coverage Diff             @@
##             main    #6450       +/-   ##
===========================================
+ Coverage   44.39%   66.76%   +22.37%     
===========================================
  Files         183       39      -144     
  Lines       17598     1396    -16202     
  Branches      290      290               
===========================================
- Hits         7812      932     -6880     
+ Misses       9050      460     -8590     
+ Partials      736        4      -732     
```

| Flag | Coverage Δ | |
|---|---|---|
| golang | `?` | |
| javascript | `66.76% <ø> (ø)` | |
| unittests | `66.76% <ø> (+22.37%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/linkerd/linkerd2/pull/6450?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd) | Coverage Δ | |
|---|---|---|
| [cli/cmd/diagnostics.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-Y2xpL2NtZC9kaWFnbm9zdGljcy5nbw==) | | |
| [viz/metrics-api/http\_server.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-dml6L21ldHJpY3MtYXBpL2h0dHBfc2VydmVyLmdv) | | |
| [testutil/annotations.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-dGVzdHV0aWwvYW5ub3RhdGlvbnMuZ28=) | | |
| [viz/cmd/routes.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-dml6L2NtZC9yb3V0ZXMuZ28=) | | |
| [pkg/util/parsing.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-cGtnL3V0aWwvcGFyc2luZy5nbw==) | | |
| [cli/cmd/install.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-Y2xpL2NtZC9pbnN0YWxsLmdv) | | |
| [viz/metrics-api/top\_routes.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-dml6L21ldHJpY3MtYXBpL3RvcF9yb3V0ZXMuZ28=) | | |
| [viz/metrics-api/gateways.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-dml6L21ldHJpY3MtYXBpL2dhdGV3YXlzLmdv) | | |
| [controller/k8s/api.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-Y29udHJvbGxlci9rOHMvYXBpLmdv) | | |
| [jaeger/cmd/uninstall.go](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd#diff-amFlZ2VyL2NtZC91bmluc3RhbGwuZ28=) | | |
| ... and [134 more](https://codecov.io/gh/linkerd/linkerd2/pull/6450/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/linkerd/linkerd2/pull/6450?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/linkerd/linkerd2/pull/6450?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd). Last update [706d3f7...ad154e2](https://codecov.io/gh/linkerd/linkerd2/pull/6450?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linkerd).


Patch:
diff --git a/BUILD.md b/BUILD.md
index 3d3eae59d..207a0c92b 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -63,7 +63,7 @@ its extensions are written in Go. The dashboard UI is a React application.
   - [`identity`](controller/identity): Provides a CA to distribute certificates
     to proxies for them to establish mTLS connections between them.
 - [`viz extension`](viz)
-  - ['metrics-api`](viz/metrics-api): Accepts requests from API clients such as
+  - [`metrics-api`](viz/metrics-api): Accepts requests from API clients such as
     cli and web, serving metrics from the proxies in the cluster through
     Prometheus queries.
   - [`tap`](viz/tap/api): Provides a live pipeline of requests.
diff --git a/Dockerfile-proxy b/Dockerfile-proxy
index ae7a944ba..a0ec723ab 100644
--- a/Dockerfile-proxy
+++ b/Dockerfile-proxy
@@ -1,4 +1,4 @@
-ARG RUNTIME_IMAGE=gcr.io/distroless/cc:nonroot
+ARG RUNTIME_IMAGE=gcr.io/distroless/cc
 ARG BUILDPLATFORM=linux/amd64
 
 # Precompile key slow-to-build dependencies
diff --git a/charts/linkerd2-cni/README.md b/charts/linkerd2-cni/README.md
index d9c4e4bab..5b4acadbb 100644
--- a/charts/linkerd2-cni/README.md
+++ b/charts/linkerd2-cni/README.md
@@ -37,6 +37,8 @@ Kubernetes: `>=1.16.0-0`
 | outboundProxyPort | int | `4140` | Outbound port for the proxy container |
 | portsToRedirect | string | `""` | Ports to redirect to proxy |
 | priorityClassName | string | `""` | Kubernetes priorityClassName for the CNI plugin's Pods |
+| proxyAdminPort | int | `4191` | Admin port for the proxy container |
+| proxyControlPort | int | `4190` | Control port for the proxy container |
 | proxyUID | int | `2102` | User id under which the proxy shall be ran |
 | useWaitFlag | bool | `false` | Configures the CNI plugin to use the -w flag for the iptables command |
 
diff --git a/charts/linkerd2-cni/templates/cni-plugin.yaml b/charts/linkerd2-cni/templates/cni-plugin.yaml
index 6f87a1f13..57802484e 100644
--- a/charts/linkerd2-cni/templates/cni-plugin.yaml
+++ b/charts/linkerd2-cni/templates/cni-plugin.yaml
@@ -148,11 +148,8 @@ data:
         "outgoing-proxy-port": {{.Values.outboundProxyPort}},
         "proxy-uid": {{.Values.proxyUID}},
         "ports-to-redirect": [{{.Values.portsToRedirect}}],
-        {{- if .Values.ignoreInboundPorts }}
-        "inbound-ports-to-ignore": [
-          {{- include "partials.splitStringList" .Values.ignoreInboundPorts -}}
-        ],
-        {{- end }}
+        "inbound-ports-to-ignore": ["{{- .Values.proxyAdminPort }}","{{ .Values.proxyControlPort }}"
+        {{- if .Values.ignoreInboundPorts }},{{- include "partials.splitStringList" .Values.ignoreInboundPorts -}}{{- end }}],
         {{- if .Values.ignoreOutboundPorts }}
         "outbound-ports-to-ignore": [
           {{- include "partials.splitStringList" .Values.ignoreOutboundPorts -}}
diff --git a/charts/linkerd2-cni/values.yaml b/charts/linkerd2-cni/values.yaml
index 02ec41080..7e4e9a3db 100644
--- a/charts/linkerd2-cni/values.yaml
+++ b/charts/linkerd2-cni/values.yaml
@@ -10,6 +10,10 @@ outboundProxyPort: 4140
 ignoreInboundPorts: ""
 # -- Default set of outbound ports to skip via iptables
 ignoreOutboundPorts: ""
+# -- Admin port for the proxy container
+proxyAdminPort: 4191
+# -- Control port for the proxy container
+proxyControlPort: 4190
 # -- Docker image for the CNI plugin
 cniPluginImage:   "cr.l5d.io/linkerd/cni-plugin"
 # -- Tag for the CNI container Docker image
diff --git a/charts/partials/templates/_helpers.tpl b/charts/partials/templates/_helpers.tpl
index cc260aeaf..b6cdc34d0 100644
--- a/charts/partials/templates/_helpers.tpl
+++ b/charts/partials/templates/_helpers.tpl
@@ -4,12 +4,11 @@ Splits a coma separated list into a list of string values.
 For example "11,22,55,44" will become "11","22","55","44"
 */}}
 {{- define "partials.splitStringList" -}}
-{{- if gt (len .) 0 -}}
-{{- $ports := splitList "," . -}}
+{{- if gt (len (toString .)) 0 -}}
+{{- $ports := toString . | splitList "," -}}
 {{- $last := sub (len $ports) 1 -}}
 {{- range $i,$port := $ports -}}
 "{{$port}}"{{ternary "," "" (ne $i $last)}}
 {{- end -}}
 {{- end -}}
 {{- end -}}
-
diff --git a/cli/cmd/install-cni-plugin.go b/cli/cmd/install-cni-plugin.go
index 9e2e181ba..51d3811c2 100644
--- a/cli/cmd/install-cni-plugin.go
+++ b/cli/cmd/install-cni-plugin.go
@@ -160,13 +160,6 @@ func (options *cniPluginOptions) buildValues() (*cnicharts.Values, error) {
 		return nil, err
 	}
 
-	ignoreInboundPorts := []string{
-		fmt.Sprintf("%d", options.proxyControlPort),
-		fmt.Sprintf("%d", options.proxyAdminPort),
-	}
-
-	ignoreInboundPorts = append(ignoreInboundPorts, options.ignoreInboundPorts...)
-
 	portsToRedirect := []string{}
 	for _, p := range options.portsToRedirect {
 		portsToRedirect = append(portsToRedirect, fmt.Sprintf("%d", p))
@@ -177,7 +170,7 @@ func (options *cniPluginOptions) buildValues() (*cnicharts.Values, error) {
 	installValues.LogLevel = options.logLevel
 	installValues.InboundProxyPort = options.inboundPort
 	installValues.OutboundProxyPort = options.outboundPort
-	installValues.IgnoreInboundPorts = strings.Join(ignoreInboundPorts, ",")
+	installValues.IgnoreInboundPorts = strings.Join(options.ignoreInboundPorts, ",")
 	installValues.IgnoreOutboundPorts = strings.Join(options.ignoreOutboundPorts, ",")
 	installValues.PortsToRedirect = strings.Join(portsToRedirect, ",")
 	installValues.ProxyUID = options.proxyUID
diff --git a/pkg/charts/cni/values.go b/pkg/charts/cni/values.go
index c744ec4cf..c94b7a419 100644
--- a/pkg/charts/cni/values.go
+++ b/pkg/charts/cni/values.go
@@ -33,6 +33,8 @@ type Values struct {
 	UseWaitFlag         bool   `json:"useWaitFlag"`
 	PriorityClassName   string `json:"priorityClassName"`
 	InstallNamespace    bool   `json:"installNamespace"`
+	ProxyAdminPort      string `json:"proxyAdminPort"`
+	ProxyControlPort    string `json:"proxyControlPort"`
 }
 
 // NewValues returns a new instance of the Values type.
diff --git a/web/app/package.json b/web/app/package.json
index 21619f50f..e8c06def9 100644
--- a/web/app/package.json
+++ b/web/app/package.json
@@ -12,7 +12,7 @@
     "@lingui/core": "^3.10.4",
     "@lingui/macro": "3.10.2",
     "@lingui/react": "3.10.2",
-    "@material-ui/core": "4.12.0",
+    "@material-ui/core": "4.12.1",
     "@material-ui/icons": "4.11.2",
     "@material-ui/lab": "^4.0.0-alpha.58",
     "classnames": "2.3.1",
diff --git a/web/app/yarn.lock b/web/app/yarn.lock
index cc83da979..310d9db9a 100644
--- a/web/app/yarn.lock
+++ b/web/app/yarn.lock
@@ -1425,14 +1425,14 @@
     "@babel/runtime" "^7.11.2"
     "@lingui/core" "^3.10.2"
 
-"@material-ui/core@4.12.0":
-  version "4.12.0"
-  resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.12.0.tgz#7f4c130fb585e4a4cdfbdb55e46bbe81c3763250"
-  integrity sha512-PB6gJdCLCgVdbCwBZgseKEP0zp+WiYao+YcEyJBLy3mTJ6sKoovmkI0fG/EjJ/S4mnjHlWl35T3SHxEBOVPztA==
+"@material-ui/core@4.12.1":
+  version "4.12.1"
+  resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.12.1.tgz#ac8f081498047aa02bb6ee70b77c5dad6a2a6e73"
+  integrity sha512-C6hYsjkWCTfBx9FaqxhCZCITBagh7fyCKFtHyvO3tTOcBw6NJaktdhNZ2n82jQdQdgfFvg6OOxi7OOzsAdAcBQ==
   dependencies:
     "@babel/runtime" "^7.4.4"
     "@material-ui/styles" "^4.11.4"
-    "@material-ui/system" "^4.12.0"
+    "@material-ui/system" "^4.12.1"
     "@material-ui/types" "5.1.0"
     "@material-ui/utils" "^4.11.2"
     "@types/react-transition-group" "^4.2.0"
@@ -1483,10 +1483,10 @@
     jss-plugin-vendor-prefixer "^10.5.1"
     prop-types "^15.7.2"
 
-"@material-ui/system@^4.12.0":
-  version "4.12.0"
-  resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.12.0.tgz#e05593219f04a0fb4369cf72b3a2cc5a3b0a29ef"
-  integrity sha512-fXfiLeHBLwoBgCrsjwGkwWVmtaZSi4Rcm3SnQwQy9HWq6JzQ6EmZCa0jyCRhDeh0p9qL1/RszTXloaAsuRAM0A==
+"@material-ui/system@^4.12.1":
+  version "4.12.1"
+  resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.12.1.tgz#2dd96c243f8c0a331b2bb6d46efd7771a399707c"
+  integrity sha512-lUdzs4q9kEXZGhbN7BptyiS1rLNHe6kG9o8Y307HCvF4sQxbCgpL2qi+gUk+yI8a2DNk48gISEQxoxpgph0xIw==
   dependencies:
     "@babel/runtime" "^7.4.4"
     "@material-ui/utils" "^4.11.2"


Test patch:
diff --git a/cli/cmd/testdata/install-cni-plugin_default.golden b/cli/cmd/testdata/install-cni-plugin_default.golden
index da89fbd08..a5e6d27ae 100644
--- a/cli/cmd/testdata/install-cni-plugin_default.golden
+++ b/cli/cmd/testdata/install-cni-plugin_default.golden
@@ -123,7 +123,7 @@ data:
         "outgoing-proxy-port": 4140,
         "proxy-uid": 2102,
         "ports-to-redirect": [],
-        "inbound-ports-to-ignore": ["4190","4191"],
+        "inbound-ports-to-ignore": ["4191","4190"],
         "simulate": false,
         "use-wait-flag": false
       }
diff --git a/cli/cmd/testdata/install-cni-plugin_fully_configured.golden b/cli/cmd/testdata/install-cni-plugin_fully_configured.golden
index a924427ef..5e4300e8e 100644
--- a/cli/cmd/testdata/install-cni-plugin_fully_configured.golden
+++ b/cli/cmd/testdata/install-cni-plugin_fully_configured.golden
@@ -123,7 +123,7 @@ data:
         "outgoing-proxy-port": 5140,
         "proxy-uid": 12102,
         "ports-to-redirect": [],
-        "inbound-ports-to-ignore": ["5190","5191"],
+        "inbound-ports-to-ignore": ["4191","4190"],
         "simulate": false,
         "use-wait-flag": false
       }
diff --git a/cli/cmd/testdata/install-cni-plugin_fully_configured_equal_dsts.golden b/cli/cmd/testdata/install-cni-plugin_fully_configured_equal_dsts.golden
index 527af10f9..cf8980c2b 100644
--- a/cli/cmd/testdata/install-cni-plugin_fully_configured_equal_dsts.golden
+++ b/cli/cmd/testdata/install-cni-plugin_fully_configured_equal_dsts.golden
@@ -123,7 +123,7 @@ data:
         "outgoing-proxy-port": 5140,
         "proxy-uid": 12102,
         "ports-to-redirect": [],
-        "inbound-ports-to-ignore": ["5190","5191"],
+        "inbound-ports-to-ignore": ["4191","4190"],
         "simulate": false,
         "use-wait-flag": false
       }
diff --git a/cli/cmd/testdata/install-cni-plugin_fully_configured_no_namespace.golden b/cli/cmd/testdata/install-cni-plugin_fully_configured_no_namespace.golden
index 326ca37ba..4074dbffd 100644
--- a/cli/cmd/testdata/install-cni-plugin_fully_configured_no_namespace.golden
+++ b/cli/cmd/testdata/install-cni-plugin_fully_configured_no_namespace.golden
@@ -113,7 +113,7 @@ data:
         "outgoing-proxy-port": 5140,
         "proxy-uid": 12102,
         "ports-to-redirect": [],
-        "inbound-ports-to-ignore": ["5190","5191"],
+        "inbound-ports-to-ignore": ["4191","4190"],
         "simulate": false,
         "use-wait-flag": false
       }
diff --git a/cli/cmd/testdata/install-cni-plugin_skip_ports.golden b/cli/cmd/testdata/install-cni-plugin_skip_ports.golden
index 68f1809b3..3159a5861 100644
--- a/cli/cmd/testdata/install-cni-plugin_skip_ports.golden
+++ b/cli/cmd/testdata/install-cni-plugin_skip_ports.golden
@@ -123,7 +123,7 @@ data:
         "outgoing-proxy-port": 4140,
         "proxy-uid": 2102,
         "ports-to-redirect": [],
-        "inbound-ports-to-ignore": ["4190","4191","80","8080"],
+        "inbound-ports-to-ignore": ["4191","4190","80","8080"],
         "outbound-ports-to-ignore": ["443","1000"],
         "simulate": false,
         "use-wait-flag": false
diff --git a/cli/cmd/testdata/install_cni_helm_default_output.golden b/cli/cmd/testdata/install_cni_helm_default_output.golden
index 8f022e349..193b66065 100644
--- a/cli/cmd/testdata/install_cni_helm_default_output.golden
+++ b/cli/cmd/testdata/install_cni_helm_default_output.golden
@@ -125,6 +125,7 @@ data:
         "outgoing-proxy-port": 4140,
         "proxy-uid": 2102,
         "ports-to-redirect": [],
+        "inbound-ports-to-ignore": ["4191","4190"],
         "simulate": false,
         "use-wait-flag": false
       }
diff --git a/cli/cmd/testdata/install_cni_helm_override_output.golden b/cli/cmd/testdata/install_cni_helm_override_output.golden
index 6fe96c375..b1d0df534 100644
--- a/cli/cmd/testdata/install_cni_helm_override_output.golden
+++ b/cli/cmd/testdata/install_cni_helm_override_output.golden
@@ -125,6 +125,7 @@ data:
         "outgoing-proxy-port": 5678,
         "proxy-uid": 1111,
         "ports-to-redirect": [],
+        "inbound-ports-to-ignore": ["4191","4190"],
         "simulate": false,
         "use-wait-flag": true
       }