mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #14766 from brendandburns/perf
Add a second etcd instance for use with events.
This commit is contained in:
commit
96ec9bcc24
@ -2,7 +2,7 @@
|
|||||||
"apiVersion": "v1",
|
"apiVersion": "v1",
|
||||||
"kind": "Pod",
|
"kind": "Pod",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name":"etcd-server",
|
"name":"etcd-server{{ suffix }}",
|
||||||
"namespace": "kube-system"
|
"namespace": "kube-system"
|
||||||
},
|
},
|
||||||
"spec":{
|
"spec":{
|
||||||
@ -19,12 +19,12 @@
|
|||||||
"command": [
|
"command": [
|
||||||
"/bin/sh",
|
"/bin/sh",
|
||||||
"-c",
|
"-c",
|
||||||
"/usr/local/bin/etcd --addr 127.0.0.1:4001 --bind-addr 127.0.0.1:4001 --data-dir /var/etcd/data 1>>/var/log/etcd.log 2>&1"
|
"/usr/local/bin/etcd --listen-peer-urls=http://127.0.0.1:{{ server_port }} --addr 127.0.0.1:{{ port }} --bind-addr 127.0.0.1:{{ port }} --data-dir /var/etcd/data{{ suffix }} 1>>/var/log/etcd{{ suffix }}.log 2>&1"
|
||||||
],
|
],
|
||||||
"livenessProbe": {
|
"livenessProbe": {
|
||||||
"httpGet": {
|
"httpGet": {
|
||||||
"host": "127.0.0.1",
|
"host": "127.0.0.1",
|
||||||
"port": 4001,
|
"port": {{ port }},
|
||||||
"path": "/health"
|
"path": "/health"
|
||||||
},
|
},
|
||||||
"initialDelaySeconds": 15,
|
"initialDelaySeconds": 15,
|
||||||
@ -32,11 +32,13 @@
|
|||||||
},
|
},
|
||||||
"ports":[
|
"ports":[
|
||||||
{ "name": "serverport",
|
{ "name": "serverport",
|
||||||
"containerPort": 2380,
|
"containerPort": {{ server_port }},
|
||||||
"hostPort": 2380},{
|
"hostPort": {{ server_port }}
|
||||||
|
},{
|
||||||
"name": "clientport",
|
"name": "clientport",
|
||||||
"containerPort": 4001,
|
"containerPort": {{ port }},
|
||||||
"hostPort": 4001}
|
"hostPort": {{ port }}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"volumeMounts": [
|
"volumeMounts": [
|
||||||
{"name": "varetcd",
|
{"name": "varetcd",
|
||||||
@ -44,7 +46,7 @@
|
|||||||
"readOnly": false
|
"readOnly": false
|
||||||
},
|
},
|
||||||
{"name": "varlogetcd",
|
{"name": "varlogetcd",
|
||||||
"mountPath": "/var/log/etcd.log",
|
"mountPath": "/var/log/etcd{{ suffix }}.log",
|
||||||
"readOnly": false
|
"readOnly": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -57,7 +59,7 @@
|
|||||||
},
|
},
|
||||||
{ "name": "varlogetcd",
|
{ "name": "varlogetcd",
|
||||||
"hostPath": {
|
"hostPath": {
|
||||||
"path": "/var/log/etcd.log"}
|
"path": "/var/log/etcd{{ suffix }}.log"}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}}
|
}}
|
||||||
|
@ -38,6 +38,10 @@ touch /var/log/etcd.log:
|
|||||||
cmd.run:
|
cmd.run:
|
||||||
- creates: /var/log/etcd.log
|
- creates: /var/log/etcd.log
|
||||||
|
|
||||||
|
touch /var/log/etcd-events.log:
|
||||||
|
cmd.run:
|
||||||
|
- creates: /var/log/etcd-events.log
|
||||||
|
|
||||||
/var/etcd:
|
/var/etcd:
|
||||||
file.directory:
|
file.directory:
|
||||||
- user: root
|
- user: root
|
||||||
@ -57,3 +61,21 @@ touch /var/log/etcd.log:
|
|||||||
- mode: 644
|
- mode: 644
|
||||||
- makedirs: true
|
- makedirs: true
|
||||||
- dir_mode: 755
|
- dir_mode: 755
|
||||||
|
- context:
|
||||||
|
suffix: ""
|
||||||
|
port: 4001
|
||||||
|
server_port: 2380
|
||||||
|
|
||||||
|
/etc/kubernetes/manifests/etcd-events.manifest:
|
||||||
|
file.managed:
|
||||||
|
- source: salt://etcd/etcd.manifest
|
||||||
|
- template: jinja
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 644
|
||||||
|
- makedirs: true
|
||||||
|
- dir_mode: 755
|
||||||
|
- context:
|
||||||
|
suffix: "-events"
|
||||||
|
port: 4002
|
||||||
|
server_port: 2381
|
||||||
|
Loading…
Reference in New Issue
Block a user