From 7b31666a7e60fac8bbdc9c80af343cd9c93bc10f Mon Sep 17 00:00:00 2001 From: Ivan Sim Date: Tue, 30 Jul 2019 15:24:59 -0700 Subject: [PATCH] Update templates and values file to match #3161 Signed-off-by: Ivan Sim --- charts/linkerd/templates/_config.tpl | 16 ++++++++-------- charts/linkerd/values.yaml | 22 ++++++++-------------- charts/partials/templates/_proxy-init.tpl | 8 ++++---- charts/partials/templates/_proxy.tpl | 20 ++++++++++---------- 4 files changed, 30 insertions(+), 36 deletions(-) diff --git a/charts/linkerd/templates/_config.tpl b/charts/linkerd/templates/_config.tpl index c8bc7f89085df..a089aadd9aff1 100644 --- a/charts/linkerd/templates/_config.tpl +++ b/charts/linkerd/templates/_config.tpl @@ -18,22 +18,22 @@ {{- define "linkerd.configs.proxy" -}} { "adminPort":{ - "port": {{.Proxy.Port.Admin}} + "port": {{.Proxy.Ports.Admin}} }, "controlPort":{ - "port": {{.Proxy.Port.Control}} + "port": {{.Proxy.Ports.Control}} }, "disableExternalProfiles": {{not .Proxy.EnableExternalProfile}}, "ignoreInboundPorts": {{splitList "," .ProxyInit.IgnoreInboundPorts}}, "ignoreOutboundPorts": {{splitList "," .ProxyInit.IgnoreOutboundPorts}}, "inboundPort":{ - "port": {{.Proxy.Port.Inbound}} + "port": {{.Proxy.Ports.Inbound}} }, "logLevel":{ "level": "{{.Proxy.LogLevel}}" }, "outboundPort":{ - "port": {{.Proxy.Port.Outbound}} + "port": {{.Proxy.Ports.Outbound}} }, "proxyImage":{ "imageName":"{{.Proxy.Image.Name}}", @@ -47,10 +47,10 @@ "proxyUid": {{.Proxy.UID}}, "proxyVersion": "{{.Proxy.Image.Version}}", "resource":{ - "limitCpu": "{{.Proxy.ResourceRequirements.CPU.Limit}}", - "limitMemory": "{{.Proxy.ResourceRequirements.Memory.Limit}}", - "requestCpu": "{{.Proxy.ResourceRequirements.CPU.Request}}", - "requestMemory": "{{.Proxy.ResourceRequirements.Memory.Request}}" + "limitCpu": "{{.Proxy.Resources.CPU.Limit}}", + "limitMemory": "{{.Proxy.Resources.Memory.Limit}}", + "requestCpu": "{{.Proxy.Resources.CPU.Request}}", + "requestMemory": "{{.Proxy.Resources.Memory.Request}}" } } {{- end -}} diff --git a/charts/linkerd/values.yaml b/charts/linkerd/values.yaml index 767744965b47c..5424aad53fb0b 100644 --- a/charts/linkerd/values.yaml +++ b/charts/linkerd/values.yaml @@ -87,6 +87,8 @@ Proxy: Capabilities: Add: Drop: + DisableIdentity: false # inject-only options. Do not change during installation + DisableTap: false # inject-only option. Do not change during installation EnableExternalProfile: false Image: Name: gcr.io/linkerd-io/proxy @@ -94,41 +96,33 @@ Proxy: Version: *linkerd_version LogLevel: warn,linkerd2_proxy=info MountPaths: - Port: + Ports: Admin: 4191 Control: 4190 Inbound: 4143 Outbound: 4140 - UID: 2102 - - # use this to override the default resource requirements in HA mode - ResourceRequirements: + Resources: CPU: Limit: "1" Request: 100m Memory: Limit: 250Mi Request: 20Mi - - # inject-only options. Do not change this for control plane installation - DisableIdentity: false - DisableTap: false + UID: 2102 # proxy-init configuration ProxyInit: Capabilities: Add: Drop: + IgnoreInboundPorts: "" + IgnoreOutboundPorts: "443" Image: Name: gcr.io/linkerd-io/proxy-init PullPolicy: *image_pull_policy Version: v1.0.0 - IgnoreInboundPorts: "" - IgnoreOutboundPorts: "443" MountPath: - - # use this to override the default resource requirements in HA mode - ResourceRequirements: + Resources: CPU: Limit: 100m Request: 10m diff --git a/charts/partials/templates/_proxy-init.tpl b/charts/partials/templates/_proxy-init.tpl index a3d6bb9a537c8..0e66d62bf3cb3 100644 --- a/charts/partials/templates/_proxy-init.tpl +++ b/charts/partials/templates/_proxy-init.tpl @@ -1,19 +1,19 @@ {{- define "partials.proxy-init" -}} - args: - --incoming-proxy-port - - {{.Proxy.Port.Inbound | quote}} + - {{.Proxy.Ports.Inbound | quote}} - --outgoing-proxy-port - - {{.Proxy.Port.Outbound | quote}} + - {{.Proxy.Ports.Outbound | quote}} - --proxy-uid - {{.Proxy.UID | quote}} - --inbound-ports-to-ignore - - {{.Proxy.Port.Control}},{{.Proxy.Port.Admin}}{{ternary (printf ",%s" .ProxyInit.IgnoreInboundPorts) "" (ne .ProxyInit.IgnoreInboundPorts "")}} + - {{.Proxy.Ports.Control}},{{.Proxy.Ports.Admin}}{{ternary (printf ",%s" .ProxyInit.IgnoreInboundPorts) "" (not (empty .ProxyInit.IgnoreInboundPorts))}} - --outbound-ports-to-ignore - {{.ProxyInit.IgnoreOutboundPorts | quote}} image: {{.ProxyInit.Image.Name}}:{{.ProxyInit.Image.Version}} imagePullPolicy: {{.ProxyInit.Image.PullPolicy}} name: linkerd-init - {{- include "partials.resources" .ProxyInit.ResourceRequirements | nindent 2 }} + {{- include "partials.resources" .ProxyInit.Resources | nindent 2 }} securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/charts/partials/templates/_proxy.tpl b/charts/partials/templates/_proxy.tpl index 97df8844e166e..9e8730c4b38d1 100644 --- a/charts/partials/templates/_proxy.tpl +++ b/charts/partials/templates/_proxy.tpl @@ -5,13 +5,13 @@ - name: LINKERD2_PROXY_DESTINATION_SVC_ADDR value: {{ternary "localhost.:8086" (printf "linkerd-destination.%s.svc.%s:8086" .Namespace .ClusterDomain) (eq .Proxy.Component "linkerd-controller")}} - name: LINKERD2_PROXY_CONTROL_LISTEN_ADDR - value: 0.0.0.0:{{.Proxy.Port.Control}} + value: 0.0.0.0:{{.Proxy.Ports.Control}} - name: LINKERD2_PROXY_ADMIN_LISTEN_ADDR - value: 0.0.0.0:{{.Proxy.Port.Admin}} + value: 0.0.0.0:{{.Proxy.Ports.Admin}} - name: LINKERD2_PROXY_OUTBOUND_LISTEN_ADDR - value: 127.0.0.1:{{.Proxy.Port.Outbound}} + value: 127.0.0.1:{{.Proxy.Ports.Outbound}} - name: LINKERD2_PROXY_INBOUND_LISTEN_ADDR - value: 0.0.0.0:{{.Proxy.Port.Inbound}} + value: 0.0.0.0:{{.Proxy.Ports.Inbound}} - name: LINKERD2_PROXY_DESTINATION_PROFILE_SUFFIXES {{- $internalProfileSuffix := printf "svc.%s." .ClusterDomain }} value: {{ternary "." $internalProfileSuffix .Proxy.EnableExternalProfile}} @@ -29,7 +29,7 @@ - name: LINKERD2_PROXY_OUTBOUND_ROUTER_CAPACITY value: "10000" {{ end -}} - {{ if .DisableIdentity -}} + {{ if .Proxy.DisableIdentity -}} - name: LINKERD2_PROXY_IDENTITY_DISABLED value: disabled {{ else -}} @@ -70,21 +70,21 @@ livenessProbe: httpGet: path: /metrics - port: {{.Proxy.Port.Admin}} + port: {{.Proxy.Ports.Admin}} initialDelaySeconds: 10 name: linkerd-proxy ports: - - containerPort: {{.Proxy.Port.Inbound}} + - containerPort: {{.Proxy.Ports.Inbound}} name: linkerd-proxy - - containerPort: {{.Proxy.Port.Admin}} + - containerPort: {{.Proxy.Ports.Admin}} name: linkerd-admin readinessProbe: httpGet: path: /ready - port: {{.Proxy.Port.Admin}} + port: {{.Proxy.Ports.Admin}} initialDelaySeconds: 2 {{- if eq .HighAvailability true -}} - {{- include "partials.resources" .Proxy.ResourceRequirements | nindent 2 -}} + {{- include "partials.resources" .Proxy.Resources | nindent 2 -}} {{- end }} securityContext: allowPrivilegeEscalation: false