Remove initContainer from default deployment (#2077)
This commit is contained in:
parent
98213efee3
commit
80462ecdad
4 changed files with 25 additions and 20 deletions
|
@ -17,16 +17,6 @@ spec:
|
|||
prometheus.io/scrape: 'true'
|
||||
spec:
|
||||
serviceAccountName: nginx-ingress-serviceaccount
|
||||
initContainers:
|
||||
- command:
|
||||
- sh
|
||||
- -c
|
||||
- sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range="1024 65535"
|
||||
image: alpine:3.6
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: sysctl
|
||||
securityContext:
|
||||
privileged: true
|
||||
containers:
|
||||
- name: nginx-ingress-controller
|
||||
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.2
|
||||
|
|
|
@ -16,16 +16,6 @@ spec:
|
|||
prometheus.io/port: '10254'
|
||||
prometheus.io/scrape: 'true'
|
||||
spec:
|
||||
initContainers:
|
||||
- command:
|
||||
- sh
|
||||
- -c
|
||||
- sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range="1024 65535"
|
||||
image: alpine:3.6
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: sysctl
|
||||
securityContext:
|
||||
privileged: true
|
||||
containers:
|
||||
- name: nginx-ingress-controller
|
||||
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.10.2
|
||||
|
|
9
docs/examples/customization/sysctl/README.md
Normal file
9
docs/examples/customization/sysctl/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Sysctl tuning
|
||||
|
||||
This example aims to demonstrate the use of an Init Container to adjust sysctl default values
|
||||
using `kubectl patch`
|
||||
|
||||
```console
|
||||
kubectl patch deployment -n ingress-nginx nginx-ingress-controller --patch="$(cat patch.json)"
|
||||
```
|
||||
|
16
docs/examples/customization/sysctl/patch.json
Normal file
16
docs/examples/customization/sysctl/patch.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"spec": {
|
||||
"template": {
|
||||
"spec": {
|
||||
"initContainers": [{
|
||||
"name": "sysctl",
|
||||
"image": "alpine:3.6",
|
||||
"securityContext": {
|
||||
"privileged": true
|
||||
},
|
||||
"command": ["sh", "-c", "sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range=1024 65535"]
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue