@@ -94,6 +94,37 @@ func newHealthAnalyzerService(namespace string) *corev1.Service {
94
94
return service
95
95
}
96
96
97
+ func newHealthAnalyzerServiceMCP (namespace string ) * corev1.Service {
98
+ service := & corev1.Service {
99
+ TypeMeta : metav1.TypeMeta {
100
+ APIVersion : corev1 .SchemeGroupVersion .String (),
101
+ Kind : "Service" ,
102
+ },
103
+ ObjectMeta : metav1.ObjectMeta {
104
+ Name : name + "-mcp" ,
105
+ Namespace : namespace ,
106
+ Annotations : map [string ]string {
107
+ "service.beta.openshift.io/serving-cert-secret-name" : volumeMountName ,
108
+ },
109
+ Labels : componentLabels (name ),
110
+ },
111
+ Spec : corev1.ServiceSpec {
112
+ Ports : []corev1.ServicePort {
113
+ {
114
+ Name : "mcp" ,
115
+ Port : 8085 ,
116
+ TargetPort : intstr .FromString ("mcp" ),
117
+ },
118
+ },
119
+ Selector : map [string ]string {
120
+ "app.kubernetes.io/instance" : name ,
121
+ },
122
+ },
123
+ }
124
+
125
+ return service
126
+ }
127
+
97
128
func newHealthAnalyzerDeployment (namespace string , serviceAccountName string , pluginInfo UIPluginInfo ) * appsv1.Deployment {
98
129
deploy := & appsv1.Deployment {
99
130
TypeMeta : metav1.TypeMeta {
@@ -125,6 +156,7 @@ func newHealthAnalyzerDeployment(namespace string, serviceAccountName string, pl
125
156
Image : pluginInfo .HealthAnalyzerImage ,
126
157
ImagePullPolicy : corev1 .PullAlways ,
127
158
Args : []string {
159
+ "serve" ,
128
160
"--tls-cert-file=/etc/tls/private/tls.crt" ,
129
161
"--tls-private-key-file=/etc/tls/private/tls.key" ,
130
162
},
@@ -159,6 +191,37 @@ func newHealthAnalyzerDeployment(namespace string, serviceAccountName string, pl
159
191
},
160
192
},
161
193
},
194
+ {
195
+ Name : name + "mcp" ,
196
+ Image : pluginInfo .HealthAnalyzerImage ,
197
+ ImagePullPolicy : corev1 .PullAlways ,
198
+ Args : []string {
199
+ "mcp" ,
200
+ },
201
+ Env : []corev1.EnvVar {
202
+ {
203
+ Name : "PROM_URL" ,
204
+ Value : "https://thanos-querier.openshift-monitoring.svc.cluster.local:9091/" ,
205
+ },
206
+ },
207
+ SecurityContext : & corev1.SecurityContext {
208
+ RunAsNonRoot : ptr .To (true ),
209
+ AllowPrivilegeEscalation : ptr .To (false ),
210
+ Capabilities : & corev1.Capabilities {
211
+ Drop : []corev1.Capability {"ALL" },
212
+ },
213
+ SeccompProfile : & corev1.SeccompProfile {
214
+ Type : corev1 .SeccompProfileTypeRuntimeDefault ,
215
+ },
216
+ },
217
+ Ports : []corev1.ContainerPort {
218
+ {
219
+ ContainerPort : 8085 ,
220
+ Name : "mcp" ,
221
+ },
222
+ },
223
+ TerminationMessagePolicy : corev1 .TerminationMessageFallbackToLogsOnError ,
224
+ },
162
225
},
163
226
Volumes : []corev1.Volume {
164
227
{
0 commit comments