Closed drnic closed 4 years ago
Currently it is possible to disable the filter at all, so it would be called also for all pods in the eirini namespace, but I am completely in favor of this. Maybe an option to the manager to be consistent and avoid the interface to request a specific handle?
Are you suggesting we more liberally call Handle
(e.g. all pods in namespace, or perhaps all pods with either source_type=STG
or source_type=APP
) and leave it to the Handle() to decide if they care about this pod and/or any of its containers? If so, sounds good.
Are you suggesting we more liberally call
Handle
(e.g. all pods in namespace, or perhaps all pods with eithersource_type=STG
orsource_type=APP
) and leave it to the Handle() to decide if they care about this pod and/or any of its containers? If so, sounds good.
Yes! This is already possible, https://godoc.org/github.com/SUSE/eirinix#ManagerOptions
// FilterEiriniApps enables or disables Eirini apps filters. Optional, defaults to true
FilterEiriniApps *bool
See for example the loggregator bridge: https://github.com/SUSE/eirini-loggregator-bridge/blob/master/cmd/root.go#L31 - https://github.com/SUSE/eirini-loggregator-bridge/blob/master/cmd/root.go#L37 , which gets the log for both staging pods and standard apps
Bonus question: why FilterEiriniApps *bool
instead of FilterEiriniApps bool
?
Bonus question: why
FilterEiriniApps *bool
instead ofFilterEiriniApps bool
?
By default FilterEiriniApps is set to true only if nothing was explicitly set. In that way we know if something was really being passed or not
Staging pods have label
source_type=STG
.Thoughts on how we support EiriniX extn to handle these containers too?
Currently we have a single
Handle
hook for onlysource_type=APP
. Perhaps we rename it toHandlePodApp
(and support deprecatedHandle
that callsHandlePodApp
)Then we add a new
HandlePodStaging
forsource_type=STG
?/cc @mudler