-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: add method field to exporter spec #287
Feat: add method field to exporter spec #287
Conversation
…ose corresponding image Signed-off-by: Bastien Grasnick <bastien.grasnick@deutschebahn.com>
Signed-off-by: Bastien Grasnick <bastien.grasnick@deutschebahn.com>
Signed-off-by: Bastien Grasnick <bastien.grasnick@deutschebahn.com>
@BGrasnick , thank you for the PR. @vimalk78 is already working on enabling something similar but using an (undocumented) annotation since we know this (hack) is going to be short lived. |
Ah ok nevermind then! I wasn't sure if bcc will be deprecated or still be used in the future and thought it might be helpful also in the future because of your answer in #195. |
@BGrasnick , it's good to validate our assumptions :) @marceloamaral @rootfs, Could you please confirm if We (@vimalk78 ) are currently working on a solution to allow this through a hack. We intent to add the ability to honour an annotation instead of a field in the spec, so that we don't have to delete the field later on when bcc won't be used anymore - which is causes API breakage. But, this is all made under the assumption that there will only be |
@sthaha yeah definitely sounds good to check again what is planned for the future. My team and organization want to deploy kepler to our cloud/VM-based OpenShift clusters ASAP because we love the integrated dashboards and how easy use to use the operator is. We want to make this available for all teams on our clusters but cannot do it right now because we need to use libbpf instead of bcc. And there is neither a release date for kepler 0.7.0 when libbpf will become default nor a preview for it as far as I know. Do you know of any other way how we could use the libbpf version of kepler with the operator right now? |
@BGrasnick , do note there always exists the possibility of creating your own bundle with any kepler image and use operator-sdk to deploy the bundle. E.g. here is how I create my bundle that uses kepler libbpf bundle that gets pushed to quay as - quay.io/sthaha/kepler-operator-bundle:0.0.0-dev
There exists a HACK as well (but use it as your own risk)
for x in $(kubectl get pods -n openshift-kepler-operator -l app.kubernetes.io/component=exporter -l app.kubernetes.io/managed-by=kepler-operator -o name); do
oc set image -n openshift-kepler-operator $x kepler-exporter=quay.io/sustainable_computing_io/kepler:release-0.6.1-libbpf ;
done We have observed that daemonset controllers do not revert back the image. |
We might have only Are there any use cases that I might not be aware of that require |
@marceloamaral , thank you for taking time to answer.
Not that I am aware of but definitely there are more use-cases for
@BGrasnick, I agree with Marcelo's comment. Since this issue is short lived, the hack @vimalk78 is working on should suffice. |
@marceloamaral thanks for your answer! @sthaha yeah of course that makes sense! If kepler doesn't need/support bcc in the future then there is no meaning in implementing this functionality of method choosing. However, as you outlined it would be great to fast track a release of kepler and kepler-operator with libbpf. I don't know if other people already use kepler on OpenShift + AWS with bcc but for us it does not work... |
@BGrasnick I have started a discussion about switching to libbpf - sustainable-computing-io/kepler#1027 |
@sthaha That's a great idea! Alternatively, if it does not match up with the release plan for kepler, how about releasing a new kepler-operator 0.10.0 or 0.9.1 where we use release-0.6.1-libbpf of kepler? |
I am happy with that proposal if we can validate in kepler CI that both images produce the same / comparable values for all metrics. |
@BGrasnick , I am closing this in favour of #293 |
Addresses #195.
Adds a new enum to kepler exporter spec that allows choosing which method/image to use: bcc or libbpf.
Needs to be changed once kepler 0.7.0 is released and default will be libbpf.
Testing was a little challenging and I am not super happy with the solution and open for suggestions.
As of now, the RELATED_IMAGE_KEPLER var gets set for Config.Image and determines the image used.
This is done in main.go lines 78 & 79. As this was needed for the test, I added lines 111-113 in exporter.go to set a default in case Config.Image is empty.
However, because of this and the test, now the image & its version is hardcoded in 3 different locations which is not good.
I am open to any help here :)
Was tested manually on an OpenShift 4.11 cluster.
@sthaha: any thoughts?