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

feat: polish last bits after OdigosConfig CR removal #1447

Merged
merged 6 commits into from
Aug 18, 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
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
3 changes: 3 additions & 0 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 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
2 changes: 2 additions & 0 deletions api/odigos/v1alpha1/odigosconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ 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
//
Expand Down
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
2 changes: 1 addition & 1 deletion autoscaler/controllers/gateway/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func Sync(ctx context.Context, k8sClient client.Client, scheme *runtime.Scheme,
// Add the generic batch processor to the list of processors
processors.Items = append(processors.Items, commonconf.GetGenericBatchProcessor())

odigosConfig, err := utils.GetCurrentConfig(ctx, k8sClient)
odigosConfig, err := utils.GetCurrentOdigosConfig(ctx, k8sClient)
if err != nil {
logger.Error(err, "failed to get odigos config")
return err
Expand Down
2 changes: 1 addition & 1 deletion cli/pkg/autodetect/kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var CurrentKubernetesVersion KubernetesVersion
const (
KindUnknown Kind = "Unknown"
KindMinikube Kind = "Minikube"
KindKind Kind = "KinD"
blumamir marked this conversation as resolved.
Show resolved Hide resolved
KindKind Kind = "Kind"
KindEKS Kind = "EKS"
KindGKE Kind = "GKE"
KindAKS Kind = "AKS"
Expand Down
9 changes: 9 additions & 0 deletions cli/pkg/kube/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ func newCoreV1ConfigMaps() schema.GroupVersionResource {
}
}

func deprecatedOdigosConfigs() schema.GroupVersionResource {
return schema.GroupVersionResource{
Group: "odigos.io",
Version: "v1alpha1",
Resource: "odigosconfigurations",
}
}

func newCoreV1Services() schema.GroupVersionResource {
return schema.GroupVersionResource{
Group: "", // core group is represented by an empty string
Expand Down Expand Up @@ -92,6 +100,7 @@ func GetManagedResources(odigosNamespace string) []ResourceAndNs {
{Resource: newApiExtensionsV1CustomResourceDefinition(), Namespace: ""},
{Resource: newAppsV1Deployments(), Namespace: odigosNamespace},
{Resource: newAppsV1DaemonSet(), Namespace: odigosNamespace},
{Resource: deprecatedOdigosConfigs(), Namespace: odigosNamespace},
{Resource: newCoreV1ConfigMaps(), Namespace: odigosNamespace},
{Resource: newCoreV1Services(), Namespace: odigosNamespace},
{Resource: newCoreV1Secrets(), Namespace: odigosNamespace},
Expand Down
1 change: 1 addition & 0 deletions helm/odigos/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
.idea/
*.tmproj
.vscode/
*.md
1 change: 1 addition & 0 deletions helm/odigos/templates/crds/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.yaml
2 changes: 2 additions & 0 deletions helm/odigos/templates/crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Odigos CRDs are defined in [the api package](api/config/crd/bases) and are copied here when packaging the helm chart.

Loading
Loading