739646cff6
This PS does the following: * Add support for testing Cinder. * Fix tests for Nova/Neutron. * Add some Ceph more docs. * Add support for a second osd for testing. * Add a ceph-admin pod for easier Ceph admin related activities. * Add a ceph-rbd daemonset that that lets you use rbd with Kubernetes without needing to install Ceph on the host. * Add back missing Cinder Keystone endpoints. * Make storage provider filesystem type configurable. * Add a ton more logging to the gate job. * Support Ubuntu containers in the gate. Change-Id: Ib1241ec5e997ccc6e6a9bf0cc15ed11faf3a122b
83 lines
2.5 KiB
Django/Jinja
83 lines
2.5 KiB
Django/Jinja
{%- set resourceName = kolla_kubernetes.cli.args.resource_name %}
|
|
{%- import "services/common/common-lib.yml.j2" as lib with context %}
|
|
apiVersion: extensions/v1beta1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: ceph-rbd
|
|
labels:
|
|
component: ceph
|
|
system: rbd
|
|
namespace: {{ kolla_kubernetes_namespace }}
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
component: ceph
|
|
system: rbd
|
|
spec:
|
|
hostNetwork: True
|
|
hostPID: True
|
|
nodeSelector:
|
|
{%- set selector = kolla_kubernetes_hostlabel_ceph_rbd |
|
|
default(kolla_kubernetes_hostlabel_controller)
|
|
%}
|
|
{{ selector.key }}: {{ selector.value }}
|
|
containers:
|
|
- image: "{{ ceph_mon_image_full }}"
|
|
name: main
|
|
securityContext:
|
|
privileged: true
|
|
command:
|
|
- /bin/bash
|
|
- -xec
|
|
- |
|
|
modprobe rbd;
|
|
if [ -x /host/rbd ]; then
|
|
grep label=io.kubernetes.pod.namespace /host/rbd > /dev/null && rm -f /host/rbd
|
|
fi
|
|
if [ ! -x /host/rbd ]; then
|
|
echo IyEvYmluL2Jhc2gKCg== | base64 -d > /host/rbd;
|
|
echo 'ID=$(docker ps -q -f label=io.kubernetes.pod.namespace='$POD_NAMESPACE' -f label=io.kubernetes.pod.name='$POD_NAME' -f label=io.kubernetes.container.name=main);' >> /host/rbd;
|
|
echo 'docker exec --privileged -u 0 -i $ID /usr/bin/rbd "$@"' >> /host/rbd;
|
|
chmod +x /host/rbd;
|
|
fi;
|
|
while true; do sleep 1000; done
|
|
env:
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
volumeMounts:
|
|
{{ lib.common_volume_mounts(indent=12) }}
|
|
- mountPath: /host/
|
|
name: host-usr-bin
|
|
- mountPath: /dev
|
|
name: host-dev
|
|
- mountPath: /sys
|
|
name: host-sys
|
|
- mountPath: /etc
|
|
name: host-etc
|
|
- mountPath: /lib/modules
|
|
name: lib-modules
|
|
volumes:
|
|
{{ lib.common_volumes(indent=8) }}
|
|
- name: host-usr-bin
|
|
hostPath:
|
|
path: /usr/bin
|
|
- name: host-dev
|
|
hostPath:
|
|
path: /dev
|
|
- name: host-sys
|
|
hostPath:
|
|
path: /sys
|
|
- name: host-etc
|
|
hostPath:
|
|
path: /etc
|
|
- name: lib-modules
|
|
hostPath:
|
|
path: /lib/modules
|