Skip to content

Commit

Permalink
Merge branch 'main' into align-with-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
edeNFed authored Jul 21, 2024
2 parents 765f356 + 505eee2 commit d6be9c9
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 28 deletions.
4 changes: 2 additions & 2 deletions charts/odigos/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v2
name: odigos
description: Odigos Helm Chart for Kubernetes
type: application
version: 0.3.33
appVersion: "v1.0.77"
version: 0.3.36
appVersion: "v1.0.82"
icon: https://d2q89wckrml3k4.cloudfront.net/logo.png
1 change: 1 addition & 0 deletions charts/odigos/templates/cleanup/cleanup-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
backoffLimit: 0
template:
spec:
serviceAccountName: cleanup-sa
containers:
- name: cleanup
{{- if .Values.imagePrefix }}
Expand Down
4 changes: 2 additions & 2 deletions charts/odigos/templates/cleanup/cleanup-rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
name: cleanup-clusterrolebinding
subjects:
- kind: ServiceAccount
name: default
namespace: odigos-system
name: cleanup-sa
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: cleanup-clusterrole
Expand Down
5 changes: 5 additions & 0 deletions charts/odigos/templates/cleanup/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: cleanup-sa
namespace: {{ .Release.Namespace }}
137 changes: 121 additions & 16 deletions charts/odigos/templates/crds/instrumentationconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: instrumentationconfigs.odigos.io
spec:
group: odigos.io
Expand All @@ -12,52 +14,155 @@ spec:
scope: Namespaced
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
description: InstrumentationConfig is the Schema for the instrumentationconfig API
description: InstrumentationConfig is the Schema for the instrumentationconfig
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
description: Config for the OpenTelemetry SDKs that should be applied to a workload. The workload is identified by the owner reference
description: |-
Config for the OpenTelemeetry SDKs that should be applied to a workload.
The workload is identified by the owner reference
properties:
config:
type: array
description: |-
config for this workload.
the config is a list to allow for multiple config options and values to be applied.
the list is processed in order, and the first matching config is applied.
items:
type: object
description: |-
WorkloadInstrumentationConfig defined a single config option to apply
on a workload, along with it's value, filters and instrumentation libraries
properties:
instrumentationLibraries:
type: array
description: |-
a list of instrumentation libraries to apply this setting to
if a library is not in this list, the setting should not apply to it
and should be cleared.
items:
type: object
description: InstrumentationLibrary represents a library for
instrumentation
properties:
instrumentationLibraryName:
description: InstrumentationLibraryName is the name of
the instrumentation library
type: string
language:
description: Language is the programming language of the
library
enum:
- java
- python
- go
- dotnet
- javascript
- mysql
- unknown
- ignored
type: string
required:
- instrumentationLibraryName
- language
type: object
type: array
optionKey:
description: |-
OptionKey is the name of the option
This value is transparent to the CRD and is passed as-is to the SDK.
type: string
optionValueBoolean:
description: OptionValueBoolean is the boolean value of the
option if it is a boolean
type: boolean
spanKind:
type: string
description: |-
This option allow to specify the config option for a specific span kind
for example, only to client spans or only to server spans.
it the span kind is not specified, the option will apply to all spans.
enum:
- client
- server
- producer
- consumer
- internal
optionValueBoolean:
type: boolean
required:
- config
status:
type: string
required:
- instrumentationLibraries
- optionKey
type: object
type: array
runtimeDetailsInvalidated:
description: true when the runtime details are invalidated and should
be recalculated
type: boolean
sdkConfigs:
description: |-
Configuration for the OpenTelemetry SDKs that this workload should use.
The SDKs are identified by the programming language they are written in.
TODO: consider adding more granular control over the SDKs, such as community/enterprise, native/ebpf.
items:
properties:
instrumentationLibraryConfigs:
description: configurations for the instrumentation libraries
the the SDK should use
items:
properties:
instrumentationLibraryName:
description: |-
The name of the instrumentation library
- Node.js: The name of the npm package: `@opentelemetry/instrumentation-<name>`
type: string
traceConfig:
properties:
enabled:
description: |-
Whether the instrumentation library is enabled to record traces.
When false, it is expected that the instrumentation library does not produce any spans regardless of any other configuration.
When true, the instrumentation library should produce spans according to the other configuration options.
If not specified, the default value for this signal should be used (whether to enable libraries by default or not).
type: boolean
type: object
required:
- instrumentationLibraryName
type: object
type: array
language:
description: The language of the SDK being configured
enum:
- java
- python
- go
- dotnet
- javascript
- mysql
- unknown
- ignored
type: string
required:
- instrumentationLibraryConfigs
- language
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
12 changes: 12 additions & 0 deletions charts/odigos/templates/instrumentor/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,15 @@ rules:
- get
- patch
- update
- apiGroups:
- odigos.io
resources:
- instrumentationconfigs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
9 changes: 9 additions & 0 deletions charts/odigos/templates/odiglet/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,20 @@ rules:
resources:
- collectorsgroups
- destinations
verbs:
- get
- list
- watch
- apiGroups:
- odigos.io
resources:
- instrumentationconfigs
verbs:
- get
- list
- watch
- patch
- update
- apiGroups:
- odigos.io
resources:
Expand Down
42 changes: 35 additions & 7 deletions charts/odigos/templates/odiglet/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,29 @@ spec:
labels:
app.kubernetes.io/name: odiglet
spec:
initContainers:
- name: init
{{- if .Values.imagePrefix }}
{{- if .Values.onPremToken }}
image: "{{ .Values.imagePrefix }}/{{ .Values.odiglet.image.enterpriseRepository }}:{{ .Values.image.tag }}"
{{- else }}
image: "{{ .Values.imagePrefix }}/{{ .Values.odiglet.image.repository }}:{{ .Values.image.tag }}"
{{- end }}
{{- else }}
{{- if .Values.onPremToken }}
image: "{{ .Values.odiglet.image.enterpriseRepository }}:{{ .Values.image.tag }}"
{{- else }}
image: "{{ .Values.odiglet.image.repository }}:{{ .Values.image.tag }}"
{{- end }}
{{- end }}
imagePullPolicy: IfNotPresent
command:
- /root/odiglet
args:
- init
volumeMounts:
- name: odigos
mountPath: /var/odigos
containers:
- name: odiglet
{{- if .Values.imagePrefix }}
Expand Down Expand Up @@ -60,6 +83,7 @@ spec:
- configMapRef:
name: odigos-own-telemetry-otel-config
optional: true
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
capabilities:
Expand All @@ -68,7 +92,6 @@ spec:
volumeMounts:
- name: run-dir
mountPath: /run
mountPropagation: Bidirectional
{{ if .Values.openshift.enabled }}
- name: host
mountPath: /host
Expand All @@ -77,12 +100,14 @@ spec:
mountPath: /host/etc/selinux
mountPropagation: Bidirectional
{{ end }}
- name: var-dir
mountPath: /var
mountPropagation: Bidirectional
- name: device-plugins-dir
mountPath: /var/lib/kubelet/device-plugins
- name: pod-resources
mountPath: /var/lib/kubelet/pod-resources
readOnly: true
- name: odigos
mountPath: /var/odigos
mountPropagation: Bidirectional
readOnly: true
- name: kernel-debug
mountPath: /sys/kernel/debug
hostNetwork: true
Expand All @@ -101,9 +126,12 @@ spec:
hostPath:
path: /etc/selinux
{{- end }}
- name: var-dir
- name: pod-resources
hostPath:
path: /var/lib/kubelet/pod-resources
- name: device-plugins-dir
hostPath:
path: /var
path: /var/lib/kubelet/device-plugins
- name: odigos
hostPath:
path: /var/odigos
Expand Down
2 changes: 1 addition & 1 deletion charts/odigos/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image:
tag: "v1.0.77"
tag: "v1.0.82"
imagePullSecrets: []

# namespaces not to show in odigos ui
Expand Down

0 comments on commit d6be9c9

Please sign in to comment.