revert calico-related changes

This commit is contained in:
jwfang
2017-07-10 16:53:11 +08:00
parent cea3e224aa
commit 0b3badf3d8
9 changed files with 1 additions and 110 deletions

View File

@@ -195,28 +195,6 @@
when: secret_changed|default(false) or etcd_secret_changed|default(false)
notify: restart calico-node
- name: Calico | Lay Down calico-node RBAC Template
template:
src: "{{item.file}}"
dest: "{{kube_config_dir}}/{{item.file}}"
with_items:
- {name: calico-node, file: calico-node-clusterrole.yml, type: clusterrole}
- {name: calico-node, file: calico-node-clusterrolebinding.yml, type: clusterrolebinding}
register: manifests
when: inventory_hostname == groups['kube-master'][0] and rbac_enabled
- name: Calico | Create calico-node RBAC Resources
kube:
name: "{{item.item.name}}"
namespace: "{{ system_namespace }}"
kubectl: "{{bin_dir}}/kubectl"
resource: "{{item.item.type}}"
filename: "{{kube_config_dir}}/{{item.item.file}}"
state: "{{item.changed | ternary('latest','present') }}"
with_items: "{{ manifests.results }}"
failed_when: manifests|failed and "Error from server (AlreadyExists)" not in manifests.msg
when: inventory_hostname == groups['kube-master'][0] and rbac_enabled
- meta: flush_handlers
- name: Calico | Enable calico-node

View File

@@ -1,12 +0,0 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: calico-node
namespace: {{ system_namespace }}
rules:
- apiGroups: [""]
resources:
- pods
- nodes
verbs:
- get

View File

@@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: calico-node
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: calico-node
subjects:
- kind: Group
name: system:nodes
namespace: kube-system