76 lines
2.5 KiB
Django/Jinja
76 lines
2.5 KiB
Django/Jinja
apiVersion: apps/v1alpha1
|
|
kind: PetSet
|
|
spec:
|
|
serviceName: "nova"
|
|
replicas: {{ nova_scheduler_replicas }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
service: nova
|
|
type: scheduler
|
|
annotations:
|
|
pod.alpha.kubernetes.io/initialized: "true"
|
|
pod.alpha.kubernetes.io/init-containers: '[
|
|
{
|
|
"name": "initialize-nova-scheduler",
|
|
"image": "{{ kolla_toolbox_image_full }}",
|
|
"command": [
|
|
"sh",
|
|
"-c",
|
|
"cp -a /config/..data/* /nova/;
|
|
IP=$(ip addr show dev {{ tunnel_interface }} | grep -G ''inet '' | awk ''{print $2}'' | sed ''s@/.*@@'');
|
|
crudini --set /nova/nova.conf DEFAULT my_ip $IP;
|
|
crudini --set /nova/nova.conf vnc novncproxy_host $IP;
|
|
crudini --set /nova/nova.conf vnc vncserver_listen $IP;
|
|
crudini --set /nova/nova.conf vnc vncserver_proxyclient_address $IP;
|
|
crudini --set /nova/nova.conf vnc novncproxy_base_url $IP;
|
|
crudini --set /nova/nova.conf vnc connection_uri ''qemu+tcp://''$IP"],
|
|
"volumeMounts": [
|
|
{
|
|
"name": "nova-scheduler-config",
|
|
"mountPath": "/config/"
|
|
},
|
|
{
|
|
"name": "nova-config",
|
|
"mountPath": "/nova/"
|
|
}
|
|
]
|
|
}
|
|
]'
|
|
spec:
|
|
containers:
|
|
- name: nova-scheduler
|
|
image: "{{ nova_scheduler_image_full }}"
|
|
volumeMounts:
|
|
- mountPath: {{ container_config_directory }}
|
|
name: nova-config
|
|
- mountPath: /etc/localtime
|
|
name: etc-localtime
|
|
- mountPath: /nova
|
|
name: nova-config
|
|
- mountPath: /var/log/kolla
|
|
name: kolla-logs
|
|
env:
|
|
- name: KOLLA_CONFIG_STRATEGY
|
|
value: {{ config_strategy }}
|
|
securityContext:
|
|
privileged: true
|
|
command: ["sh", "-c"]
|
|
args:
|
|
volumes:
|
|
- name: nova-scheduler-config
|
|
configMap:
|
|
name: nova-scheduler-configmap
|
|
- name: etc-localtime
|
|
hostPath:
|
|
path: /etc/localtime
|
|
- name: lib-modules
|
|
hostPath:
|
|
path: /lib/modules
|
|
- name: nova-config
|
|
emptyDir: {}
|
|
- name: kolla-logs
|
|
emptyDir: {}
|
|
metadata:
|
|
name: nova-scheduler
|