Upgrade ovn-kubernetes CNI to latest release
[iec.git] / src / foundation / scripts / cni / ovn-kubernetes / templates / ovnkube-monitor.yaml.j2
1 # define ServiceMontior and Service resources for ovnkube-master, ovnkube-node,
2 # and ovnkube-db (required for prometheus monitoring)
3
4 apiVersion: monitoring.coreos.com/v1
5 kind: ServiceMonitor
6 metadata:
7   labels:
8     k8s-app: ovnkube-master
9   name: monitor-ovnkube-master
10   namespace: ovn-kubernetes
11 spec:
12   endpoints:
13   - interval: 30s
14     port: http-metrics
15     scheme: http
16     path: /metrics
17   jobLabel: k8s-app
18   namespaceSelector:
19     matchNames:
20     - ovn-kubernetes
21   selector:
22     matchLabels:
23       k8s-app: ovnkube-master
24 ---
25 apiVersion: v1
26 kind: Service
27 metadata:
28   labels:
29     k8s-app: ovnkube-master
30   name: ovn-kubernetes-master-prometheus-discovery
31   namespace: ovn-kubernetes
32 spec:
33   selector:
34     name: ovnkube-master
35   type: ClusterIP
36   clusterIP: None
37   publishNotReadyAddresses: true
38   ports:
39   - name: http-metrics
40     port: 9409
41     protocol: TCP
42     targetPort: 9409
43 ---
44
45 apiVersion: monitoring.coreos.com/v1
46 kind: ServiceMonitor
47 metadata:
48   labels:
49     k8s-app: ovnkube-node
50   name: monitor-ovnkube-node
51   namespace: ovn-kubernetes
52 spec:
53   endpoints:
54   - interval: 30s
55     port: http-metrics
56     path: /metrics
57     scheme: http
58   jobLabel: k8s-app
59   namespaceSelector:
60     matchNames:
61     - ovn-kubernetes
62   selector:
63     matchLabels:
64       k8s-app: ovnkube-node
65 ---
66 apiVersion: v1
67 kind: Service
68 metadata:
69   labels:
70     k8s-app: ovnkube-node
71   name: ovn-kubernetes-node-prometheus-discovery
72   namespace: ovn-kubernetes
73 spec:
74   selector:
75     name: ovnkube-node
76   type: ClusterIP
77   clusterIP: None
78   publishNotReadyAddresses: true
79   ports:
80   - name: http-metrics
81     port: 9410
82     protocol: TCP
83     targetPort: 9410
84
85 ---
86 apiVersion: monitoring.coreos.com/v1
87 kind: ServiceMonitor
88 metadata:
89   labels:
90     k8s-app: ovnkube-db
91   name: monitor-ovnkube-db
92   namespace: ovn-kubernetes
93 spec:
94   endpoints:
95     - interval: 30s
96       port: http-metrics
97       path: /metrics
98       scheme: http
99   jobLabel: k8s-app
100   namespaceSelector:
101     matchNames:
102       - ovn-kubernetes
103   selector:
104     matchLabels:
105       k8s-app: ovnkube-db
106 ---
107 apiVersion: v1
108 kind: Service
109 metadata:
110   labels:
111     k8s-app: ovnkube-db
112   name: ovn-kubernetes-db-prometheus-discovery
113   namespace: ovn-kubernetes
114 spec:
115   selector:
116     name: ovnkube-db
117   type: ClusterIP
118   clusterIP: None
119   publishNotReadyAddresses: true
120   ports:
121     - name: http-metrics
122       port: 9476
123       protocol: TCP
124       targetPort: 9476