Skip to content

Commit

Permalink
Merge branch 'main' into head-sampling-crd
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirdavid1 authored Aug 18, 2024
2 parents a73cd8a + a8a45e9 commit 4cd5e3d
Show file tree
Hide file tree
Showing 161 changed files with 2,527 additions and 3,064 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check links

on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:

jobs:
check-links:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: lycheeverse/[email protected]
with:
args: >-
-v -n "*.md" "**/*.md"
--exclude "http://localhost*"
fail: true
1 change: 1 addition & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- "multi-apps"
- "helm-chart"
- "fe-synthetic"
- "cli-upgrade"
include:
- kube-version: "1.23"
kind-image: "kindest/node:v1.23.17@sha256:14d0a9a892b943866d7e6be119a06871291c517d279aedb816a4b4bc0ec0a5b3"
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ changelog:
- "^docs:"
- "^test:"
brews:
- tap:
- repository:
owner: keyval-dev
name: homebrew-odigos-cli
token: "{{ .Env.HOMEBREW_GITHUB_API_TOKEN }}"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://github.com/odigos-io/odigos/actions/workflows/publish-cli.yml" target="_blank">
<img src="https://github.com/odigos-io/odigos/actions/workflows/publish-cli.yml/badge.svg" alt="Release Odigos CLI" style="margin-right: 10px; border: 1px solid #007acc; border-radius: 4px; padding: 5px;">
<a href="https://github.com/odigos-io/odigos/actions/workflows/release.yml" target="_blank">
<img src="https://github.com/odigos-io/odigos/actions/workflows/release.yml/badge.svg" alt="Release Odigos CLI" style="margin-right: 10px; border: 1px solid #007acc; border-radius: 4px; padding: 5px;">
</a>
<a href="https://goreportcard.com/report/github.com/odigos-io/odigos/cli" target="_blank">
<img src="https://goreportcard.com/badge/github.com/odigos-io/odigos/cli" alt="Go Report Card" style="margin-right: 10px; border: 1px solid #4CAF50; border-radius: 4px; padding: 5px;">
Expand Down
2 changes: 2 additions & 0 deletions api/actions/v1alpha1/addclusterinfo_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ type AddClusterInfoStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=addclusterinfos,scope=Namespaced,shortName=aci
//+kubebuilder:metadata:labels=metadata.labels.odigos.io/config=1
//+kubebuilder:metadata:labels=metadata.labels.odigos.io/system-object=true

