Skip to content

Commit 7b31666

Browse files
author
Ivan Sim
committed
Update templates and values file to match #3161
Signed-off-by: Ivan Sim <[email protected]>
1 parent 70c1a61 commit 7b31666

File tree

4 files changed

+30
-36
lines changed

4 files changed

+30
-36
lines changed

charts/linkerd/templates/_config.tpl

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@
1818
{{- define "linkerd.configs.proxy" -}}
1919
{
2020
"adminPort":{
21-
"port": {{.Proxy.Port.Admin}}
21+
"port": {{.Proxy.Ports.Admin}}
2222
},
2323
"controlPort":{
24-
"port": {{.Proxy.Port.Control}}
24+
"port": {{.Proxy.Ports.Control}}
2525
},
2626
"disableExternalProfiles": {{not .Proxy.EnableExternalProfile}},
2727
"ignoreInboundPorts": {{splitList "," .ProxyInit.IgnoreInboundPorts}},
2828
"ignoreOutboundPorts": {{splitList "," .ProxyInit.IgnoreOutboundPorts}},
2929
"inboundPort":{
30-
"port": {{.Proxy.Port.Inbound}}
30+
"port": {{.Proxy.Ports.Inbound}}
3131
},
3232
"logLevel":{
3333
"level": "{{.Proxy.LogLevel}}"
3434
},
3535
"outboundPort":{
36-
"port": {{.Proxy.Port.Outbound}}
36+
"port": {{.Proxy.Ports.Outbound}}
3737
},
3838
"proxyImage":{
3939
"imageName":"{{.Proxy.Image.Name}}",
@@ -47,10 +47,10 @@
4747
"proxyUid": {{.Proxy.UID}},
4848
"proxyVersion": "{{.Proxy.Image.Version}}",
4949
"resource":{
50-
"limitCpu": "{{.Proxy.ResourceRequirements.CPU.Limit}}",
51-
"limitMemory": "{{.Proxy.ResourceRequirements.Memory.Limit}}",
52-
"requestCpu": "{{.Proxy.ResourceRequirements.CPU.Request}}",
53-
"requestMemory": "{{.Proxy.ResourceRequirements.Memory.Request}}"
50+
"limitCpu": "{{.Proxy.Resources.CPU.Limit}}",
51+
"limitMemory": "{{.Proxy.Resources.Memory.Limit}}",
52+
"requestCpu": "{{.Proxy.Resources.CPU.Request}}",
53+
"requestMemory": "{{.Proxy.Resources.Memory.Request}}"
5454
}
5555
}
5656
{{- end -}}

charts/linkerd/values.yaml

+8-14
Original file line numberDiff line numberDiff line change
@@ -87,48 +87,42 @@ Proxy:
8787
Capabilities:
8888
Add:
8989
Drop:
90+
DisableIdentity: false # inject-only options. Do not change during installation
91+
DisableTap: false # inject-only option. Do not change during installation
9092
EnableExternalProfile: false
9193
Image:
9294
Name: gcr.io/linkerd-io/proxy
9395
PullPolicy: *image_pull_policy
9496
Version: *linkerd_version
9597
LogLevel: warn,linkerd2_proxy=info
9698
MountPaths:
97-
Port:
99+
Ports:
98100
Admin: 4191
99101
Control: 4190
100102
Inbound: 4143
101103
Outbound: 4140
102-
UID: 2102
103-
104-
# use this to override the default resource requirements in HA mode
105-
ResourceRequirements:
104+
Resources:
106105
CPU:
107106
Limit: "1"
108107
Request: 100m
109108
Memory:
110109
Limit: 250Mi
111110
Request: 20Mi
112-
113-
# inject-only options. Do not change this for control plane installation
114-
DisableIdentity: false
115-
DisableTap: false
111+
UID: 2102
116112

117113
# proxy-init configuration
118114
ProxyInit:
119115
Capabilities:
120116
Add:
121117
Drop:
118+
IgnoreInboundPorts: ""
119+
IgnoreOutboundPorts: "443"
122120
Image:
123121
Name: gcr.io/linkerd-io/proxy-init
124122
PullPolicy: *image_pull_policy
125123
Version: v1.0.0
126-
IgnoreInboundPorts: ""
127-
IgnoreOutboundPorts: "443"
128124
MountPath:
129-
130-
# use this to override the default resource requirements in HA mode
131-
ResourceRequirements:
125+
Resources:
132126
CPU:
133127
Limit: 100m
134128
Request: 10m

charts/partials/templates/_proxy-init.tpl

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{{- define "partials.proxy-init" -}}
22
- args:
33
- --incoming-proxy-port
4-
- {{.Proxy.Port.Inbound | quote}}
4+
- {{.Proxy.Ports.Inbound | quote}}
55
- --outgoing-proxy-port
6-
- {{.Proxy.Port.Outbound | quote}}
6+
- {{.Proxy.Ports.Outbound | quote}}
77
- --proxy-uid
88
- {{.Proxy.UID | quote}}
99
- --inbound-ports-to-ignore
10-
- {{.Proxy.Port.Control}},{{.Proxy.Port.Admin}}{{ternary (printf ",%s" .ProxyInit.IgnoreInboundPorts) "" (ne .ProxyInit.IgnoreInboundPorts "")}}
10+
- {{.Proxy.Ports.Control}},{{.Proxy.Ports.Admin}}{{ternary (printf ",%s" .ProxyInit.IgnoreInboundPorts) "" (not (empty .ProxyInit.IgnoreInboundPorts))}}
1111
- --outbound-ports-to-ignore
1212
- {{.ProxyInit.IgnoreOutboundPorts | quote}}
1313
image: {{.ProxyInit.Image.Name}}:{{.ProxyInit.Image.Version}}
1414
imagePullPolicy: {{.ProxyInit.Image.PullPolicy}}
1515
name: linkerd-init
16-
{{- include "partials.resources" .ProxyInit.ResourceRequirements | nindent 2 }}
16+
{{- include "partials.resources" .ProxyInit.Resources | nindent 2 }}
1717
securityContext:
1818
allowPrivilegeEscalation: false
1919
capabilities:

charts/partials/templates/_proxy.tpl

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
- name: LINKERD2_PROXY_DESTINATION_SVC_ADDR
66
value: {{ternary "localhost.:8086" (printf "linkerd-destination.%s.svc.%s:8086" .Namespace .ClusterDomain) (eq .Proxy.Component "linkerd-controller")}}
77
- name: LINKERD2_PROXY_CONTROL_LISTEN_ADDR
8-
value: 0.0.0.0:{{.Proxy.Port.Control}}
8+
value: 0.0.0.0:{{.Proxy.Ports.Control}}
99
- name: LINKERD2_PROXY_ADMIN_LISTEN_ADDR
10-
value: 0.0.0.0:{{.Proxy.Port.Admin}}
10+
value: 0.0.0.0:{{.Proxy.Ports.Admin}}
1111
- name: LINKERD2_PROXY_OUTBOUND_LISTEN_ADDR
12-
value: 127.0.0.1:{{.Proxy.Port.Outbound}}
12+
value: 127.0.0.1:{{.Proxy.Ports.Outbound}}
1313
- name: LINKERD2_PROXY_INBOUND_LISTEN_ADDR
14-
value: 0.0.0.0:{{.Proxy.Port.Inbound}}
14+
value: 0.0.0.0:{{.Proxy.Ports.Inbound}}
1515
- name: LINKERD2_PROXY_DESTINATION_PROFILE_SUFFIXES
1616
{{- $internalProfileSuffix := printf "svc.%s." .ClusterDomain }}
1717
value: {{ternary "." $internalProfileSuffix .Proxy.EnableExternalProfile}}
@@ -29,7 +29,7 @@
2929
- name: LINKERD2_PROXY_OUTBOUND_ROUTER_CAPACITY
3030
value: "10000"
3131
{{ end -}}
32-
{{ if .DisableIdentity -}}
32+
{{ if .Proxy.DisableIdentity -}}
3333
- name: LINKERD2_PROXY_IDENTITY_DISABLED
3434
value: disabled
3535
{{ else -}}
@@ -70,21 +70,21 @@
7070
livenessProbe:
7171
httpGet:
7272
path: /metrics
73-
port: {{.Proxy.Port.Admin}}
73+
port: {{.Proxy.Ports.Admin}}
7474
initialDelaySeconds: 10
7575
name: linkerd-proxy
7676
ports:
77-
- containerPort: {{.Proxy.Port.Inbound}}
77+
- containerPort: {{.Proxy.Ports.Inbound}}
7878
name: linkerd-proxy
79-
- containerPort: {{.Proxy.Port.Admin}}
79+
- containerPort: {{.Proxy.Ports.Admin}}
8080
name: linkerd-admin
8181
readinessProbe:
8282
httpGet:
8383
path: /ready
84-
port: {{.Proxy.Port.Admin}}
84+
port: {{.Proxy.Ports.Admin}}
8585
initialDelaySeconds: 2
8686
{{- if eq .HighAvailability true -}}
87-
{{- include "partials.resources" .Proxy.ResourceRequirements | nindent 2 -}}
87+
{{- include "partials.resources" .Proxy.Resources | nindent 2 -}}
8888
{{- end }}
8989
securityContext:
9090
allowPrivilegeEscalation: false

0 commit comments

Comments
 (0)