Merge "neutron openvswitch agent ip"
This commit is contained in:
commit
5a8d6dd23e
|
@ -26,6 +26,8 @@ nova_api_replicas: "1"
|
|||
nova_conductor_replicas: "1"
|
||||
nova_scheduler_replicas: "1"
|
||||
|
||||
enable_openvswitch_tcp: "no"
|
||||
|
||||
#################################
|
||||
# Kubernetes Cluster DNS setting
|
||||
#################################
|
||||
|
|
|
@ -252,8 +252,8 @@ kolla-kubernetes:
|
|||
- name: neutron-bootstrap-job
|
||||
template: services/neutron/neutron-bootstrap-job.yml.j2
|
||||
pod:
|
||||
- name: neutron-compute-pod
|
||||
template: services/neutron/neutron-compute-pod.yml.j2
|
||||
- name: neutron-openvswitch-agent-daemonset
|
||||
template: services/neutron/neutron-openvswitch-agent-daemonset.yml.j2
|
||||
- name: neutron-control-pod
|
||||
template: services/neutron/neutron-control-pod.yml.j2
|
||||
- name: neutron-dhcp-agent-pod
|
||||
|
|
|
@ -1,69 +1,71 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: openvswitch-db
|
||||
name: neutron-openvswitch-agent
|
||||
labels:
|
||||
component: openvswitch
|
||||
system: openvswitch-db
|
||||
namespace: default
|
||||
component: neutron
|
||||
system: openvswitch-agent
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: openvswitch-db
|
||||
name: neutron-openvswitch-agent
|
||||
labels:
|
||||
component: openvswitch
|
||||
system: openvswitch-db
|
||||
namespace: default
|
||||
component: neutron
|
||||
system: openvswitch-agent
|
||||
annotations:
|
||||
#FIXME Once out of alpha, this should be converted to yaml.
|
||||
pod.alpha.kubernetes.io/init-containers: '[
|
||||
{
|
||||
"name": "update-config",
|
||||
"image": "{{ kolla_toolbox_image_full }}",
|
||||
"command": [
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"cp -a /srv/configmap/..data/* /srv/pod-main-config/;
|
||||
TUNNEL_INTERFACE={{ tunnel_interface }};
|
||||
F=/var/lib/kolla-kubernetes/neutron-openvswitch-agent/tunnel_interface;
|
||||
[ -f $F ] && TUNNEL_INTERFACE=$(<$F);
|
||||
IP=$(ip addr list {{ tunnel_interface }} | grep ''inet '' |cut -d'' '' -f6|cut -d/ -f1);
|
||||
{%- if enable_openvswitch_tcp == "yes" -%}
|
||||
crudini --set /srv/pod-main-config/ml2_conf.ini ovs ovsdb_connection tcp:$IP:6640;
|
||||
{%- endif -%}
|
||||
crudini --set /srv/pod-main-config/ml2_conf.ini ovs local_ip $IP"
|
||||
],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "neutron-openvswitch-agent-configmap",
|
||||
"mountPath": "/srv/configmap"
|
||||
},
|
||||
{
|
||||
"name": "pod-main-config",
|
||||
"mountPath": "/srv/pod-main-config"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "update-permissions",
|
||||
"image": "{{ neutron_openvswitch_agent_image_full }}",
|
||||
"securityContext": {
|
||||
"runAsUser": 0
|
||||
},
|
||||
"command": [
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"chown --recursive neutron.kolla /var/log/kolla;"
|
||||
],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "kolla-logs",
|
||||
"mountPath": "/var/log/kolla"
|
||||
}
|
||||
]
|
||||
}
|
||||
]'
|
||||
spec:
|
||||
hostNetwork: True
|
||||
containers:
|
||||
- image: "{{ openvswitch_db_image_full }}"
|
||||
name: openvswitch-db-server
|
||||
securityContext:
|
||||
privileged: true
|
||||
env:
|
||||
- name: KOLLA_CONFIG_STRATEGY
|
||||
value: {{ config_strategy }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ container_config_directory }}
|
||||
name: openvswitch-db-config
|
||||
readOnly: true
|
||||
- mountPath: /etc/openvswitch
|
||||
name: openvswitch-db
|
||||
- mountPath: /var/run/openvswitch
|
||||
name: openvswitch-run
|
||||
- mountPath: /run
|
||||
name: host-run
|
||||
- mountPath: /dev
|
||||
name: host-dev
|
||||
- mountPath: /etc/localtime
|
||||
name: host-etc-localtime
|
||||
readOnly: true
|
||||
|
||||
- image: "{{ openvswitch_vswitchd_image_full }}"
|
||||
name: openvswitch-vswitchd
|
||||
securityContext:
|
||||
privileged: true
|
||||
env:
|
||||
- name: KOLLA_CONFIG_STRATEGY
|
||||
value: {{ config_strategy }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ container_config_directory }}
|
||||
name: openvswitch-vswitchd-config
|
||||
readOnly: true
|
||||
- mountPath: /run
|
||||
name: host-run
|
||||
- mountPath: /dev
|
||||
name: host-dev
|
||||
- mountPath: /etc/localtime
|
||||
name: host-etc-localtime
|
||||
readOnly: true
|
||||
- mountPath: /lib/modules
|
||||
name: host-lib-modules
|
||||
readOnly: true
|
||||
|
||||
- image: "{{ neutron_openvswitch_agent_image_full }}"
|
||||
name: neutron-openvswitch-agent
|
||||
name: main
|
||||
securityContext:
|
||||
privileged: true
|
||||
env:
|
||||
|
@ -71,7 +73,10 @@ spec:
|
|||
value: {{ config_strategy }}
|
||||
volumeMounts:
|
||||
- mountPath: {{ container_config_directory }}
|
||||
name: neutron-openvswitch-agent-config
|
||||
name: pod-main-config
|
||||
readOnly: true
|
||||
- mountPath: /var/lib/kolla-kubernetes/neutron-openvswitch-agent
|
||||
name: openvswitch-config
|
||||
readOnly: true
|
||||
- mountPath: /run
|
||||
name: host-run
|
||||
|
@ -116,13 +121,7 @@ spec:
|
|||
# value: {{ neutron_external_interface }}
|
||||
|
||||
volumes:
|
||||
- name: openvswitch-vswitchd-config
|
||||
configMap:
|
||||
name: openvswitch-vswitchd-configmap
|
||||
- name: openvswitch-db-config
|
||||
configMap:
|
||||
name: openvswitch-db-server-configmap
|
||||
- name: neutron-openvswitch-agent-config
|
||||
- name: neutron-openvswitch-agent-configmap
|
||||
configMap:
|
||||
name: neutron-openvswitch-agent-configmap
|
||||
items:
|
||||
|
@ -132,17 +131,16 @@ spec:
|
|||
path: config.json
|
||||
- key: ml2-conf.ini
|
||||
path: ml2_conf.ini
|
||||
- name: pod-main-config
|
||||
emptyDir: {}
|
||||
# NOTE: (sbezverk) Linux bridge will be moved to its own file at the time of development
|
||||
# keeping it here just for future reference.
|
||||
# - name: neutron-linuxbridge-agent-config
|
||||
# configMap:
|
||||
# name: neutron-linuxbridge-agent-configmap
|
||||
- name: openvswitch-db
|
||||
- name: openvswitch-config
|
||||
hostPath:
|
||||
path: /etc/openvswitch
|
||||
- name: openvswitch-run
|
||||
hostPath:
|
||||
path: /run/openvswitch
|
||||
path: /var/lib/kolla-kubernetes/neutron-openvswitch-agent
|
||||
- name: host-run
|
||||
hostPath:
|
||||
path: /run
|
Loading…
Reference in New Issue