// AddClusterInfo is the Schema for the addclusterinfo odigos action API
type AddClusterInfo struct {
Expand Down
2 changes: 2 additions & 0 deletions api/actions/v1alpha1/deleteattribute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ type DeleteAttributeStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=deleteattributes,scope=Namespaced,shortName=da
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// DeleteAttribute is the Schema for the DeleteAttribute odigos action API
type DeleteAttribute struct {
Expand Down
2 changes: 2 additions & 0 deletions api/actions/v1alpha1/errorsampler_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ type ErrorSamplerStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=errorsamplers,scope=Namespaced,shortName=es
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// ErrorSampler is the Schema for the ErrorSampler odigos action API
type ErrorSampler struct {
Expand Down
2 changes: 2 additions & 0 deletions api/actions/v1alpha1/latencysampler_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ type LatencySamplerStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=latencysamplers,scope=Namespaced,shortName=ls
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// LatencySampler is the Schema for the LatencySampler odigos action API
type LatencySampler struct {
Expand Down
2 changes: 2 additions & 0 deletions api/actions/v1alpha1/piimasking_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ type PiiMaskingStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=piimaskings,scope=Namespaced,shortName=red
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// PiiMasking is the Schema for the PiiMasking odigos action API
type PiiMasking struct {
Expand Down
2 changes: 2 additions & 0 deletions api/actions/v1alpha1/probabilisticsampler_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ type ProbabilisticSamplerStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=probabilisticsamplers,scope=Namespaced,shortName=ps
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// ProbabilisticSampler is the Schema for the ProbabilisticSampler odigos action API
type ProbabilisticSampler struct {
Expand Down
2 changes: 2 additions & 0 deletions api/actions/v1alpha1/renameattribute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ type RenameAttributeStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:path=renameattributes,scope=Namespaced
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// RenameAttribute is the Schema for the RenameAttribute odigos action API
type RenameAttribute struct {
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/actions.odigos.io_addclusterinfos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
metadata.labels.odigos.io/config: "1"
metadata.labels.odigos.io/system-object: "true"
name: addclusterinfos.actions.odigos.io
spec:
group: actions.odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/actions.odigos.io_deleteattributes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: deleteattributes.actions.odigos.io
spec:
group: actions.odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/actions.odigos.io_errorsamplers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: errorsamplers.actions.odigos.io
spec:
group: actions.odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/actions.odigos.io_latencysamplers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: latencysamplers.actions.odigos.io
spec:
group: actions.odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/actions.odigos.io_piimaskings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: piimaskings.actions.odigos.io
spec:
group: actions.odigos.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: probabilisticsamplers.actions.odigos.io
spec:
group: actions.odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/actions.odigos.io_renameattributes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: renameattributes.actions.odigos.io
spec:
group: actions.odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/odigos.io_collectorsgroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: collectorsgroups.odigos.io
spec:
group: odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/odigos.io_destinations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: destinations.odigos.io
spec:
group: odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/odigos.io_instrumentationinstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: instrumentationinstances.odigos.io
spec:
group: odigos.io
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/odigos.io_instrumentedapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: instrumentedapplications.odigos.io
spec:
group: odigos.io
Expand Down
16 changes: 14 additions & 2 deletions api/config/crd/bases/odigos.io_odigosconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: odigosconfigurations.odigos.io
spec:
group: odigos.io
Expand All @@ -17,7 +20,11 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OdigosConfiguration is the Schema for the odigos configuration
description: |-
OdigosConfiguration is the Schema for the odigos configuration
Deprecated: Use common.OdigosConfiguration instead
properties:
apiVersion:
description: |-
Expand All @@ -37,11 +44,16 @@ spec:
metadata:
type: object
spec:
description: OdigosConfigurationSpec defines the desired state of OdigosConfiguration
description: |-
OdigosConfigurationSpec defines the desired state of OdigosConfiguration
Deprecated: Use common.OdigosConfiguration instead
properties:
autoscalerImage:
type: string
collectorGateway:
description: 'Deprecated: Use common.OdigosConfiguration instead'
properties:
goMemLimitMiB:
description: |-
Expand Down
3 changes: 3 additions & 0 deletions api/config/crd/bases/odigos.io_processors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
odigos.io/config: "1"
odigos.io/system-object: "true"
name: processors.odigos.io
spec:
group: odigos.io
Expand Down
2 changes: 2 additions & 0 deletions api/odigos/v1alpha1/collectorsgroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ type CollectorsGroupStatus struct {
//+genclient
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// CollectorsGroup is the Schema for the collectors API
type CollectorsGroup struct {
Expand Down
2 changes: 2 additions & 0 deletions api/odigos/v1alpha1/destination_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ type DestinationStatus struct {
//+genclient
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// Destination is the Schema for the destinations API
type Destination struct {
Expand Down
2 changes: 2 additions & 0 deletions api/odigos/v1alpha1/instrumentationinstance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ type InstrumentationInstanceStatus struct {
//+genclient
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// InstrumentationInstance is the Schema for the InstrumentationInstances API
type InstrumentationInstance struct {
Expand Down
2 changes: 2 additions & 0 deletions api/odigos/v1alpha1/instrumentedapplication_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ type InstrumentedApplicationStatus struct {
//+genclient
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// InstrumentedApplication is the Schema for the instrumentedapplications API
type InstrumentedApplication struct {
Expand Down
35 changes: 35 additions & 0 deletions api/odigos/v1alpha1/odigosconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Deprecated: Use common.OdigosConfiguration instead
type CollectorGatewayConfiguration struct {
// RequestMemoryMiB is the memory request for the cluster gateway collector deployment.
// it will be embedded in the deployment as a resource request of the form "memory: <value>Mi"
Expand All @@ -30,6 +31,8 @@ type CollectorGatewayConfiguration struct {
}

// OdigosConfigurationSpec defines the desired state of OdigosConfiguration
//
// Deprecated: Use common.OdigosConfiguration instead
type OdigosConfigurationSpec struct {
OdigosVersion string `json:"odigosVersion"`
ConfigVersion int `json:"configVersion"`
Expand All @@ -53,8 +56,12 @@ type OdigosConfigurationSpec struct {

//+genclient
//+kubebuilder:object:root=true
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// OdigosConfiguration is the Schema for the odigos configuration
//
// Deprecated: Use common.OdigosConfiguration instead
type OdigosConfiguration struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -74,3 +81,31 @@ type OdigosConfigurationList struct {
func init() {
SchemeBuilder.Register(&OdigosConfiguration{}, &OdigosConfigurationList{})
}

func (odigosConfig *OdigosConfiguration) ToCommonConfig() *common.OdigosConfiguration {
var collectorGateway common.CollectorGatewayConfiguration
if odigosConfig.Spec.CollectorGateway != nil {
collectorGateway = common.CollectorGatewayConfiguration{
RequestMemoryMiB: odigosConfig.Spec.CollectorGateway.RequestMemoryMiB,
MemoryLimiterLimitMiB: odigosConfig.Spec.CollectorGateway.MemoryLimiterLimitMiB,
MemoryLimiterSpikeLimitMiB: odigosConfig.Spec.CollectorGateway.MemoryLimiterSpikeLimitMiB,
GoMemLimitMib: odigosConfig.Spec.CollectorGateway.GoMemLimitMib,
}
}
return &common.OdigosConfiguration{
OdigosVersion: odigosConfig.Spec.OdigosVersion,
ConfigVersion: odigosConfig.Spec.ConfigVersion,
TelemetryEnabled: odigosConfig.Spec.TelemetryEnabled,
OpenshiftEnabled: odigosConfig.Spec.OpenshiftEnabled,
IgnoredNamespaces: odigosConfig.Spec.IgnoredNamespaces,
IgnoredContainers: odigosConfig.Spec.IgnoredContainers,
Psp: odigosConfig.Spec.Psp,
ImagePrefix: odigosConfig.Spec.ImagePrefix,
OdigletImage: odigosConfig.Spec.OdigletImage,
InstrumentorImage: odigosConfig.Spec.InstrumentorImage,
AutoscalerImage: odigosConfig.Spec.AutoscalerImage,
DefaultSDKs: odigosConfig.Spec.DefaultSDKs,
CollectorGateway: &collectorGateway,
GoAutoIncludeCodeAttributes: odigosConfig.Spec.GoAutoIncludeCodeAttributes,
}
}
2 changes: 2 additions & 0 deletions api/odigos/v1alpha1/processor_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ type ProcessorStatus struct {
//+genclient
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:metadata:labels=odigos.io/config=1
//+kubebuilder:metadata:labels=odigos.io/system-object=true

// Processor is the Schema for an Opentelemetry Collector Processor that is added to Odigos pipeline
type Processor struct {
Expand Down
4 changes: 2 additions & 2 deletions autoscaler/controllers/datacollection/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func NewMockInstrumentedApplication(workloadObject client.Object) *odigosv1.Inst
gvk, _ := apiutil.GVKForObject(workloadObject, scheme.Scheme)
return &odigosv1.InstrumentedApplication{
ObjectMeta: metav1.ObjectMeta{
Name: workload.GetRuntimeObjectName(workloadObject.GetName(), gvk.Kind),
Name: workload.CalculateWorkloadRuntimeObjectName(workloadObject.GetName(), gvk.Kind),
Namespace: workloadObject.GetNamespace(),
OwnerReferences: []metav1.OwnerReference{
{
Expand All @@ -83,7 +83,7 @@ func NewMockInstrumentedApplicationWoOwner(workloadObject client.Object) *odigos
gvk, _ := apiutil.GVKForObject(workloadObject, scheme.Scheme)
return &odigosv1.InstrumentedApplication{
ObjectMeta: metav1.ObjectMeta{
Name: workload.GetRuntimeObjectName(workloadObject.GetName(), gvk.Kind),
Name: workload.CalculateWorkloadRuntimeObjectName(workloadObject.GetName(), gvk.Kind),
Namespace: workloadObject.GetNamespace(),
},
}
Expand Down
Loading

0 comments on commit 4cd5e3d

Please sign in to comment.