Do not deploy CoreDNS and ExtDNS on masters in case of OC4

Change-Id: I79ddb6c199ec336cf62db64d71c6e03480dccce8
diff --git a/kubernetes/files/kube-addons/coredns/coredns-deploy.yml b/kubernetes/files/kube-addons/coredns/coredns-deploy.yml
index c1a6f11..b8661f1 100644
--- a/kubernetes/files/kube-addons/coredns/coredns-deploy.yml
+++ b/kubernetes/files/kube-addons/coredns/coredns-deploy.yml
@@ -25,8 +25,10 @@
     spec:
       serviceAccountName: coredns
       tolerations:
+      {%- if not salt['pillar.get']('kubernetes').get('master', {}).get('network', {}).get('opencontrail', {}).get('enabled', false) %}
         - key: node-role.kubernetes.io/master
           effect: NoSchedule
+      {%- endif %}
         - key: "CriticalAddonsOnly"
           operator: "Exists"
       containers:
diff --git a/kubernetes/files/kube-addons/coredns/coredns-etcd-operator-deployment.yaml b/kubernetes/files/kube-addons/coredns/coredns-etcd-operator-deployment.yaml
index 116a584..f952e0c 100644
--- a/kubernetes/files/kube-addons/coredns/coredns-etcd-operator-deployment.yaml
+++ b/kubernetes/files/kube-addons/coredns/coredns-etcd-operator-deployment.yaml
@@ -24,9 +24,11 @@
         cni: {{ common.addons.coredns.cni }}
 {%- endif %}
     spec:
+      {%- if not salt['pillar.get']('kubernetes').get('master', {}).get('network', {}).get('opencontrail', {}).get('enabled', false) %}
       tolerations:
         - key: node-role.kubernetes.io/master
           effect: NoSchedule
+      {%- endif %}
       serviceAccountName: etcd-operator
       containers:
       - name: coredns-etcd-operator
diff --git a/kubernetes/files/kube-addons/externaldns/externaldns-deploy.yml b/kubernetes/files/kube-addons/externaldns/externaldns-deploy.yml
index e7e4a5b..b01b163 100644
--- a/kubernetes/files/kube-addons/externaldns/externaldns-deploy.yml
+++ b/kubernetes/files/kube-addons/externaldns/externaldns-deploy.yml
@@ -21,9 +21,11 @@
         cni: {{ common.addons.externaldns.cni }}
 {%- endif %}
     spec:
+      {%- if not salt['pillar.get']('kubernetes').get('master', {}).get('network', {}).get('opencontrail', {}).get('enabled', false) %}
       tolerations:
         - key: node-role.kubernetes.io/master
           effect: NoSchedule
+      {%- endif %}
       serviceAccountName: externaldns
       containers:
       - name: external-dns