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