Files
nodepool/nodepool/tests/fixtures/kubernetes.yaml
Antoine Musso 7176b3df79 Change entry point busy loop to 'sleep infinity'
When the Kubernetes, OpenShift or OpenShiftPods drivers start a
container, they replace the image entrypoint by a busy loop:

  /bin/sh -c 'while true; do sleep 30; done;'

The argument to sleep is parsed as a floating point number via
strtold(3) which states:

  An infinity is either "INF" or "INFINITY", disregarding case.

Remove the `while true` and sleep for eternity instead.

Change-Id: Icc05403c594bae996a2b5a61bb1ad56b2e2fb735
2025-06-04 21:47:33 +02:00

66 lines
1.7 KiB
YAML

zookeeper-servers:
- host: {zookeeper_host}
port: {zookeeper_port}
chroot: {zookeeper_chroot}
zookeeper-tls:
ca: {zookeeper_ca}
cert: {zookeeper_cert}
key: {zookeeper_key}
tenant-resource-limits:
- tenant-name: tenant-1
max-cores: 1024
labels:
- name: pod-fedora
- name: pod-extra
- name: pod-custom
- name: kubernetes-namespace
providers:
- name: kubespray
driver: kubernetes
context: admin-cluster.local
pools:
- name: main
node-attributes:
key1: value1
key2: value2
labels:
- name: kubernetes-namespace
type: namespace
- name: pod-fedora
type: pod
image: docker.io/fedora:28
- name: pod-extra
type: pod
image: docker.io/fedora:28
labels:
environment: qa
dynamic-labels:
# Note: we double the braces to deal with unit-test
# pre-processing of this file. The output and actual
# file syntax is single braces.
tenant: "{{request.tenant_name}}"
privileged: true
node-selector:
storageType: ssd
scheduler-name: myscheduler
volumes:
- name: my-csi-inline-vol
csi:
driver: inline.storage.kubernetes.io
volume-mounts:
- name: my-csi-inline-vol
mountPath: /data
- name: pod-custom
type: pod
spec:
containers:
- name: pod-custom
image: ubuntu:jammy
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c"]
args: ["sleep infinity"]