Skip to content

Commit d465d8d

Browse files
authored
Merge pull request #7 from tanakaryo/how-to-use-k8s
#3 add resource.
2 parents 878a58f + aa3125a commit d465d8d

13 files changed

+3049
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
apiVersion: monitoring.coreos.com/v1
2+
kind: PodMonitor
3+
metadata:
4+
name: envoy-stats-monitor
5+
namespace: istio-system
6+
labels:
7+
monitoring: istio-proxies
8+
release: istio
9+
spec:
10+
selector:
11+
matchExpressions:
12+
- {key: istio-prometheus-ignore, operator: DoesNotExist}
13+
namespaceSelector:
14+
any: true
15+
jobLabel: envoy-stats
16+
podMetricsEndpoints:
17+
- path: /stats/prometheus
18+
interval: 15s
19+
relabelings:
20+
- action: keep
21+
sourceLabels: [__meta_kubernetes_pod_container_name]
22+
regex: "istio-proxy"
23+
- action: keep
24+
sourceLabels: [__meta_kubernetes_pod_annotationpresent_prometheus_io_scrape]
25+
- action: replace
26+
regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})
27+
replacement: '[$2]:$1'
28+
sourceLabels:
29+
- __meta_kubernetes_pod_annotation_prometheus_io_port
30+
- __meta_kubernetes_pod_ip
31+
targetLabel: __address__
32+
- action: replace
33+
regex: (\d+);((([0-9]+?)(\.|$)){4})
34+
replacement: $2:$1
35+
sourceLabels:
36+
- __meta_kubernetes_pod_annotation_prometheus_io_port
37+
- __meta_kubernetes_pod_ip
38+
targetLabel: __address__
39+
- action: labeldrop
40+
regex: "__meta_kubernetes_pod_label_(.+)"
41+
- sourceLabels: [__meta_kubernetes_namespace]
42+
action: replace
43+
targetLabel: namespace
44+
- sourceLabels: [__meta_kubernetes_pod_name]
45+
action: replace
46+
targetLabel: pod_name
47+
---
48+
apiVersion: monitoring.coreos.com/v1
49+
kind: ServiceMonitor
50+
metadata:
51+
name: istio-component-monitor
52+
namespace: istio-system
53+
labels:
54+
monitoring: istio-components
55+
release: istio
56+
spec:
57+
jobLabel: istio
58+
targetLabels: [app]
59+
selector:
60+
matchExpressions:
61+
- {key: istio, operator: In, values: [pilot]}
62+
namespaceSelector:
63+
any: true
64+
endpoints:
65+
- port: http-monitoring
66+
interval: 15s
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: skywalking-oap
5+
namespace: istio-system
6+
labels:
7+
app: skywalking-oap
8+
spec:
9+
selector:
10+
matchLabels:
11+
app: skywalking-oap
12+
template:
13+
metadata:
14+
labels:
15+
app: skywalking-oap
16+
sidecar.istio.io/inject: "false"
17+
spec:
18+
containers:
19+
- name: skywalking-oap
20+
image: apache/skywalking-oap-server:9.7.0
21+
env:
22+
- name: SW_HEALTH_CHECKER
23+
value: default
24+
readinessProbe:
25+
exec:
26+
command:
27+
- /skywalking/bin/swctl
28+
- health
29+
initialDelaySeconds: 30
30+
periodSeconds: 5
31+
32+
---
33+
apiVersion: v1
34+
kind: Service
35+
metadata:
36+
name: tracing
37+
namespace: istio-system
38+
labels:
39+
app: skywalking-oap
40+
spec:
41+
type: ClusterIP
42+
ports:
43+
- name: grpc
44+
port: 11800
45+
protocol: TCP
46+
targetPort: 11800
47+
- name: http-query
48+
port: 12800
49+
protocol: TCP
50+
targetPort: 12800
51+
selector:
52+
app: skywalking-oap
53+
---
54+
apiVersion: v1
55+
kind: Service
56+
metadata:
57+
labels:
58+
name: skywalking-oap
59+
name: skywalking-oap
60+
namespace: istio-system
61+
spec:
62+
ports:
63+
- port: 11800
64+
targetPort: 11800
65+
name: grpc
66+
- port: 12800
67+
targetPort: 12800
68+
name: http-query
69+
selector:
70+
app: skywalking-oap
71+
---
72+
apiVersion: apps/v1
73+
kind: Deployment
74+
metadata:
75+
name: skywalking-ui
76+
namespace: istio-system
77+
labels:
78+
app: skywalking-ui
79+
spec:
80+
selector:
81+
matchLabels:
82+
app: skywalking-ui
83+
template:
84+
metadata:
85+
labels:
86+
app: skywalking-ui
87+
annotations:
88+
sidecar.istio.io/inject: "false"
89+
spec:
90+
containers:
91+
- name: skywalking-ui
92+
image: apache/skywalking-ui:9.1.0
93+
env:
94+
- name: SW_OAP_ADDRESS
95+
value: http://skywalking-oap:12800
96+
readinessProbe:
97+
httpGet:
98+
path: /
99+
port: 8080
100+
initialDelaySeconds: 30
101+
periodSeconds: 5
102+
---
103+
apiVersion: v1
104+
kind: Service
105+
metadata:
106+
name: tracing-ui
107+
namespace: istio-system
108+
labels:
109+
app: skywalking-ui
110+
spec:
111+
type: ClusterIP
112+
ports:
113+
- name: http
114+
port: 8080
115+
protocol: TCP
116+
targetPort: 8080
117+
selector:
118+
app: skywalking-ui
119+
---
120+
apiVersion: v1
121+
kind: Service
122+
metadata:
123+
labels:
124+
name: skywalking-ui
125+
name: skywalking-ui
126+
namespace: istio-system
127+
spec:
128+
ports:
129+
- port: 8080
130+
targetPort: 8080
131+
name: http
132+
selector:
133+
app: skywalking-ui
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: zipkin
5+
namespace: istio-system
6+
labels:
7+
app: zipkin
8+
spec:
9+
selector:
10+
matchLabels:
11+
app: zipkin
12+
template:
13+
metadata:
14+
labels:
15+
app: zipkin
16+
sidecar.istio.io/inject: "false"
17+
spec:
18+
containers:
19+
- name: zipkin
20+
image: openzipkin/zipkin-slim:3.4.0
21+
env:
22+
- name: STORAGE_METHOD
23+
value: "mem"
24+
readinessProbe:
25+
httpGet:
26+
path: /health
27+
port: 9411
28+
initialDelaySeconds: 5
29+
periodSeconds: 5
30+
---
31+
apiVersion: v1
32+
kind: Service
33+
metadata:
34+
name: tracing
35+
namespace: istio-system
36+
labels:
37+
app: zipkin
38+
spec:
39+
type: ClusterIP
40+
ports:
41+
- name: http-query
42+
port: 80
43+
protocol: TCP
44+
targetPort: 9411
45+
selector:
46+
app: zipkin
47+
---
48+
apiVersion: v1
49+
kind: Service
50+
metadata:
51+
labels:
52+
name: zipkin
53+
name: zipkin
54+
namespace: istio-system
55+
spec:
56+
ports:
57+
- port: 9411
58+
targetPort: 9411
59+
name: http-query
60+
selector:
61+
app: zipkin

0 commit comments

Comments
 (0)