Skip to content

Commit

Permalink
Update templates and values file to match #3161
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sim <ivan@buoyant.io>
  • Loading branch information
Ivan Sim committed Aug 2, 2019
1 parent 430d4ee commit 2b4d94e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 36 deletions.
16 changes: 8 additions & 8 deletions charts/linkerd/templates/_config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}",
Expand All @@ -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 -}}
Expand Down
22 changes: 8 additions & 14 deletions charts/linkerd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,48 +87,42 @@ 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
PullPolicy: *image_pull_policy
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
Expand Down
8 changes: 4 additions & 4 deletions charts/partials/templates/_proxy-init.tpl
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
20 changes: 10 additions & 10 deletions charts/partials/templates/_proxy.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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 -}}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2b4d94e

Please sign in to comment.