Fix OC4 manifest files, add choice to disable kube-proxy
Change-Id: Ib4ced01d54e39d71c69bf580b8264a2f563013b1
diff --git a/kubernetes/files/kube-addons/contrail/contrail.yaml b/kubernetes/files/kube-addons/contrail/contrail.yaml
index 18cd5cf..f023315 100644
--- a/kubernetes/files/kube-addons/contrail/contrail.yaml
+++ b/kubernetes/files/kube-addons/contrail/contrail.yaml
@@ -1,5 +1,5 @@
apiVersion: apps/v1beta2
-kind: Deployment
+kind: DaemonSet
metadata:
name: opencontrail
namespace: kube-system
@@ -8,7 +8,6 @@
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
- replicas: 3
selector:
matchLabels:
app: opencontrail
@@ -19,6 +18,31 @@
spec:
hostNetwork: true
containers:
+ - name: rabbitmq
+ image: rabbitmq:3.6.6-management-alpine
+ lifecycle:
+ postStart:
+ exec:
+ command:
+ - /bin/sh
+ - -c
+ - >
+ if [ -z "$(grep rabbitmq /etc/resolv.conf)" ]; then
+ sed "s/^search \([^ ]\+\)/search rabbitmq.\1 \1/" /etc/resolv.conf > /etc/resolv.conf.new;
+ cat /etc/resolv.conf.new > /etc/resolv.conf;
+ rm /etc/resolv.conf.new;
+ fi;
+ until rabbitmqctl node_health_check; do sleep 1; done;
+ if [[ "$HOSTNAME" != "ctl01" && -z "$(rabbitmqctl cluster_status | grep ctl01)" ]]; then
+ rabbitmqctl stop_app;
+ rabbitmqctl join_cluster rabbit@ctl01;
+ rabbitmqctl start_app;
+ fi;
+ rabbitmqctl set_policy ha-all "." '{"ha-mode":"exactly","ha-params":3,"ha-sync-mode":"automatic"}'
+ env:
+ - name: RABBITMQ_ERLANG_COOKIE
+ value: YTQMGYEHFATZPDKPOCXX
+
- name: opencontrail-controller
image: docker-prod-local.artifactory.mirantis.com/opencontrail-oc40/opencontrail-controller
securityContext:
@@ -99,31 +123,6 @@
securityContext:
privileged: true
- - name: rabbitmq
- image: rabbitmq:3.6.6-management-alpine
- lifecycle:
- postStart:
- exec:
- command:
- - /bin/sh
- - -c
- - >
- if [ -z "$(grep rabbitmq /etc/resolv.conf)" ]; then
- sed "s/^search \([^ ]\+\)/search rabbitmq.\1 \1/" /etc/resolv.conf > /etc/resolv.conf.new;
- cat /etc/resolv.conf.new > /etc/resolv.conf;
- rm /etc/resolv.conf.new;
- fi;
- until rabbitmqctl node_health_check; do sleep 1; done;
- if [[ "$HOSTNAME" != "ctl01" && -z "$(rabbitmqctl cluster_status | grep ctl01)" ]]; then
- rabbitmqctl stop_app;
- rabbitmqctl join_cluster rabbit@ctl01;
- rabbitmqctl start_app;
- fi;
- rabbitmqctl set_policy ha-all "." '{"ha-mode":"exactly","ha-params":3,"ha-sync-mode":"automatic"}'
- env:
- - name: RABBITMQ_ERLANG_COOKIE
- value: YTQMGYEHFATZPDKPOCXX
-
volumes:
# analytics / analyticsdb / controller /
- name: etc-contrail
diff --git a/kubernetes/files/kube-addons/contrail/kube-manager.yaml b/kubernetes/files/kube-addons/contrail/kube-manager.yaml
index 0d8162e..7fd0e0e 100644
--- a/kubernetes/files/kube-addons/contrail/kube-manager.yaml
+++ b/kubernetes/files/kube-addons/contrail/kube-manager.yaml
@@ -1,5 +1,5 @@
apiVersion: apps/v1beta2
-kind: Deployment
+kind: DaemonSet
metadata:
name: kube-manager
namespace: kube-system
@@ -8,7 +8,6 @@
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
- replicas: 3
selector:
matchLabels:
app: kube-manager
@@ -34,7 +33,6 @@
apt install python-eventlet;
service contrail-kube-manager restart;
-
volumeMounts:
- name: etc-kubernetes
mountPath: /etc/kubernetes
diff --git a/kubernetes/pool/init.sls b/kubernetes/pool/init.sls
index c4b1967..1270cc2 100644
--- a/kubernetes/pool/init.sls
+++ b/kubernetes/pool/init.sls
@@ -13,4 +13,6 @@
{%- if pool.network.get('genie', {}).get('enabled', False) %}
- kubernetes.pool.genie
{%- endif %}
+{%- if pool.get('kube_proxy', {}).get('enabled', True) %}
- kubernetes.pool.kube-proxy
+{%- endif %}