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

add instrumentation instance #69

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 164 additions & 0 deletions charts/odigos/templates/crds/instrumentationinstances.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: instrumentationinstances.odigos.io
spec:
group: odigos.io
names:
kind: InstrumentationInstance
listKind: InstrumentationInstanceList
plural: instrumentationinstances
singular: instrumentationinstance
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: InstrumentationInstance is the Schema for the InstrumentationInstances
API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
type: object
status:
description: |-
InstrumentationInstanceStatus defines the observed state of InstrumentationInstance
If the instrumentation is not active, this CR should be deleted
properties:
components:
items:
description: |-
InstrumentationLibraryStatus defines the observed state of an InstrumentationLibrary.
if a library is not active/disable, it should not be included in the status
properties:
healthy:
type: boolean
identifyingAttributes:
description: |-
Attributes that identify the component.
The combination of (Name, Type, IdentifyingAttributes) must be unique.
items:
description: Attribute is a key-value pair that describes
a component or instrumentation
properties:
key:
minLength: 1
type: string
value:
type: string
required:
- key
- value
type: object
type: array
lastStatusTime:
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the component health.
can be omitted if healthy is true
maxLength: 32768
type: string
name:
description: for example ("net/http", "@opentelemetry/instrumentation-redis")
minLength: 1
type: string
nonIdentifyingAttributes:
description: |-
Attributes that do not necessarily identify the component but help describe
its characteristics.
items:
description: Attribute is a key-value pair that describes
a component or instrumentation
properties:
key:
minLength: 1
type: string
value:
type: string
required:
- key
- value
type: object
type: array
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the SDK status.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
type: string
type:
enum:
- instrumentation
- sampler
- exporter
type: string
required:
- lastStatusTime
- name
- type
type: object
type: array
healthy:
type: boolean
lastStatusTime:
format: date-time
type: string
message:
description: |-
message is a human readable message indicating details about the SDK general health.
can be omitted if healthy is true
maxLength: 32768
type: string
nonIdentifyingAttributes:
description: |-
Attributes that do not necessarily identify the SDK but help describe
its characteristics.
items:
description: Attribute is a key-value pair that describes a component
or instrumentation
properties:
key:
minLength: 1
type: string
value:
type: string
required:
- key
- value
type: object
type: array
reason:
description: |-
reason contains a programmatic identifier indicating the reason for the component status.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
type: string
required:
- lastStatusTime
type: object
type: object
served: true
storage: true
subresources:
status: {}
19 changes: 19 additions & 0 deletions charts/odigos/templates/odiglet/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,25 @@ rules:
- get
- patch
- update
- apiGroups:
- odigos.io
resources:
- instrumentationinstances
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- odigos.io
resources:
- instrumentationinstances/status
verbs:
- get
- patch
- update
{{ if .Values.psp.enabled }}
- apiGroups:
- policy
Expand Down