Skip to content
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

[Addon] pyroscope addon #361

Merged
merged 5 commits into from
Jun 6, 2022
Merged

[Addon] pyroscope addon #361

merged 5 commits into from
Jun 6, 2022

Conversation

fourierr
Copy link
Member

@fourierr fourierr commented Jun 3, 2022

Signed-off-by: Xiangbo Ma [email protected]

Description of your changes

pyroscope addon

How has this code been tested?

Checklist

I have:

  • Title of the PR starts with type (e.g. [Addon] or [Trait]).
  • Updated/Added any relevant [documentation] and [examples].
  • Unit/E2E Tests added.

Signed-off-by: fourierr <[email protected]>
@wonderflow
Copy link
Collaborator

Great work! Ping @wangyikewxgm

@oeular
Copy link
Member

oeular commented Jun 5, 2022

I think pyroscope is just as a trait to workload, so it should not be deployed on the helm, because helm controller is optional.
Here is the way I think it should be.

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: app-show
namespace: real-new-ns
spec:
components:
- name: web-show
type: webservice
properties:
exposeType: ClusterIP
image: beellzrocks/shippingservice
env:
- name: PORT
value: "50051"
- name: APPLICATION_NAME # Application name shown in the Pyroscope UI
value: "web-show"
- name: SERVER_ADDRESS # To change Pyroscope Server Port change the value, the naming rule is pyroscope-
value: "http://pyroscope-web-show:4040"
traits:
- type: pyroscope

@fourierr
Copy link
Member Author

fourierr commented Jun 5, 2022

Application name shown in the Pyroscope UI

  • The env is no question, what about pyroscope trait do?
  • Just only installing pyroscope in your cluster, every app can use it instead of declare a trait.
  • Yeas, when you want to deliver some param to pyroscope , you neet to use a trait. But this config param is for pyroscope sever otherwise pyroscope client. And the client is configured by env according to your description.
  • So i think trait for pyroscope is unnecessary. It's like that wo don't need declare an ocm trait, but we can use ocm when you enable it. ping @oeular

@oeular
Copy link
Member

oeular commented Jun 5, 2022

In vela, the capacity needed by workload(such as webservice, worker, task, cloneset) is more suitable as a trait.
For the all components of vela itself, pyroscope can be installed by helm as an applicaion

@oeular
Copy link
Member

oeular commented Jun 5, 2022

If pyroscope as a trait for workload, here I think it should be: #363 (comment)

@fourierr
Copy link
Member Author

fourierr commented Jun 5, 2022

我看了一下你的方式,如果按照这样把pyroscoep做成一个trait意味着每个组件都会创建一套完整pyroscope server包括deployemnt、serveice、pv/pvc,我觉得这个成本是不可接受的。
我们为什么不让多个应用共用一个pyroscope server呢?就像是prometheus,一个集群中只有一个prometheus server,而不是每个应用都有独自的prometheus server。
@oeular

@wangyikewxgm
Copy link
Collaborator

This pr doesn't contain the tratDefintion?

@fourierr
Copy link
Member Author

fourierr commented Jun 6, 2022

This pr doesn't contain the tratDefintion?

Yes, after discussion with @wonderflow , it is not need a tratDefintion.
It seems to like ocm, when you enable it in rhe cluster, any app can use the pyroscope via modify your code,

fourierr and others added 2 commits June 6, 2022 12:43
Signed-off-by: fourierr <[email protected]>
# Conflicts:
#	addons/pyroscope/metadata.yaml
#	addons/pyroscope/resources/pyroscope.cue
Signed-off-by: fourierr <[email protected]>
Signed-off-by: fourierr <[email protected]>
Copy link
Collaborator

@wangyikewxgm wangyikewxgm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great job.

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

Successfully merging this pull request may close these issues.

4 participants