mirror of https://github.com/linkerd/linkerd2.git
Define default resource spec for proxy-init init container (#2763)
Fixes #2750 Signed-off-by: Ivan Sim <ivan@buoyant.io>
This commit is contained in:
parent
0cfc8c6f1c
commit
714035fee9
|
@ -122,7 +122,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -122,7 +122,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -261,7 +267,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -122,7 +122,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -133,7 +133,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -283,7 +289,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -433,7 +445,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -583,7 +601,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -133,7 +133,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -149,7 +149,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -133,7 +133,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -283,7 +289,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -138,7 +138,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -133,7 +133,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -133,7 +133,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -133,7 +133,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:dev-undefined
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -134,7 +134,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -134,7 +134,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -135,7 +135,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -135,7 +135,13 @@ items:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -279,7 +285,13 @@ items:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -135,7 +135,13 @@ items:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -279,7 +285,13 @@ items:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -116,7 +116,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -122,7 +122,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -133,7 +133,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:test-inject-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -135,7 +135,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -287,7 +293,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -204,7 +204,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -473,7 +479,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -669,7 +681,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -955,7 +973,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1204,7 +1228,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1388,7 +1418,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1596,7 +1632,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -523,7 +523,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -792,7 +798,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -988,7 +1000,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1274,7 +1292,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1523,7 +1547,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1707,7 +1737,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1915,7 +1951,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -529,7 +529,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -810,7 +816,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1012,7 +1024,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1304,7 +1322,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1559,7 +1583,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1749,7 +1779,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1963,7 +1999,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -529,7 +529,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -810,7 +816,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1012,7 +1024,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1304,7 +1322,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1559,7 +1583,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1749,7 +1779,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1963,7 +1999,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -491,7 +491,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -725,7 +731,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -886,7 +898,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1137,7 +1155,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1351,7 +1375,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1500,7 +1530,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1673,7 +1709,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:install-control-plane-version
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -524,7 +524,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:UPGRADE-CONTROL-PLANE-VERSION
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -794,7 +800,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:UPGRADE-CONTROL-PLANE-VERSION
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -991,7 +1003,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:UPGRADE-CONTROL-PLANE-VERSION
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1278,7 +1296,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:UPGRADE-CONTROL-PLANE-VERSION
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1528,7 +1552,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:UPGRADE-CONTROL-PLANE-VERSION
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1713,7 +1743,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:UPGRADE-CONTROL-PLANE-VERSION
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
@ -1922,7 +1958,13 @@ spec:
|
|||
image: gcr.io/linkerd-io/proxy-init:UPGRADE-CONTROL-PLANE-VERSION
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -40,7 +40,16 @@
|
|||
"--inbound-ports-to-ignore",
|
||||
"4190,4191"
|
||||
],
|
||||
"resources": {},
|
||||
"resources": {
|
||||
"limits": {
|
||||
"cpu":"100m",
|
||||
"memory":"50Mi"
|
||||
},
|
||||
"requests": {
|
||||
"cpu":"10m",
|
||||
"memory":"10Mi"
|
||||
}
|
||||
},
|
||||
"terminationMessagePolicy": "FallbackToLogsOnError",
|
||||
"imagePullPolicy": "IfNotPresent",
|
||||
"securityContext": {
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/api/extensions/v1beta1"
|
||||
k8sResource "k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
@ -62,6 +62,11 @@ const (
|
|||
envIdentityTrustAnchors = "LINKERD2_PROXY_IDENTITY_TRUST_ANCHORS"
|
||||
|
||||
identityAPIPort = 8080
|
||||
|
||||
proxyInitResourceRequestCPU = "10m"
|
||||
proxyInitResourceRequestMemory = "10Mi"
|
||||
proxyInitResourceLimitCPU = "100m"
|
||||
proxyInitResourceLimitMemory = "50Mi"
|
||||
)
|
||||
|
||||
var injectableKinds = []string{
|
||||
|
@ -94,7 +99,7 @@ const (
|
|||
|
||||
// OwnerRetrieverFunc is a function that returns a pod's owner reference
|
||||
// kind and name
|
||||
type OwnerRetrieverFunc func(*v1.Pod) (string, string)
|
||||
type OwnerRetrieverFunc func(*corev1.Pod) (string, string)
|
||||
|
||||
// ResourceConfig contains the parsed information for a given workload
|
||||
type ResourceConfig struct {
|
||||
|
@ -105,7 +110,7 @@ type ResourceConfig struct {
|
|||
proxyOutboundCapacity map[string]uint
|
||||
ownerRetriever OwnerRetrieverFunc
|
||||
origin Origin
|
||||
debugSidecar *v1.Container
|
||||
debugSidecar *corev1.Container
|
||||
|
||||
workload struct {
|
||||
obj runtime.Object
|
||||
|
@ -120,7 +125,7 @@ type ResourceConfig struct {
|
|||
meta *metav1.ObjectMeta
|
||||
labels map[string]string
|
||||
annotations map[string]string
|
||||
spec *v1.PodSpec
|
||||
spec *corev1.PodSpec
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,11 +145,11 @@ func NewResourceConfig(configs *config.All, origin Origin) *ResourceConfig {
|
|||
|
||||
// WithDebugSidecar enriches ResourceConfig with a debug sidecar for a resource
|
||||
func (conf *ResourceConfig) WithDebugSidecar() *ResourceConfig {
|
||||
conf.debugSidecar = &v1.Container{
|
||||
conf.debugSidecar = &corev1.Container{
|
||||
Name: k8s.DebugSidecarName,
|
||||
ImagePullPolicy: conf.proxyImagePullPolicy(),
|
||||
Image: fmt.Sprintf("%s:%s", k8s.DebugSidecarImage, conf.configs.GetGlobal().GetVersion()),
|
||||
TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError,
|
||||
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
|
||||
}
|
||||
return conf
|
||||
}
|
||||
|
@ -235,7 +240,7 @@ func (conf *ResourceConfig) getFreshWorkloadObj() runtime.Object {
|
|||
case k8s.Deployment:
|
||||
return &v1beta1.Deployment{}
|
||||
case k8s.ReplicationController:
|
||||
return &v1.ReplicationController{}
|
||||
return &corev1.ReplicationController{}
|
||||
case k8s.ReplicaSet:
|
||||
return &v1beta1.ReplicaSet{}
|
||||
case k8s.Job:
|
||||
|
@ -245,7 +250,7 @@ func (conf *ResourceConfig) getFreshWorkloadObj() runtime.Object {
|
|||
case k8s.StatefulSet:
|
||||
return &appsv1.StatefulSet{}
|
||||
case k8s.Pod:
|
||||
return &v1.Pod{}
|
||||
return &corev1.Pod{}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -314,7 +319,7 @@ func (conf *ResourceConfig) parse(bytes []byte) error {
|
|||
conf.pod.labels[k8s.ProxyDeploymentLabel] = v.Name
|
||||
conf.complete(&v.Spec.Template)
|
||||
|
||||
case *v1.ReplicationController:
|
||||
case *corev1.ReplicationController:
|
||||
if err := yaml.Unmarshal(bytes, v); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -364,7 +369,7 @@ func (conf *ResourceConfig) parse(bytes []byte) error {
|
|||
conf.pod.labels[k8s.ProxyStatefulSetLabel] = v.Name
|
||||
conf.complete(&v.Spec.Template)
|
||||
|
||||
case *v1.Pod:
|
||||
case *corev1.Pod:
|
||||
if err := yaml.Unmarshal(bytes, v); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -406,7 +411,7 @@ func (conf *ResourceConfig) parse(bytes []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) complete(template *v1.PodTemplateSpec) {
|
||||
func (conf *ResourceConfig) complete(template *corev1.PodTemplateSpec) {
|
||||
conf.pod.spec = &template.Spec
|
||||
conf.pod.meta = &template.ObjectMeta
|
||||
}
|
||||
|
@ -423,13 +428,13 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
}
|
||||
|
||||
proxyUID := conf.proxyUID()
|
||||
sidecar := v1.Container{
|
||||
sidecar := corev1.Container{
|
||||
Name: k8s.ProxyContainerName,
|
||||
Image: conf.taggedProxyImage(),
|
||||
ImagePullPolicy: conf.proxyImagePullPolicy(),
|
||||
TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError,
|
||||
SecurityContext: &v1.SecurityContext{RunAsUser: &proxyUID},
|
||||
Ports: []v1.ContainerPort{
|
||||
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
|
||||
SecurityContext: &corev1.SecurityContext{RunAsUser: &proxyUID},
|
||||
Ports: []corev1.ContainerPort{
|
||||
{
|
||||
Name: k8s.ProxyPortName,
|
||||
ContainerPort: conf.proxyInboundPort(),
|
||||
|
@ -440,7 +445,7 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
},
|
||||
},
|
||||
Resources: conf.proxyResourceRequirements(),
|
||||
Env: []v1.EnvVar{
|
||||
Env: []corev1.EnvVar{
|
||||
{
|
||||
Name: envLog,
|
||||
Value: conf.proxyLogLevel(),
|
||||
|
@ -479,7 +484,7 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
},
|
||||
{
|
||||
Name: "_pod_ns",
|
||||
ValueFrom: &v1.EnvVarSource{FieldRef: &v1.ObjectFieldSelector{FieldPath: "metadata.namespace"}},
|
||||
ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.namespace"}},
|
||||
},
|
||||
{
|
||||
Name: envDestinationContext,
|
||||
|
@ -500,7 +505,7 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
for _, container := range conf.pod.spec.Containers {
|
||||
if capacity, ok := conf.proxyOutboundCapacity[container.Image]; ok {
|
||||
sidecar.Env = append(sidecar.Env,
|
||||
v1.EnvVar{
|
||||
corev1.EnvVar{
|
||||
Name: "LINKERD2_PROXY_OUTBOUND_ROUTER_CAPACITY",
|
||||
Value: fmt.Sprintf("%d", capacity),
|
||||
},
|
||||
|
@ -510,12 +515,12 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
}
|
||||
|
||||
if saVolumeMount != nil {
|
||||
sidecar.VolumeMounts = []v1.VolumeMount{*saVolumeMount}
|
||||
sidecar.VolumeMounts = []corev1.VolumeMount{*saVolumeMount}
|
||||
}
|
||||
|
||||
idctx := conf.identityContext()
|
||||
if idctx == nil {
|
||||
sidecar.Env = append(sidecar.Env, v1.EnvVar{
|
||||
sidecar.Env = append(sidecar.Env, corev1.EnvVar{
|
||||
Name: envIdentityDisabled,
|
||||
Value: k8s.IdentityModeDisabled,
|
||||
})
|
||||
|
@ -523,7 +528,7 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
return
|
||||
}
|
||||
|
||||
sidecar.Env = append(sidecar.Env, []v1.EnvVar{
|
||||
sidecar.Env = append(sidecar.Env, []corev1.EnvVar{
|
||||
{
|
||||
Name: envIdentityDir,
|
||||
Value: k8s.MountPathEndEntity,
|
||||
|
@ -542,7 +547,7 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
},
|
||||
{
|
||||
Name: "_pod_sa",
|
||||
ValueFrom: &v1.EnvVarSource{FieldRef: &v1.ObjectFieldSelector{FieldPath: "spec.serviceAccountName"}},
|
||||
ValueFrom: &corev1.EnvVarSource{FieldRef: &corev1.ObjectFieldSelector{FieldPath: "spec.serviceAccountName"}},
|
||||
},
|
||||
{
|
||||
Name: "_l5d_ns",
|
||||
|
@ -569,15 +574,15 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
if len(conf.pod.spec.Volumes) == 0 {
|
||||
patch.addVolumeRoot()
|
||||
}
|
||||
patch.addVolume(&v1.Volume{
|
||||
patch.addVolume(&corev1.Volume{
|
||||
Name: k8s.IdentityEndEntityVolumeName,
|
||||
VolumeSource: v1.VolumeSource{
|
||||
EmptyDir: &v1.EmptyDirVolumeSource{
|
||||
VolumeSource: corev1.VolumeSource{
|
||||
EmptyDir: &corev1.EmptyDirVolumeSource{
|
||||
Medium: "Memory",
|
||||
},
|
||||
},
|
||||
})
|
||||
sidecar.VolumeMounts = append(sidecar.VolumeMounts, v1.VolumeMount{
|
||||
sidecar.VolumeMounts = append(sidecar.VolumeMounts, corev1.VolumeMount{
|
||||
Name: k8s.IdentityEndEntityVolumeName,
|
||||
MountPath: k8s.MountPathEndEntity,
|
||||
ReadOnly: false,
|
||||
|
@ -585,26 +590,27 @@ func (conf *ResourceConfig) injectPodSpec(patch *Patch) {
|
|||
patch.addContainer(&sidecar)
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) injectProxyInit(patch *Patch, saVolumeMount *v1.VolumeMount) {
|
||||
func (conf *ResourceConfig) injectProxyInit(patch *Patch, saVolumeMount *corev1.VolumeMount) {
|
||||
nonRoot := false
|
||||
runAsUser := int64(0)
|
||||
initContainer := &v1.Container{
|
||||
initContainer := &corev1.Container{
|
||||
Name: k8s.InitContainerName,
|
||||
Image: conf.taggedProxyInitImage(),
|
||||
ImagePullPolicy: conf.proxyInitImagePullPolicy(),
|
||||
TerminationMessagePolicy: v1.TerminationMessageFallbackToLogsOnError,
|
||||
TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError,
|
||||
Args: conf.proxyInitArgs(),
|
||||
SecurityContext: &v1.SecurityContext{
|
||||
Capabilities: &v1.Capabilities{
|
||||
Add: []v1.Capability{v1.Capability("NET_ADMIN")},
|
||||
SecurityContext: &corev1.SecurityContext{
|
||||
Capabilities: &corev1.Capabilities{
|
||||
Add: []corev1.Capability{corev1.Capability("NET_ADMIN")},
|
||||
},
|
||||
Privileged: &nonRoot,
|
||||
RunAsNonRoot: &nonRoot,
|
||||
RunAsUser: &runAsUser,
|
||||
},
|
||||
Resources: conf.proxyInitResourceRequirements(),
|
||||
}
|
||||
if saVolumeMount != nil {
|
||||
initContainer.VolumeMounts = []v1.VolumeMount{*saVolumeMount}
|
||||
initContainer.VolumeMounts = []corev1.VolumeMount{*saVolumeMount}
|
||||
}
|
||||
if len(conf.pod.spec.InitContainers) == 0 {
|
||||
patch.addInitContainerRoot()
|
||||
|
@ -612,7 +618,7 @@ func (conf *ResourceConfig) injectProxyInit(patch *Patch, saVolumeMount *v1.Volu
|
|||
patch.addInitContainer(initContainer)
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) serviceAccountVolumeMount() *v1.VolumeMount {
|
||||
func (conf *ResourceConfig) serviceAccountVolumeMount() *corev1.VolumeMount {
|
||||
// Probably always true, but wanna be super-safe
|
||||
if containers := conf.pod.spec.Containers; len(containers) > 0 {
|
||||
for _, vm := range containers[0].VolumeMounts {
|
||||
|
@ -679,11 +685,11 @@ func (conf *ResourceConfig) proxyImage() string {
|
|||
return conf.configs.GetProxy().GetProxyImage().GetImageName()
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyImagePullPolicy() v1.PullPolicy {
|
||||
func (conf *ResourceConfig) proxyImagePullPolicy() corev1.PullPolicy {
|
||||
if override := conf.getOverride(k8s.ProxyImagePullPolicyAnnotation); override != "" {
|
||||
return v1.PullPolicy(override)
|
||||
return corev1.PullPolicy(override)
|
||||
}
|
||||
return v1.PullPolicy(conf.configs.GetProxy().GetProxyImage().GetPullPolicy())
|
||||
return corev1.PullPolicy(conf.configs.GetProxy().GetProxyImage().GetPullPolicy())
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyVersion() string {
|
||||
|
@ -768,10 +774,10 @@ func (conf *ResourceConfig) identityContext() *config.IdentityContext {
|
|||
return conf.configs.GetGlobal().GetIdentityContext()
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyResourceRequirements() v1.ResourceRequirements {
|
||||
resources := v1.ResourceRequirements{
|
||||
Requests: v1.ResourceList{},
|
||||
Limits: v1.ResourceList{},
|
||||
func (conf *ResourceConfig) proxyResourceRequirements() corev1.ResourceRequirements {
|
||||
resources := corev1.ResourceRequirements{
|
||||
Requests: corev1.ResourceList{},
|
||||
Limits: corev1.ResourceList{},
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -791,7 +797,7 @@ func (conf *ResourceConfig) proxyResourceRequirements() v1.ResourceRequirements
|
|||
log.Warnf("%s (%s)", err, k8s.ProxyCPURequestAnnotation)
|
||||
}
|
||||
if !requestCPU.IsZero() {
|
||||
resources.Requests["cpu"] = requestCPU
|
||||
resources.Requests[corev1.ResourceCPU] = requestCPU
|
||||
}
|
||||
|
||||
if override := conf.getOverride(k8s.ProxyMemoryRequestAnnotation); override != "" {
|
||||
|
@ -803,7 +809,7 @@ func (conf *ResourceConfig) proxyResourceRequirements() v1.ResourceRequirements
|
|||
log.Warnf("%s (%s)", err, k8s.ProxyMemoryRequestAnnotation)
|
||||
}
|
||||
if !requestMemory.IsZero() {
|
||||
resources.Requests["memory"] = requestMemory
|
||||
resources.Requests[corev1.ResourceMemory] = requestMemory
|
||||
}
|
||||
|
||||
if override := conf.getOverride(k8s.ProxyCPULimitAnnotation); override != "" {
|
||||
|
@ -815,7 +821,7 @@ func (conf *ResourceConfig) proxyResourceRequirements() v1.ResourceRequirements
|
|||
log.Warnf("%s (%s)", err, k8s.ProxyCPULimitAnnotation)
|
||||
}
|
||||
if !limitCPU.IsZero() {
|
||||
resources.Limits["cpu"] = limitCPU
|
||||
resources.Limits[corev1.ResourceCPU] = limitCPU
|
||||
}
|
||||
|
||||
if override := conf.getOverride(k8s.ProxyMemoryLimitAnnotation); override != "" {
|
||||
|
@ -827,12 +833,25 @@ func (conf *ResourceConfig) proxyResourceRequirements() v1.ResourceRequirements
|
|||
log.Warnf("%s (%s)", err, k8s.ProxyMemoryLimitAnnotation)
|
||||
}
|
||||
if !limitMemory.IsZero() {
|
||||
resources.Limits["memory"] = limitMemory
|
||||
resources.Limits[corev1.ResourceMemory] = limitMemory
|
||||
}
|
||||
|
||||
return resources
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyInitResourceRequirements() corev1.ResourceRequirements {
|
||||
return corev1.ResourceRequirements{
|
||||
Requests: corev1.ResourceList{
|
||||
corev1.ResourceCPU: k8sResource.MustParse(proxyInitResourceRequestCPU),
|
||||
corev1.ResourceMemory: k8sResource.MustParse(proxyInitResourceRequestMemory),
|
||||
},
|
||||
Limits: corev1.ResourceList{
|
||||
corev1.ResourceCPU: k8sResource.MustParse(proxyInitResourceLimitCPU),
|
||||
corev1.ResourceMemory: k8sResource.MustParse(proxyInitResourceLimitMemory),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyDestinationAddr() string {
|
||||
ns := conf.configs.GetGlobal().GetLinkerdNamespace()
|
||||
dns := fmt.Sprintf("linkerd-destination.%s.svc.cluster.local", ns)
|
||||
|
@ -877,10 +896,10 @@ func (conf *ResourceConfig) proxyUID() int64 {
|
|||
return conf.configs.GetProxy().GetProxyUid()
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyReadinessProbe() *v1.Probe {
|
||||
return &v1.Probe{
|
||||
Handler: v1.Handler{
|
||||
HTTPGet: &v1.HTTPGetAction{
|
||||
func (conf *ResourceConfig) proxyReadinessProbe() *corev1.Probe {
|
||||
return &corev1.Probe{
|
||||
Handler: corev1.Handler{
|
||||
HTTPGet: &corev1.HTTPGetAction{
|
||||
Path: "/ready",
|
||||
Port: intstr.IntOrString{IntVal: conf.proxyAdminPort()},
|
||||
},
|
||||
|
@ -889,10 +908,10 @@ func (conf *ResourceConfig) proxyReadinessProbe() *v1.Probe {
|
|||
}
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyLivenessProbe() *v1.Probe {
|
||||
return &v1.Probe{
|
||||
Handler: v1.Handler{
|
||||
HTTPGet: &v1.HTTPGetAction{
|
||||
func (conf *ResourceConfig) proxyLivenessProbe() *corev1.Probe {
|
||||
return &corev1.Probe{
|
||||
Handler: corev1.Handler{
|
||||
HTTPGet: &corev1.HTTPGetAction{
|
||||
Path: "/metrics",
|
||||
Port: intstr.IntOrString{IntVal: conf.proxyAdminPort()},
|
||||
},
|
||||
|
@ -924,11 +943,11 @@ func (conf *ResourceConfig) proxyInitImage() string {
|
|||
return conf.configs.GetProxy().GetProxyInitImage().GetImageName()
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyInitImagePullPolicy() v1.PullPolicy {
|
||||
func (conf *ResourceConfig) proxyInitImagePullPolicy() corev1.PullPolicy {
|
||||
if override := conf.getOverride(k8s.ProxyImagePullPolicyAnnotation); override != "" {
|
||||
return v1.PullPolicy(override)
|
||||
return corev1.PullPolicy(override)
|
||||
}
|
||||
return v1.PullPolicy(conf.configs.GetProxy().GetProxyInitImage().GetPullPolicy())
|
||||
return corev1.PullPolicy(conf.configs.GetProxy().GetProxyInitImage().GetPullPolicy())
|
||||
}
|
||||
|
||||
func (conf *ResourceConfig) proxyInitArgs() []string {
|
||||
|
|
|
@ -431,3 +431,34 @@ func TestConfigAccessors(t *testing.T) {
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestProxyInitResourceRequirments(t *testing.T) {
|
||||
var (
|
||||
resourceConfig = NewResourceConfig(nil, OriginCLI)
|
||||
actual = resourceConfig.proxyInitResourceRequirements()
|
||||
)
|
||||
|
||||
expectedLimits := map[corev1.ResourceName]string{
|
||||
corev1.ResourceCPU: proxyInitResourceLimitCPU,
|
||||
corev1.ResourceMemory: proxyInitResourceLimitMemory,
|
||||
}
|
||||
|
||||
for kind, value := range expectedLimits {
|
||||
expected := k8sResource.MustParse(value)
|
||||
if v := actual.Limits[kind]; !reflect.DeepEqual(expected, v) {
|
||||
t.Errorf("Resource mismatch. Expected %+v. Actual %+v", expected, v)
|
||||
}
|
||||
}
|
||||
|
||||
expectedRequests := map[corev1.ResourceName]string{
|
||||
corev1.ResourceCPU: proxyInitResourceRequestCPU,
|
||||
corev1.ResourceMemory: proxyInitResourceRequestMemory,
|
||||
}
|
||||
|
||||
for kind, value := range expectedRequests {
|
||||
expected := k8sResource.MustParse(value)
|
||||
if v := actual.Requests[kind]; !reflect.DeepEqual(expected, v) {
|
||||
t.Errorf("Resource mismatch. Expected %+v. Actual %+v", expected, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,7 +98,13 @@ spec:
|
|||
image: init-image:fake # this is replaced during testing
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
|
@ -120,7 +120,13 @@ spec:
|
|||
image: init-image:fake # this is replaced during testing
|
||||
imagePullPolicy: Never
|
||||
name: linkerd-init
|
||||
resources: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 10Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
|
|
Loading…
Reference in New Issue