@@ -32,8 +32,6 @@ const (
3232 MetricsPortName = "metrics"
3333 metricsVolumeName = "metrics"
3434 metricsVolumePath = "/etc/collector/metrics"
35- HealthPortName = "health"
36- HealthPort = int32 (24686 )
3735 saTokenVolumeName = "sa-token"
3836 saTokenExpirationSecs = 3600 //1 hour
3937 sourcePodsName = "varlogpods"
@@ -202,11 +200,6 @@ func (f *Factory) NewCollectorContainer(inputs internalobs.Inputs, outputs inter
202200 ContainerPort : MetricsPort ,
203201 Protocol : v1 .ProtocolTCP ,
204202 },
205- {
206- Name : HealthPortName ,
207- ContainerPort : HealthPort ,
208- Protocol : v1 .ProtocolTCP ,
209- },
210203 }
211204 collector .Env = []v1.EnvVar {
212205 {Name : "COLLECTOR_CONF_HASH" , Value : f .ConfigHash },
@@ -247,8 +240,6 @@ func (f *Factory) NewCollectorContainer(inputs internalobs.Inputs, outputs inter
247240 AddSecurityContextTo (collector )
248241 }
249242
250- AddLivenessProbe (collector )
251-
252243 AddVolumeMounts (collector , secretVolumes , common .SecretBasePath )
253244 AddVolumeMounts (collector , configmapVolumes , func (name string ) string {
254245 return common .ConfigMapBasePath (strings .TrimPrefix (name , "config-" ))
@@ -264,23 +255,6 @@ func (f *Factory) NewCollectorContainer(inputs internalobs.Inputs, outputs inter
264255 return collector
265256}
266257
267- // AddLivenessProbe to collector container
268- func AddLivenessProbe (collector * v1.Container ) {
269- livenessProbe := & v1.Probe {
270- ProbeHandler : v1.ProbeHandler {
271- HTTPGet : & v1.HTTPGetAction {
272- Path : "/health" ,
273- Port : intstr .FromInt32 (HealthPort ),
274- Scheme : v1 .URISchemeHTTP ,
275- },
276- },
277- InitialDelaySeconds : 10 ,
278- FailureThreshold : 5 ,
279- }
280-
281- collector .LivenessProbe = livenessProbe
282- }
283-
284258func sanitizeVolumeName (input string ) string {
285259 return strings .ReplaceAll (input , "." , "" )
286260}
0 commit comments