You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Config Generation when Pod has no IP Address (#6)
When a Pod was already created, but doesn't had an IP address assigned
yet, the configuration only contained the port number instead of the
full address of the Pod. We are no checking that the Pod has an IP
address assigned and if this is not the case we skip the Pod.
We also improved the update logic of the generated secret with the Parca
configuration. Therefor we are checking the the list of Pod IPs is not
empty and not equal to the list of Pod IPs saved in the status field of
the ParcaScrapeConfig CR. Only when the Pod IPs are not equal to the
saved list of Pod IPs we will update the configuration. For all other
cases we skip the update.
// If the SetScrapeConfig function returns nil, we don't need to update the Parca configuration secret, because no
146
+
// Pods with an IP where found or the Pods where not changed since the last reconciliation loop.
147
+
ifpodIPs==nil {
148
+
reqLogger.Info("ParcaScrapeConfig must not be updated.")
149
+
r.updateConditions(ctx, parcaScrapeConfig, parcaScrapeConfigUpdated, "Parca Configuration must not be updated", metav1.ConditionTrue, parcaScrapeConfig.Status.PodIPs)
0 commit comments