Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Proposal: support source_type=STG too #12

Closed
drnic opened this issue Oct 18, 2019 · 5 comments
Closed

Proposal: support source_type=STG too #12

drnic opened this issue Oct 18, 2019 · 5 comments

Comments

@drnic
Copy link
Contributor

drnic commented Oct 18, 2019

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 only source_type=APP. Perhaps we rename it to HandlePodApp (and support deprecated Handle that calls HandlePodApp)

Then we add a new HandlePodStaging for source_type=STG?

/cc @mudler

@mudler
Copy link
Member

mudler commented Oct 19, 2019

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?

@drnic
Copy link
Contributor Author

drnic commented Oct 20, 2019

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.

@mudler
Copy link
Member

mudler commented Oct 22, 2019

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.

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

@drnic
Copy link
Contributor Author

drnic commented Oct 22, 2019

Bonus question: why FilterEiriniApps *bool instead of FilterEiriniApps bool?

@mudler
Copy link
Member

mudler commented Oct 23, 2019

Bonus question: why FilterEiriniApps *bool instead of FilterEiriniApps 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants