-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkuma.yaml
120 lines (115 loc) · 3.46 KB
/
kuma.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
- name: Deploy Global Control-Plane
hosts: localhost
module_defaults:
kubernetes.core.k8s:
api_key: "{{ kuma.control_plane.global.cluster_api_key }}"
validate_certs: no
host: "{{ kuma.control_plane.global.cluster_api_url }}"
kubernetes.core.helm:
api_key: "{{ kuma.control_plane.global.cluster_api_key }}"
validate_certs: no
host: "{{ kuma.control_plane.global.cluster_api_url }}"
tasks:
- name: Import global_cp role
import_role:
name: global_cp
tags:
- never
- deploy
- deploy_global
- name: Deploy Zone Control-Plane (Kubernetes)
hosts: localhost
module_defaults:
kubernetes.core.k8s:
api_key: "{{ kuma.control_plane.zone.k8s.cluster_api_key }}"
validate_certs: no
host: "{{ kuma.control_plane.zone.k8s.cluster_api_url }}"
kubernetes.core.helm:
api_key: "{{ kuma.control_plane.zone.k8s.cluster_api_key }}"
validate_certs: no
host: "{{ kuma.control_plane.zone.k8s.cluster_api_url }}"
tasks:
- name: Import zone_cp_k8s role
import_role:
name: zone_cp_k8s
tags:
- never
- deploy
- deploy_zone_cp
- deploy_zone_cp_k8s
- name: Configure Logging & Metrics & Tracing
hosts: localhost
module_defaults:
kubernetes.core.k8s:
api_key: "{{ kuma.control_plane.global.cluster_api_key }}"
validate_certs: no
host: "{{ kuma.control_plane.global.cluster_api_url }}"
kubernetes.core.k8s_json_patch:
validate_certs: no
tasks:
- name: Import configure role
import_role:
name: configure
tags:
- never
- deploy
- configure
#####
# PURGE
#####
- name: Delete Global Control-Plane
hosts: localhost
module_defaults:
kubernetes.core.k8s:
api_key: "{{ kuma.control_plane.global.cluster_api_key }}"
validate_certs: no
host: "{{ kuma.control_plane.global.cluster_api_url }}"
tasks:
# Helm löscht nicht vollständig, daher wird anders gelöscht:
- shell: "kumactl install control-plane --cni-enabled --namespace {{ kuma.control_plane.global.namespace }} > /tmp/remove-kuma-global.yaml"
- kubernetes.core.k8s:
state: absent
src: "/tmp/remove-kuma-global.yaml"
- shell: "rm -f /tmp/remove-kuma-global.yaml"
tags:
- never
- purge
- purge_global
- name: Delete Zone Control-Plane (Kubernetes)
hosts: localhost
module_defaults:
kubernetes.core.k8s:
api_key: "{{ kuma.control_plane.zone.k8s.cluster_api_key }}"
validate_certs: no
host: "{{ kuma.control_plane.zone.k8s.cluster_api_url }}"
tasks:
# Helm löscht nicht vollständig, daher wird anders gelöscht:
- shell: "kumactl install control-plane --cni-enabled --namespace {{ kuma.control_plane.zone.k8s.namespace }} > /tmp/remove-kuma-zone-k8s.yaml"
- kubernetes.core.k8s:
state: absent
src: "/tmp/remove-kuma-zone-k8s.yaml"
- shell: "rm -f /tmp/remove-kuma-zone-k8s.yaml"
tags:
- never
- purge
- purge_zone_cp
- purge_zone_cp_k8s
- name: Disable Metrics
hosts: localhost
module_defaults:
kubernetes.core.k8s:
api_key: "{{ kuma.control_plane.zone.k8s.cluster_api_key }}"
validate_certs: no
host: "{{ kuma.control_plane.zone.k8s.cluster_api_url }}"
tasks:
- name: Remove metrics namespace
kubernetes.core.k8s:
name: "{{ kuma.options.metrics.namespace }}"
api_version: v1
kind: Namespace
state: absent
tags:
- never
- purge
- purge_metrics