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 opentelemetry-operator #668

Merged
merged 39 commits into from
May 19, 2023
Merged

Addon opentelemetry-operator #668

merged 39 commits into from
May 19, 2023

Conversation

MdSahil-oss
Copy link
Member

@MdSahil-oss MdSahil-oss commented Apr 9, 2023

Description of your changes

Adds a new Addon opentelemetry-operator

Fixes #5774

How has this code been tested?

Checklist

I have:

  • Title of the PR starts with type (e.g. [Addon] , [example] or [Doc]).
  • Updated/Added any relevant documentation and examples.
  • New addon should be put in experimental.
  • Update addon should modify the version in metadata.yaml to generate a new version.

Verified Addon promotion rules

If this pr wants to promote an experimental addon to verified, you must check whether meet these conditions too:

  • This addon must be tested by addon's e2e-test to guarantee this addon can be enabled successfully.
  • This addon must have some basic but necessary information.
    • An accessible icon url and source url defined in addon's metadata.yaml.
    • A detail introduction include a basic example about how to use and what's the benefit of this addon in README.md.
    • Also provide an introduction in KubeVela documentation.
    • It's more likely to be accepted if useful examples provided in example dir.

Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
@MdSahil-oss MdSahil-oss changed the title WIP: Addon opentelemetry-operator Addon opentelemetry-operator Apr 14, 2023
@MdSahil-oss
Copy link
Member Author

@wonderflow @wangyikewxgm This addon is done, Please review it :)

Copy link
Collaborator

@wonderflow wonderflow left a comment

Choose a reason for hiding this comment

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

Actually this is not what this addon expected.

Assuming I'm an app developer which focus on Java. Then I'll deploy application in Java like this:

kind: Application
spec:
   components:
   - type: webservice
      properties:
          image: my-java-image

Then I want to use opentelementry addon for some data collection staff, what will I use it?

I will like to use it like:

kind: Application
spec:
   components:
   - type: webservice
      properties:
          image: my-java-image
      traits:
      - type: java-collector
         properties:
           <only-minimal-necessary-parameters-needed-here>           

After this, I hope to see the grafana dashboard working!

Don't provide all these complexity, if so, why don't the developers use the CRD operator directly?

@MdSahil-oss
Copy link
Member Author

Thanks for review @wonderflow, Okay! I'll simplify this addon so that users can use it easily :)

@MdSahil-oss
Copy link
Member Author

@wonderflow How about below structure:

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: otel-pod-sample-1
spec:
  components:
    - type: "k8s-objects"
      name: "otel-pod-1"
      properties:
        objects:
          - apiVersion: v1
            kind: Pod
            metadata:
              name: myapp-1
              annotations:
                sidecar.opentelemetry.io/inject: "true"
            spec:
              containers:
                - name: myapp
                  image: jaegertracing/vertx-create-span:operator-e2e-tests
                  ports:
                    - containerPort: 8080
                      protocol: TCP
      traits:
        - type: opentelemetry-collector
          name: otel-container
          properties:
            mode: sidecar
            config: |
              receivers:
                jaeger:
                  protocols:
                    thrift_compact:
              processors:

              exporters:
                logging:

              service:
                pipelines:
                  traces:
                    receivers: [jaeger]
                    processors: []
                    exporters: [logging]

Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
@wonderflow
Copy link
Collaborator

Yes, this becomes better.

Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
@MdSahil-oss
Copy link
Member Author

@wonderflow Please review it again, I've added component definitions as traits & Updated the Readme.

Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
Signed-off-by: MdSahil-oss <Mohdssahil1@gmail.com>
@wangyikewxgm wangyikewxgm merged commit 7cc4836 into kubevela:master May 19, 2023
3 checks passed
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.

[Feature] make an openTelemetry operator addon
3 participants