Move most coredns templates to static files (#4341)
* Move most coredns templates to static files This should speed up the task slightly * yaml lint fixespull/4344/head
parent
2560c4dda3
commit
fd2c47b56a
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubernetes.io/bootstrapping: rbac-defaults
|
||||||
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
|
name: system:coredns
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- endpoints
|
||||||
|
- services
|
||||||
|
- pods
|
||||||
|
- namespaces
|
||||||
|
verbs:
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- nodes
|
||||||
|
verbs:
|
||||||
|
- get
|
|
@ -1,19 +1,20 @@
|
||||||
---
|
---
|
||||||
- name: Kubernetes Apps | Lay Down CoreDNS Template
|
- name: Kubernetes Apps | Lay Down CoreDNS Template
|
||||||
template:
|
action: "{{ item.module }}"
|
||||||
src: "{{ item.file }}.j2"
|
args:
|
||||||
|
src: "{{ item.file }}{% if item.module == 'template' %}.j2{% endif %}"
|
||||||
dest: "{{ kube_config_dir }}/{{ item.file }}"
|
dest: "{{ kube_config_dir }}/{{ item.file }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { name: coredns, file: coredns-config.yml, type: configmap }
|
- { name: coredns, module: template, file: coredns-config.yml, type: configmap }
|
||||||
- { name: coredns, file: coredns-sa.yml, type: sa }
|
- { name: coredns, module: copy, file: coredns-sa.yml, type: sa }
|
||||||
- { name: coredns, file: coredns-deployment.yml, type: deployment }
|
- { name: coredns, module: template, file: coredns-deployment.yml, type: deployment }
|
||||||
- { name: coredns, file: coredns-svc.yml, type: svc }
|
- { name: coredns, module: template, file: coredns-svc.yml, type: svc }
|
||||||
- { name: coredns, file: coredns-clusterrole.yml, type: clusterrole }
|
- { name: coredns, module: copy, file: coredns-clusterrole.yml, type: clusterrole }
|
||||||
- { name: coredns, file: coredns-clusterrolebinding.yml, type: clusterrolebinding }
|
- { name: coredns, module: copy, file: coredns-clusterrolebinding.yml, type: clusterrolebinding }
|
||||||
- { name: dns-autoscaler, file: dns-autoscaler-sa.yml, type: sa }
|
- { name: dns-autoscaler, module: copy, file: dns-autoscaler-sa.yml, type: sa }
|
||||||
- { name: dns-autoscaler, file: dns-autoscaler-clusterrole.yml, type: clusterrole }
|
- { name: dns-autoscaler, module: copy, file: dns-autoscaler-clusterrole.yml, type: clusterrole }
|
||||||
- { name: dns-autoscaler, file: dns-autoscaler-clusterrolebinding.yml, type: clusterrolebinding }
|
- { name: dns-autoscaler, module: copy, file: dns-autoscaler-clusterrolebinding.yml, type: clusterrolebinding }
|
||||||
- { name: dns-autoscaler, file: dns-autoscaler.yml, type: deployment }
|
- { name: dns-autoscaler, module: template, file: dns-autoscaler.yml, type: deployment }
|
||||||
register: coredns_manifests
|
register: coredns_manifests
|
||||||
vars:
|
vars:
|
||||||
clusterIP: "{{ skydns_server }}"
|
clusterIP: "{{ skydns_server }}"
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
kubernetes.io/bootstrapping: rbac-defaults
|
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
|
||||||
name: system:coredns
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- endpoints
|
|
||||||
- services
|
|
||||||
- pods
|
|
||||||
- namespaces
|
|
||||||
verbs:
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- nodes
|
|
||||||
verbs:
|
|
||||||
- get
|
|
Loading…
Reference in New Issue