Skip to content
This repository was archived by the owner on Jul 24, 2019. It is now read-only.

Commit 905ebbc

Browse files
authored
Merge pull request #93 from alanmeadows/neutron_pr_60
Resolve neutron feedback from PR#60
2 parents a9af2c9 + 3c56140 commit 905ebbc

12 files changed

Lines changed: 252 additions & 200 deletions

neutron/templates/bin/_neutron-openvswitch-agent.sh.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
set -x
33
chown neutron: /run/openvswitch/db.sock
44

5+
# ensure we can talk to openvswitch or bail early
6+
# this is until we can setup a proper dependency
7+
# on deaemonsets - note that a show is not sufficient
8+
# here, we need to communicate with both the db and vswitchd
9+
# which means we need to do a create action
10+
#
11+
# see https://github.com/att-comdev/openstack-helm/issues/88
12+
timeout 3m neutron-sanity-check --config-file /etc/neutron/neutron.conf --ovsdb_native --nokeepalived_ipv6_support
13+
14+
515
# determine local-ip dynamically based on interface provided but only if tunnel_types is not null
616
{{- if .Values.ml2.agent.tunnel_types }}
717
IP=$(ip a s {{ .Values.network.interface.tunnel | default .Values.network.interface.default}} | grep 'inet ' | awk '{print $2}' | awk -F "/" '{print $1}')

neutron/templates/daemonset-dhcp-agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ spec:
8080
name: neutron-etc
8181
- name: socket
8282
hostPath:
83-
path: /var/lib/neutron/openstack-helm
83+
path: /var/lib/neutron/openstack-helm

neutron/templates/daemonset-openvswitch.yaml

Lines changed: 0 additions & 166 deletions
This file was deleted.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
apiVersion: extensions/v1beta1
2+
kind: DaemonSet
3+
metadata:
4+
name: ovs-agent
5+
spec:
6+
template:
7+
metadata:
8+
labels:
9+
app: ovs-agent
10+
spec:
11+
nodeSelector:
12+
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
13+
securityContext:
14+
runAsUser: 0
15+
dnsPolicy: ClusterFirst
16+
hostNetwork: true
17+
containers:
18+
- name: ovs-agent
19+
image: {{ .Values.images.neutron_openvswitch_agent }}
20+
imagePullPolicy: {{ .Values.images.pull_policy }}
21+
securityContext:
22+
privileged: true
23+
# ensures this container can can see a br-int
24+
# bridge before its marked as ready
25+
readinessProbe:
26+
exec:
27+
command:
28+
- bash
29+
- -c
30+
- 'ovs-vsctl list-br | grep -q br-int'
31+
env:
32+
- name: INTERFACE_NAME
33+
value: {{ .Values.network.interface.openvswitch | default .Values.network.interface.default }}
34+
- name: POD_NAME
35+
valueFrom:
36+
fieldRef:
37+
fieldPath: metadata.name
38+
- name: NAMESPACE
39+
valueFrom:
40+
fieldRef:
41+
fieldPath: metadata.namespace
42+
- name: COMMAND
43+
value: "bash /tmp/neutron-openvswitch-agent.sh"
44+
- name: DEPENDENCY_JOBS
45+
value: "{{ include "joinListWithColon" .Values.dependencies.ovs_agent.jobs }}"
46+
- name: DEPENDENCY_SERVICE
47+
value: "{{ include "joinListWithColon" .Values.dependencies.ovs_agent.service }}"
48+
volumeMounts:
49+
- name: neutronopenvswitchagentsh
50+
mountPath: /tmp/neutron-openvswitch-agent.sh
51+
subPath: neutron-openvswitch-agent.sh
52+
- name: neutronconf
53+
mountPath: /etc/neutron/neutron.conf
54+
subPath: neutron.conf
55+
- name: ml2confini
56+
mountPath: /etc/neutron/plugins/ml2/ml2-conf.ini
57+
subPath: ml2-conf.ini
58+
- name: libmodules
59+
mountPath: /lib/modules
60+
readOnly: true
61+
- name: run
62+
mountPath: /run
63+
- mountPath: /etc/resolv.conf
64+
name: resolvconf
65+
subPath: resolv.conf
66+
volumes:
67+
- name: varlibopenvswitch
68+
emptyDir: {}
69+
- name: neutronopenvswitchagentsh
70+
configMap:
71+
name: neutron-bin
72+
- name: neutronconf
73+
configMap:
74+
name: neutron-etc
75+
- name: ml2confini
76+
configMap:
77+
name: neutron-etc
78+
- name: resolvconf
79+
configMap:
80+
name: neutron-etc
81+
- name: libmodules
82+
hostPath:
83+
path: /lib/modules
84+
- name: run
85+
hostPath:
86+
path: /run
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
apiVersion: extensions/v1beta1
2+
kind: DaemonSet
3+
metadata:
4+
name: ovs-db
5+
spec:
6+
template:
7+
metadata:
8+
labels:
9+
app: ovs-db
10+
spec:
11+
nodeSelector:
12+
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
13+
securityContext:
14+
runAsUser: 0
15+
dnsPolicy: ClusterFirst
16+
hostNetwork: true
17+
containers:
18+
- name: ovs-db
19+
image: {{ .Values.images.openvswitch_db_server }}
20+
imagePullPolicy: {{ .Values.images.pull_policy }}
21+
securityContext:
22+
privileged: true
23+
env:
24+
- name: INTERFACE_NAME
25+
value: {{ .Values.network.interface.openvswitch | default .Values.network.interface.default }}
26+
- name: POD_NAME
27+
valueFrom:
28+
fieldRef:
29+
fieldPath: metadata.name
30+
- name: NAMESPACE
31+
valueFrom:
32+
fieldRef:
33+
fieldPath: metadata.namespace
34+
- name: COMMAND
35+
value: "bash /tmp/openvswitch-db-server.sh"
36+
volumeMounts:
37+
- name: openvswitchdbserversh
38+
mountPath: /tmp/openvswitch-db-server.sh
39+
subPath: openvswitch-db-server.sh
40+
- mountPath: /etc/resolv.conf
41+
name: resolvconf
42+
subPath: resolv.conf
43+
- name: varlibopenvswitch
44+
mountPath: /var/lib/openvswitch/
45+
- name: run
46+
mountPath: /run
47+
volumes:
48+
- name: openvswitchdbserversh
49+
configMap:
50+
name: neutron-bin
51+
- name: varlibopenvswitch
52+
emptyDir: {}
53+
- name: resolvconf
54+
configMap:
55+
name: neutron-etc
56+
- name: libmodules
57+
hostPath:
58+
path: /lib/modules
59+
- name: run
60+
hostPath:
61+
path: /run
62+

0 commit comments

Comments
 (0)