Merge "Update kube-addon-manager to latest upstream version"
diff --git a/kubernetes/files/kube-addons/alertmanager/alertmanager-deploy.yml b/kubernetes/files/kube-addons/alertmanager/alertmanager-deploy.yml
index e1403ee..9e6c01a 100644
--- a/kubernetes/files/kube-addons/alertmanager/alertmanager-deploy.yml
+++ b/kubernetes/files/kube-addons/alertmanager/alertmanager-deploy.yml
@@ -7,7 +7,6 @@
namespace: {{ common.addons.get('alertmanager',{}).get('namespace', 'stacklight') }}
labels:
k8s-app: alertmanager
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
replicas: 2
diff --git a/kubernetes/files/kube-addons/alertmanager/alertmanager-sa.yml b/kubernetes/files/kube-addons/alertmanager/alertmanager-sa.yml
index 49c4bb4..7844be6 100644
--- a/kubernetes/files/kube-addons/alertmanager/alertmanager-sa.yml
+++ b/kubernetes/files/kube-addons/alertmanager/alertmanager-sa.yml
@@ -33,7 +33,6 @@
metadata:
name: alertmanager
labels:
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
roleRef:
kind: ClusterRole
diff --git a/kubernetes/files/kube-addons/alertmanager/alertmanager-svc.yml b/kubernetes/files/kube-addons/alertmanager/alertmanager-svc.yml
index 2a620fa..0ebeb15 100644
--- a/kubernetes/files/kube-addons/alertmanager/alertmanager-svc.yml
+++ b/kubernetes/files/kube-addons/alertmanager/alertmanager-svc.yml
@@ -6,7 +6,6 @@
name: alertmanager
namespace: {{ common.addons.get('alertmanager',{}).get('namespace', 'stacklight') }}
labels:
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/name: "Alertmanager"
spec:
diff --git a/kubernetes/files/kube-addons/contrail/contrail.yaml b/kubernetes/files/kube-addons/contrail/contrail.yaml
index 1e071dc..c122e07 100644
--- a/kubernetes/files/kube-addons/contrail/contrail.yaml
+++ b/kubernetes/files/kube-addons/contrail/contrail.yaml
@@ -8,7 +8,6 @@
namespace: kube-system
labels:
app: opencontrail
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
selector:
diff --git a/kubernetes/files/kube-addons/contrail/kube-manager.yaml b/kubernetes/files/kube-addons/contrail/kube-manager.yaml
index 9b6b090..f751a57 100644
--- a/kubernetes/files/kube-addons/contrail/kube-manager.yaml
+++ b/kubernetes/files/kube-addons/contrail/kube-manager.yaml
@@ -7,7 +7,6 @@
namespace: kube-system
labels:
app: kube-manager
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
selector:
diff --git a/kubernetes/files/kube-addons/coredns/coredns-deploy.yml b/kubernetes/files/kube-addons/coredns/coredns-deploy.yml
index 6696f08..c1a6f11 100644
--- a/kubernetes/files/kube-addons/coredns/coredns-deploy.yml
+++ b/kubernetes/files/kube-addons/coredns/coredns-deploy.yml
@@ -7,7 +7,6 @@
namespace: {{ common.addons.coredns.namespace }}
labels:
k8s-app: coredns
- kubernetes.io/cluster-service: "true"
kubernetes.io/name: "CoreDNS"
addonmanager.kubernetes.io/mode: Reconcile
spec:
diff --git a/kubernetes/files/kube-addons/coredns/coredns-svc.yml b/kubernetes/files/kube-addons/coredns/coredns-svc.yml
index 0ea083c..b5696e2 100644
--- a/kubernetes/files/kube-addons/coredns/coredns-svc.yml
+++ b/kubernetes/files/kube-addons/coredns/coredns-svc.yml
@@ -7,7 +7,6 @@
namespace: {{ common.addons.coredns.namespace }}
labels:
k8s-app: coredns
- kubernetes.io/cluster-service: "true"
kubernetes.io/name: "CoreDNS"
addonmanager.kubernetes.io/mode: Reconcile
spec:
diff --git a/kubernetes/files/kube-addons/dns/kubedns-rc.yaml b/kubernetes/files/kube-addons/dns/kubedns-rc.yaml
index febb3cf..dcc2eb9 100644
--- a/kubernetes/files/kube-addons/dns/kubedns-rc.yaml
+++ b/kubernetes/files/kube-addons/dns/kubedns-rc.yaml
@@ -20,7 +20,6 @@
namespace: kube-system
labels:
k8s-app: kube-dns
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
# replicas: not specified here:
diff --git a/kubernetes/files/kube-addons/dns/kubedns-sa.yaml b/kubernetes/files/kube-addons/dns/kubedns-sa.yaml
index 7455b2e..dddd5f0 100644
--- a/kubernetes/files/kube-addons/dns/kubedns-sa.yaml
+++ b/kubernetes/files/kube-addons/dns/kubedns-sa.yaml
@@ -4,5 +4,4 @@
name: kube-dns
namespace: kube-system
labels:
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
diff --git a/kubernetes/files/kube-addons/dns/kubedns-svc.yaml b/kubernetes/files/kube-addons/dns/kubedns-svc.yaml
index ab0c65b..649643f 100644
--- a/kubernetes/files/kube-addons/dns/kubedns-svc.yaml
+++ b/kubernetes/files/kube-addons/dns/kubedns-svc.yaml
@@ -20,7 +20,6 @@
namespace: kube-system
labels:
k8s-app: kube-dns
- kubernetes.io/cluster-service: "true"
kubernetes.io/name: "KubeDNS"
addonmanager.kubernetes.io/mode: Reconcile
spec:
diff --git a/kubernetes/files/kube-addons/fluentd/fluentd-aggregator-deploy.yaml b/kubernetes/files/kube-addons/fluentd/fluentd-aggregator-deploy.yaml
index 03bd870..32d1bb0 100644
--- a/kubernetes/files/kube-addons/fluentd/fluentd-aggregator-deploy.yaml
+++ b/kubernetes/files/kube-addons/fluentd/fluentd-aggregator-deploy.yaml
@@ -8,7 +8,6 @@
labels:
k8s-app: fluentd-aggregator
version: v1
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
replicas: 1
diff --git a/kubernetes/files/kube-addons/fluentd/fluentd-aggregator-svc.yaml b/kubernetes/files/kube-addons/fluentd/fluentd-aggregator-svc.yaml
index f6569b5..1595fb4 100644
--- a/kubernetes/files/kube-addons/fluentd/fluentd-aggregator-svc.yaml
+++ b/kubernetes/files/kube-addons/fluentd/fluentd-aggregator-svc.yaml
@@ -7,7 +7,6 @@
namespace: {{ common.addons.fluentd.get('namespace', 'stacklight') }}
labels:
k8s-app: fluentd-aggregator
- kubernetes.io/cluster-service: "true"
kubernetes.io/name: "fluentd-aggregator"
addonmanager.kubernetes.io/mode: Reconcile
spec:
diff --git a/kubernetes/files/kube-addons/fluentd/fluentd-logger-ds.yaml b/kubernetes/files/kube-addons/fluentd/fluentd-logger-ds.yaml
index 685ade4..140c336 100644
--- a/kubernetes/files/kube-addons/fluentd/fluentd-logger-ds.yaml
+++ b/kubernetes/files/kube-addons/fluentd/fluentd-logger-ds.yaml
@@ -8,7 +8,6 @@
labels:
k8s-app: fluentd-logger
version: v1
- kubernetes.io/cluster-service: "true"
beta.kubernetes.io/fluentd-ds-ready: "true"
spec:
template:
@@ -16,7 +15,6 @@
labels:
k8s-app: fluentd-logger
version: v1
- kubernetes.io/cluster-service: "true"
# This annotation ensures that fluentd does not get evicted if the node
# supports critical pod annotation based priority scheme.
# Note that this does not guarantee admission on the nodes (#40573).
diff --git a/kubernetes/files/kube-addons/fluentd/fluentd-sa.yaml b/kubernetes/files/kube-addons/fluentd/fluentd-sa.yaml
index d3ce2ef..2dd6b68 100644
--- a/kubernetes/files/kube-addons/fluentd/fluentd-sa.yaml
+++ b/kubernetes/files/kube-addons/fluentd/fluentd-sa.yaml
@@ -31,7 +31,6 @@
name: fluentd
labels:
k8s-app: fluentd
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
roleRef:
kind: ClusterRole
diff --git a/kubernetes/files/kube-addons/heapster-influxdb/heapster-address.yaml b/kubernetes/files/kube-addons/heapster-influxdb/heapster-address.yaml
index d2f7851..3dd0076 100644
--- a/kubernetes/files/kube-addons/heapster-influxdb/heapster-address.yaml
+++ b/kubernetes/files/kube-addons/heapster-influxdb/heapster-address.yaml
@@ -4,7 +4,6 @@
metadata:
labels:
k8s-app: heapster
- kubernetes.io/cluster-service: 'true'
kubernetes.io/name: 'Heapster'
addonmanager.kubernetes.io/mode: Reconcile
name: heapster-address
diff --git a/kubernetes/files/kube-addons/heapster-influxdb/heapster-controller.yaml b/kubernetes/files/kube-addons/heapster-influxdb/heapster-controller.yaml
index 5949f03..e3c61ee 100644
--- a/kubernetes/files/kube-addons/heapster-influxdb/heapster-controller.yaml
+++ b/kubernetes/files/kube-addons/heapster-influxdb/heapster-controller.yaml
@@ -20,7 +20,7 @@
uses: monitoring-influxdb
k8s-app: heapster
version: v6
- kubernetes.io/cluster-service: "true"
+ addonmanager.kubernetes.io/mode: Reconcile
spec:
{%- if 'RBAC' in master.auth.get('mode', "") %}
serviceAccountName: heapster
diff --git a/kubernetes/files/kube-addons/heapster-influxdb/heapster-endpoint.yaml b/kubernetes/files/kube-addons/heapster-influxdb/heapster-endpoint.yaml
index 8d915b5..406b12d 100644
--- a/kubernetes/files/kube-addons/heapster-influxdb/heapster-endpoint.yaml
+++ b/kubernetes/files/kube-addons/heapster-influxdb/heapster-endpoint.yaml
@@ -6,7 +6,6 @@
namespace: kube-system
labels:
k8s-app: heapster
- kubernetes.io/cluster-service: "true"
kubernetes.io/name: "Heapster"
addonmanager.kubernetes.io/mode: Reconcile
subsets:
diff --git a/kubernetes/files/kube-addons/heapster-influxdb/heapster-service.yaml b/kubernetes/files/kube-addons/heapster-influxdb/heapster-service.yaml
index d487f2e..f9f2651 100644
--- a/kubernetes/files/kube-addons/heapster-influxdb/heapster-service.yaml
+++ b/kubernetes/files/kube-addons/heapster-influxdb/heapster-service.yaml
@@ -3,7 +3,6 @@
metadata:
labels:
k8s-app: heapster
- kubernetes.io/cluster-service: 'true'
kubernetes.io/name: 'Heapster'
addonmanager.kubernetes.io/mode: Reconcile
name: heapster
diff --git a/kubernetes/files/kube-addons/prometheus/prometheus-sa.yaml b/kubernetes/files/kube-addons/prometheus/prometheus-sa.yaml
index a32fc7c..55e6d89 100644
--- a/kubernetes/files/kube-addons/prometheus/prometheus-sa.yaml
+++ b/kubernetes/files/kube-addons/prometheus/prometheus-sa.yaml
@@ -40,7 +40,6 @@
metadata:
name: prometheus
labels:
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
roleRef:
kind: ClusterRole
diff --git a/kubernetes/files/kube-addons/prometheus/prometheus-server-deploy.yaml b/kubernetes/files/kube-addons/prometheus/prometheus-server-deploy.yaml
index 7f27b52..6e8c58b 100644
--- a/kubernetes/files/kube-addons/prometheus/prometheus-server-deploy.yaml
+++ b/kubernetes/files/kube-addons/prometheus/prometheus-server-deploy.yaml
@@ -8,7 +8,6 @@
labels:
k8s-app: prometheus-server
version: v1
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
replicas: 2
diff --git a/kubernetes/files/kube-addons/prometheus/prometheus-server-svc.yaml b/kubernetes/files/kube-addons/prometheus/prometheus-server-svc.yaml
index 9829b45..978bb60 100644
--- a/kubernetes/files/kube-addons/prometheus/prometheus-server-svc.yaml
+++ b/kubernetes/files/kube-addons/prometheus/prometheus-server-svc.yaml
@@ -8,7 +8,6 @@
labels:
k8s-app: prometheus-server
version: v1
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
selector:
diff --git a/kubernetes/files/kube-addons/registry/registry-rc.yaml b/kubernetes/files/kube-addons/registry/registry-rc.yaml
index ba115c6..9e748fa 100644
--- a/kubernetes/files/kube-addons/registry/registry-rc.yaml
+++ b/kubernetes/files/kube-addons/registry/registry-rc.yaml
@@ -7,7 +7,6 @@
labels:
k8s-app: kube-registry
version: v0
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
replicas: 1
diff --git a/kubernetes/files/kube-addons/registry/registry.svc b/kubernetes/files/kube-addons/registry/registry.svc
index ad78a96..2159780 100644
--- a/kubernetes/files/kube-addons/registry/registry.svc
+++ b/kubernetes/files/kube-addons/registry/registry.svc
@@ -6,7 +6,6 @@
namespace: kube-system
labels:
k8s-app: kube-registry
- kubernetes.io/cluster-service: "true"
kubernetes.io/name: "KubeRegistry"
addonmanager.kubernetes.io/mode: Reconcile
spec:
diff --git a/kubernetes/files/kube-addons/telegraf/telegraf-ds.yaml b/kubernetes/files/kube-addons/telegraf/telegraf-ds.yaml
index 3614124..425e536 100644
--- a/kubernetes/files/kube-addons/telegraf/telegraf-ds.yaml
+++ b/kubernetes/files/kube-addons/telegraf/telegraf-ds.yaml
@@ -8,7 +8,6 @@
labels:
k8s-app: telegraf
version: v1
- kubernetes.io/cluster-service: "true"
beta.kubernetes.io/telegraf-ds-ready: "true"
spec:
template:
@@ -16,7 +15,6 @@
labels:
k8s-app: telegraf
version: v1
- kubernetes.io/cluster-service: "true"
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
diff --git a/kubernetes/files/kube-addons/telegraf/telegraf-sa.yaml b/kubernetes/files/kube-addons/telegraf/telegraf-sa.yaml
index e342827..dbad136 100644
--- a/kubernetes/files/kube-addons/telegraf/telegraf-sa.yaml
+++ b/kubernetes/files/kube-addons/telegraf/telegraf-sa.yaml
@@ -31,7 +31,6 @@
name: telegraf
labels:
k8s-app: telegraf
- kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
roleRef:
kind: ClusterRole
diff --git a/kubernetes/master/kube-addons.sls b/kubernetes/master/kube-addons.sls
index 6fcedb1..6206e72 100644
--- a/kubernetes/master/kube-addons.sls
+++ b/kubernetes/master/kube-addons.sls
@@ -1,5 +1,6 @@
{%- from "kubernetes/map.jinja" import common with context -%}
{%- from "kubernetes/map.jinja" import master with context -%}
+{%- from "kubernetes/map.jinja" import version %}
{%- if master.enabled %}
addon-dir-create:
@@ -222,67 +223,10 @@
{%- endif %}
-{%- if common.addons.get('dns', {'enabled': False}).enabled %}
+{%- if salt['pkg.version_cmp'](version,'1.11') >= 0 %}
-/etc/kubernetes/addons/dns/kubedns-svc.yaml:
- file.managed:
- - source: salt://kubernetes/files/kube-addons/dns/kubedns-svc.yaml
- - template: jinja
- - group: root
- - dir_mode: 755
- - makedirs: True
-
-/etc/kubernetes/addons/dns/kubedns-rc.yaml:
- file.managed:
- - source: salt://kubernetes/files/kube-addons/dns/kubedns-rc.yaml
- - template: jinja
- - group: root
- - dir_mode: 755
- - makedirs: True
-
-/etc/kubernetes/addons/dns/kubedns-sa.yaml:
- file.managed:
- - source: salt://kubernetes/files/kube-addons/dns/kubedns-sa.yaml
- - template: jinja
- - group: root
- - dir_mode: 755
- - makedirs: True
-
-{% if common.addons.dns.get('autoscaler', {}).get('enabled', True) %}
-
-/etc/kubernetes/addons/dns/kubedns-autoscaler.yaml:
- file.managed:
- - source: salt://kubernetes/files/kube-addons/dns/kubedns-autoscaler.yaml
- - template: jinja
- - group: root
- - dir_mode: 755
- - makedirs: True
-
-{%- if 'RBAC' in master.auth.get('mode', "") %}
-
-/etc/kubernetes/addons/dns/kubedns-autoscaler-rbac.yaml:
- file.managed:
- - source: salt://kubernetes/files/kube-addons/dns/kubedns-autoscaler-rbac.yaml
- - template: jinja
- - group: root
- - dir_mode: 755
- - makedirs: True
-
-/etc/kubernetes/addons/dns/kubedns-clusterrole.yaml:
- file.managed:
- - source: salt://kubernetes/files/kube-addons/dns/kubedns-clusterrole.yaml
- - template: jinja
- - group: root
- - dir_mode: 755
- - makedirs: True
-
-{% endif %}
-
-{% endif %}
-
-{% endif %}
-
-{%- if common.addons.get('coredns', {}).get('enabled') %}
+/etc/kubernetes/addons/dns:
+ file.absent
{%- if master.get('federation', {}).get('enabled') or (common.addons.get('externaldns', {}).get('enabled') and common.addons.get('externaldns', {}).get('provider') == "coredns") %}
/etc/kubernetes/addons/coredns/coredns-etcd-operator-deployment.yaml:
@@ -333,6 +277,64 @@
- group: root
- dir_mode: 755
- makedirs: True
+
+{% else %}
+
+/etc/kubernetes/addons/coredns:
+ file.absent
+
+/etc/kubernetes/addons/dns/kubedns-svc.yaml:
+ file.managed:
+ - source: salt://kubernetes/files/kube-addons/dns/kubedns-svc.yaml
+ - template: jinja
+ - group: root
+ - dir_mode: 755
+ - makedirs: True
+
+/etc/kubernetes/addons/dns/kubedns-rc.yaml:
+ file.managed:
+ - source: salt://kubernetes/files/kube-addons/dns/kubedns-rc.yaml
+ - template: jinja
+ - group: root
+ - dir_mode: 755
+ - makedirs: True
+
+/etc/kubernetes/addons/dns/kubedns-sa.yaml:
+ file.managed:
+ - source: salt://kubernetes/files/kube-addons/dns/kubedns-sa.yaml
+ - template: jinja
+ - group: root
+ - dir_mode: 755
+ - makedirs: True
+
+/etc/kubernetes/addons/dns/kubedns-autoscaler.yaml:
+ file.managed:
+ - source: salt://kubernetes/files/kube-addons/dns/kubedns-autoscaler.yaml
+ - template: jinja
+ - group: root
+ - dir_mode: 755
+ - makedirs: True
+
+{%- if 'RBAC' in master.auth.get('mode', "") %}
+
+/etc/kubernetes/addons/dns/kubedns-autoscaler-rbac.yaml:
+ file.managed:
+ - source: salt://kubernetes/files/kube-addons/dns/kubedns-autoscaler-rbac.yaml
+ - template: jinja
+ - group: root
+ - dir_mode: 755
+ - makedirs: True
+
+/etc/kubernetes/addons/dns/kubedns-clusterrole.yaml:
+ file.managed:
+ - source: salt://kubernetes/files/kube-addons/dns/kubedns-clusterrole.yaml
+ - template: jinja
+ - group: root
+ - dir_mode: 755
+ - makedirs: True
+
+{% endif %}
+
{% endif %}
{%- if common.addons.get('externaldns', {}).get('enabled') %}