
This maps zk "nodes" to k8s resources which are currently pods or namespaces in order to count them and apply max-servers limitations. Since a pod is always in a namespace we've essentially mapped "nodes" to k8s namespaces. This limitation is quite basic and jobs with a namespace can still in theory consume a number of resources, but if you control the jobs and then limit the number of concurrent jobs via max-servers aka max namespaces you should be able to have some control. To make this work we adapt the simple driver's handler class for use by the kubernetes driver. In particular we provide a method to override the launcher class. Otherwise the code necessary to handle quota checks is identitical so we reuse it. Change-Id: Ieb9f179d99b322a9cbf4bc19d4f495bcda0d1ea8
26 lines
550 B
YAML
26 lines
550 B
YAML
zookeeper-servers:
|
|
- host: {zookeeper_host}
|
|
port: {zookeeper_port}
|
|
chroot: {zookeeper_chroot}
|
|
|
|
labels:
|
|
- name: pod-fedora
|
|
- name: kubernetes-namespace
|
|
|
|
providers:
|
|
- name: kubespray
|
|
driver: kubernetes
|
|
context: admin-cluster.local
|
|
pools:
|
|
- name: main
|
|
max-servers: 2
|
|
node-attributes:
|
|
key1: value1
|
|
key2: value2
|
|
labels:
|
|
- name: kubernetes-namespace
|
|
type: namespace
|
|
- name: pod-fedora
|
|
type: pod
|
|
image: docker.io/fedora:28
|