45044c2d75
Pod opbject is not reschedulable by kubernetes. It means that if node with netchecker-server goes down, netchecker-server won't be scheduled somewhere. This commit changes the type of netchecker-server to Deployment, so netchecker-server will be scheduled on other nodes in case of failures.
33 lines
918 B
Django/Jinja
33 lines
918 B
Django/Jinja
apiVersion: apps/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: netchecker-server
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
name: netchecker-server
|
|
labels:
|
|
app: netchecker-server
|
|
namespace: {{ netcheck_namespace }}
|
|
spec:
|
|
containers:
|
|
- name: netchecker-server
|
|
image: "{{ server_img }}"
|
|
env:
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
resources:
|
|
limits:
|
|
cpu: {{ netchecker_server_cpu_limit }}
|
|
memory: {{ netchecker_server_memory_limit }}
|
|
requests:
|
|
cpu: {{ netchecker_server_cpu_requests }}
|
|
memory: {{ netchecker_server_memory_requests }}
|
|
ports:
|
|
- containerPort: 8081
|
|
hostPort: 8081
|
|
args:
|
|
- "-v=5"
|
|
- "-logtostderr"
|
|
- "-kubeproxyinit"
|
|
- "-endpoint=0.0.0.0:8081"
|