diff --git a/.github/workflows/verify-api-crds.yml b/.github/workflows/verify-api-crds.yml index d89718d4e..60a98a9b4 100644 --- a/.github/workflows/verify-api-crds.yml +++ b/.github/workflows/verify-api-crds.yml @@ -34,3 +34,13 @@ jobs: echo "client files are not up to date. Please run 'make generate-client' and commit the changes." exit 1 fi + - name: Sync CRDs to Helm + run: make sync-helm-crd + - name: Verify Helm + run: | + if [[ $(git diff --exit-code) ]]; then + git diff + echo "Helm CRDs are not up to date. Please run 'make sync-helm-crd' and commit the changes." + exit 1 + fi + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9bd15684..0cd9b84b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -165,7 +165,9 @@ make deploy make deploy-odiglet make deploy-autoscaler make deploy-collector +make deploy-scheduler make deploy-instrumentor +make deploy-ui ``` - Deploy odiglet and build instrumentation agents from source code: diff --git a/api/DEVELOPMENT.md b/api/DEVELOPMENT.md index 6e63b8109..ac5730700 100644 --- a/api/DEVELOPMENT.md +++ b/api/DEVELOPMENT.md @@ -6,7 +6,9 @@ 2. Run `make generate` to update the auto generated `zz_generated.deepcopy.go` file. 3. Run `make manifests` to update the CRD yaml files in the `config/crd/bases` directory. 4. Run `make generate-client` to update the auto generated files under `api/generated`. -5. Update the code in `cli` module to reflect the changes in the CRD in the `cli/cmd/resources/crds` directory +5. Run `make sync-helm-crd` to sync the CRD yaml files to the helm chart. + +you can run `make all` to combine steps 2-5 instead of running them individually. ## CRD versioning diff --git a/api/Makefile b/api/Makefile index 72af09aea..2efb2f4d2 100644 --- a/api/Makefile +++ b/api/Makefile @@ -18,7 +18,7 @@ SHELL = /usr/bin/env bash -o pipefail .SHELLFLAGS = -ec .PHONY: all -all: generate manifests generate-client +all: generate manifests generate-client sync-helm-crd ##@ General @@ -90,3 +90,9 @@ generate-client: GOWORK=off go mod vendor ./hack/update-codegen.sh rm -rf ./vendor + +.PHONY: sync-helm +sync-helm-crd: + @echo "Syncing CRD yamls to Helm repo" + @rm ../helm/odigos/templates/crds/* # remove existing files so we don't get leftovers + @cp -r config/crd/bases/* ../helm/odigos/templates/crds/ \ No newline at end of file diff --git a/helm/odigos/templates/crds/.gitignore b/helm/odigos/templates/crds/.gitignore deleted file mode 100644 index 1e82fc7de..000000000 --- a/helm/odigos/templates/crds/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.yaml diff --git a/helm/odigos/templates/crds/README.md b/helm/odigos/templates/crds/README.md deleted file mode 100644 index dedd033e2..000000000 --- a/helm/odigos/templates/crds/README.md +++ /dev/null @@ -1,2 +0,0 @@ - Odigos CRDs are defined in [the api package](api/config/crd/bases) and are copied here when packaging the helm chart. - diff --git a/helm/odigos/templates/crds/actions.odigos.io_addclusterinfos.yaml b/helm/odigos/templates/crds/actions.odigos.io_addclusterinfos.yaml new file mode 100644 index 000000000..d8ec9aeeb --- /dev/null +++ b/helm/odigos/templates/crds/actions.odigos.io_addclusterinfos.yaml @@ -0,0 +1,154 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + metadata.labels.odigos.io/config: "1" + metadata.labels.odigos.io/system-object: "true" + name: addclusterinfos.actions.odigos.io +spec: + group: actions.odigos.io + names: + kind: AddClusterInfo + listKind: AddClusterInfoList + plural: addclusterinfos + shortNames: + - aci + singular: addclusterinfo + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: AddClusterInfo is the Schema for the addclusterinfo odigos action + 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: + description: AddClusterInfoSpec defines the desired state of AddClusterInfo + action + properties: + actionName: + type: string + clusterAttributes: + items: + properties: + attributeName: + description: the name of the attribute to insert + type: string + attributeStringValue: + description: |- + if the value is a string, this field should be used. + empty string is a valid value + type: string + required: + - attributeName + - attributeStringValue + type: object + type: array + disabled: + type: boolean + notes: + type: string + signals: + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + required: + - clusterAttributes + - signals + type: object + status: + description: AddClusterInfoStatus defines the observed state of AddClusterInfo + action + properties: + conditions: + description: |- + Represents the observations of a addclusterinfo's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/actions.odigos.io_deleteattributes.yaml b/helm/odigos/templates/crds/actions.odigos.io_deleteattributes.yaml new file mode 100644 index 000000000..a441324cd --- /dev/null +++ b/helm/odigos/templates/crds/actions.odigos.io_deleteattributes.yaml @@ -0,0 +1,142 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: deleteattributes.actions.odigos.io +spec: + group: actions.odigos.io + names: + kind: DeleteAttribute + listKind: DeleteAttributeList + plural: deleteattributes + shortNames: + - da + singular: deleteattribute + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: DeleteAttribute is the Schema for the DeleteAttribute odigos + action 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: + description: DeleteAttributeSpec defines the desired state of DeleteAttribute + action + properties: + actionName: + type: string + attributeNamesToDelete: + items: + type: string + type: array + disabled: + type: boolean + notes: + type: string + signals: + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + required: + - attributeNamesToDelete + - signals + type: object + status: + description: DeleteAttributeStatus defines the observed state of DeleteAttribute + action + properties: + conditions: + description: |- + Represents the observations of a DeleteAttribute's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/actions.odigos.io_errorsamplers.yaml b/helm/odigos/templates/crds/actions.odigos.io_errorsamplers.yaml new file mode 100644 index 000000000..9a9d8ddfa --- /dev/null +++ b/helm/odigos/templates/crds/actions.odigos.io_errorsamplers.yaml @@ -0,0 +1,141 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: errorsamplers.actions.odigos.io +spec: + group: actions.odigos.io + names: + kind: ErrorSampler + listKind: ErrorSamplerList + plural: errorsamplers + shortNames: + - es + singular: errorsampler + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ErrorSampler is the Schema for the ErrorSampler odigos action + 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: + description: ErrorSamplerSpec defines the desired state of ErrorSampler + action + properties: + actionName: + type: string + disabled: + type: boolean + fallback_sampling_ratio: + description: Specifies the ratio of non-error traces to be sampled. + type: number + notes: + type: string + signals: + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + required: + - fallback_sampling_ratio + - signals + type: object + status: + description: ErrorSamplerStatus defines the observed state of ErrorSampler + action + properties: + conditions: + description: |- + Represents the observations of a ErrorSampler's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/actions.odigos.io_latencysamplers.yaml b/helm/odigos/templates/crds/actions.odigos.io_latencysamplers.yaml new file mode 100644 index 000000000..bc1d1c918 --- /dev/null +++ b/helm/odigos/templates/crds/actions.odigos.io_latencysamplers.yaml @@ -0,0 +1,166 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: latencysamplers.actions.odigos.io +spec: + group: actions.odigos.io + names: + kind: LatencySampler + listKind: LatencySamplerList + plural: latencysamplers + shortNames: + - ls + singular: latencysampler + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: LatencySampler is the Schema for the LatencySampler odigos action + 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: + description: LatencySamplerSpec defines the desired state of LatencySampler + action + properties: + actionName: + type: string + disabled: + type: boolean + endpoints_filters: + description: Specifies the list of endpoint filters to be applied + for sampling + items: + properties: + fallback_sampling_ratio: + description: Specifies the fallback sampling ratio to be applied + in case service and endpoint filter match but the latency + threshold is not met. + type: number + http_route: + description: Specifies the http.route to be sampled + type: string + minimum_latency_threshold: + description: Specifies the lower latency threshold in milliseconds; + traces with latency equal to or exceeding this value will + be considered for sampling. + type: integer + service_name: + description: Specifies the service to be sampled + type: string + required: + - fallback_sampling_ratio + - http_route + - minimum_latency_threshold + - service_name + type: object + type: array + notes: + type: string + signals: + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + required: + - endpoints_filters + - signals + type: object + status: + description: LatencySamplerStatus defines the observed state of LatencySampler + action + properties: + conditions: + description: |- + Represents the observations of a LatencySampler's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/actions.odigos.io_piimaskings.yaml b/helm/odigos/templates/crds/actions.odigos.io_piimaskings.yaml new file mode 100644 index 000000000..0d9a75522 --- /dev/null +++ b/helm/odigos/templates/crds/actions.odigos.io_piimaskings.yaml @@ -0,0 +1,142 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: piimaskings.actions.odigos.io +spec: + group: actions.odigos.io + names: + kind: PiiMasking + listKind: PiiMaskingList + plural: piimaskings + shortNames: + - red + singular: piimasking + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: PiiMasking is the Schema for the PiiMasking odigos action 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: + description: PiiMaskingSpec defines the desired state of PiiMasking action + properties: + actionName: + type: string + disabled: + type: boolean + notes: + type: string + piiCategories: + items: + enum: + - CREDIT_CARD + type: string + type: array + signals: + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + required: + - piiCategories + - signals + type: object + status: + description: PiiMaskingStatus defines the observed state of PiiMasking + action + properties: + conditions: + description: |- + Represents the observations of a piiMasking's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/actions.odigos.io_probabilisticsamplers.yaml b/helm/odigos/templates/crds/actions.odigos.io_probabilisticsamplers.yaml new file mode 100644 index 000000000..6b4d5c214 --- /dev/null +++ b/helm/odigos/templates/crds/actions.odigos.io_probabilisticsamplers.yaml @@ -0,0 +1,140 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: probabilisticsamplers.actions.odigos.io +spec: + group: actions.odigos.io + names: + kind: ProbabilisticSampler + listKind: ProbabilisticSamplerList + plural: probabilisticsamplers + shortNames: + - ps + singular: probabilisticsampler + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ProbabilisticSampler is the Schema for the ProbabilisticSampler + odigos action 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: + description: ProbabilisticSamplerSpec defines the desired state of ProbabilisticSampler + action + properties: + actionName: + type: string + disabled: + type: boolean + notes: + type: string + sampling_percentage: + type: string + signals: + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + required: + - sampling_percentage + - signals + type: object + status: + description: ProbabilisticSamplerStatus defines the observed state of + ProbabilisticSampler action + properties: + conditions: + description: |- + Represents the observations of a ProbabilisticSampler's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/actions.odigos.io_renameattributes.yaml b/helm/odigos/templates/crds/actions.odigos.io_renameattributes.yaml new file mode 100644 index 000000000..deb9a6994 --- /dev/null +++ b/helm/odigos/templates/crds/actions.odigos.io_renameattributes.yaml @@ -0,0 +1,140 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: renameattributes.actions.odigos.io +spec: + group: actions.odigos.io + names: + kind: RenameAttribute + listKind: RenameAttributeList + plural: renameattributes + singular: renameattribute + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: RenameAttribute is the Schema for the RenameAttribute odigos + action 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: + description: RenameAttributeSpec defines the desired state of RenameAttribute + action + properties: + actionName: + type: string + disabled: + type: boolean + notes: + type: string + renames: + additionalProperties: + type: string + type: object + signals: + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + required: + - renames + - signals + type: object + status: + description: RenameAttributeStatus defines the observed state of RenameAttribute + action + properties: + conditions: + description: |- + Represents the observations of a RenameAttribute's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/odigos.io_collectorsgroups.yaml b/helm/odigos/templates/crds/odigos.io_collectorsgroups.yaml new file mode 100644 index 000000000..e278eb3be --- /dev/null +++ b/helm/odigos/templates/crds/odigos.io_collectorsgroups.yaml @@ -0,0 +1,215 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: collectorsgroups.odigos.io +spec: + group: odigos.io + names: + kind: CollectorsGroup + listKind: CollectorsGroupList + plural: collectorsgroups + singular: collectorsgroup + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: CollectorsGroup is the Schema for the collectors 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: + description: CollectorsGroupSpec defines the desired state of Collector + properties: + collectorOwnMetricsPort: + description: |- + The port to use for exposing the collector's own metrics as a prometheus endpoint. + This can be used to resolve conflicting ports when a collector is using the host network. + format: int32 + type: integer + resourcesSettings: + description: |- + Resources [memory/cpu] settings for the collectors group. + these settings are used to protect the collectors instances from: + - running out of memory and being killed by the k8s OOM killer + - consuming all available memory on the node which can lead to node instability + - pushing back pressure to the instrumented applications + properties: + cpuLimitMillicores: + description: |- + CPU resource limit to be used on the pod template. + it will be embedded in the as a resource limit of the form "cpu: m" + type: integer + cpuRequestMillicores: + description: |- + CPU resource request to be used on the pod template. + it will be embedded in the as a resource request of the form "cpu: m" + type: integer + gomemlimitMiB: + description: |- + the GOMEMLIMIT environment variable value for the collector pod. + this is when go runtime will start garbage collection. + it is recommended to be set to 80% of the hard limit of the memory limiter. + type: integer + maxReplicas: + type: integer + memoryLimitMiB: + description: |- + This option sets the limit on the memory usage of the collector. + since the memory limiter mechanism is heuristic, and operates on fixed intervals, + while it cannot fully prevent OOMs, it can help in reducing the chances of OOMs in edge cases. + the settings should prevent the collector from exceeding the memory request, + so one can set this to the same value as the memory request or higher to allow for some buffer for bursts. + type: integer + memoryLimiterLimitMiB: + description: |- + this parameter sets the "limit_mib" parameter in the memory limiter configuration for the collector. + it is the hard limit after which a force garbage collection will be performed. + this value will end up comparing against the go runtime reported heap Alloc value. + According to the memory limiter docs: + > Note that typically the total memory usage of process will be about 50MiB higher than this value + a test from nov 2024 showed that fresh odigos collector with no traffic takes 38MiB, + thus the 50MiB is a good value to start with. + type: integer + memoryLimiterSpikeLimitMiB: + description: |- + this parameter sets the "spike_limit_mib" parameter in the memory limiter configuration for the collector memory limiter. + note that this is not the processor soft limit itself, but the diff in Mib between the hard limit and the soft limit. + according to the memory limiter docs, it is recommended to set this to 20% of the hard limit. + changing this value allows trade-offs between memory usage and resiliency to bursts. + type: integer + memoryRequestMiB: + description: |- + MemoryRequestMiB is the memory resource request to be used on the pod template. + it will be embedded in the as a resource request of the form "memory: Mi" + type: integer + minReplicas: + description: Minumum + Maximum number of replicas for the collector + - these relevant only for gateway. + type: integer + required: + - cpuLimitMillicores + - cpuRequestMillicores + - gomemlimitMiB + - memoryLimitMiB + - memoryLimiterLimitMiB + - memoryLimiterSpikeLimitMiB + - memoryRequestMiB + type: object + role: + enum: + - CLUSTER_GATEWAY + - NODE_COLLECTOR + type: string + required: + - collectorOwnMetricsPort + - resourcesSettings + - role + type: object + status: + description: CollectorsGroupStatus defines the observed state of Collector + properties: + conditions: + description: |- + Represents the observations of a collectorsroup's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + ready: + type: boolean + receiverSignals: + description: |- + Receiver Signals are the signals (trace, metrics, logs) that the collector has setup + an otlp receiver for, thus it can accept data from an upstream component. + this is used to determine if a workload should export each signal or not. + this list is calculated based on the odigos destinations that were configured + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/odigos.io_destinations.yaml b/helm/odigos/templates/crds/odigos.io_destinations.yaml new file mode 100644 index 000000000..2678954d0 --- /dev/null +++ b/helm/odigos/templates/crds/odigos.io_destinations.yaml @@ -0,0 +1,149 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: destinations.odigos.io +spec: + group: odigos.io + names: + kind: Destination + listKind: DestinationList + plural: destinations + singular: destination + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Destination is the Schema for the destinations 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: + description: DestinationSpec defines the desired state of Destination + properties: + data: + additionalProperties: + type: string + type: object + destinationName: + type: string + secretRef: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + signals: + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + type: + type: string + required: + - data + - destinationName + - signals + - type + type: object + status: + description: DestinationStatus defines the observed state of Destination + properties: + conditions: + description: Represents the observations of a destination's current + state. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/odigos.io_instrumentationconfigs.yaml b/helm/odigos/templates/crds/odigos.io_instrumentationconfigs.yaml new file mode 100644 index 000000000..fdfd06cea --- /dev/null +++ b/helm/odigos/templates/crds/odigos.io_instrumentationconfigs.yaml @@ -0,0 +1,482 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + name: instrumentationconfigs.odigos.io +spec: + group: odigos.io + names: + kind: InstrumentationConfig + listKind: InstrumentationConfigList + plural: instrumentationconfigs + singular: instrumentationconfig + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + 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: + description: |- + Config for the OpenTelemeetry SDKs that should be applied to a workload. + The workload is identified by the owner reference + properties: + config: + 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: + description: |- + WorkloadInstrumentationConfig defined a single config option to apply + on a workload, along with it's value, filters and instrumentation libraries + properties: + instrumentationLibraries: + 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: + 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 + - nginx + - 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: + 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 + 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. + items: + properties: + headSamplerConfig: + description: |- + HeadSamplingConfig is a set sampling rules. + This config currently only applies to root spans. + In the Future we might add another level of configuration base on the parent span (ParentBased Sampling) + properties: + attributesAndSamplerRules: + items: + description: |- + AttributesAndSamplerRule is a set of AttributeCondition that are ANDed together. + If all attribute conditions evaluate to true, the AND sampler evaluates to true, + and the fraction is used to determine the sampling decision. + If any of the attribute compare samplers evaluate to false, + the fraction is not used and the rule is skipped. + An "empty" AttributesAndSamplerRule with no attribute conditions is considered to always evaluate to true. + and the fraction is used to determine the sampling decision. + This entity is refered to a rule in Odigos terminology for head-sampling. + properties: + attributeConditions: + items: + description: '''Operand'' represents the attributes + and values that an operator acts upon in an expression' + properties: + key: + description: attribute key (e.g. "url.path") + type: string + operator: + description: The operator to use to compare + the attribute value. + enum: + - equals + - notEquals + - endWith + - startWith + type: string + val: + description: currently only string values are + supported. + type: string + required: + - key + - val + type: object + type: array + fraction: + default: 1 + description: |- + The fraction of spans to sample, in the range [0, 1]. + If the fraction is 0, no spans are sampled. + If the fraction is 1, all spans are sampled. + type: number + required: + - attributeConditions + - fraction + type: object + type: array + fallbackFraction: + default: 1 + description: |- + Used as a fallback if all rules evaluate to false, + it may be empty - in this case the default value will be 1 - all spans are sampled. + it should be a float value in the range [0, 1] - the fraction of spans to sample. + a value of 0 means no spans are sampled if none of the rules evaluate to true. + type: number + required: + - attributesAndSamplerRules + - fallbackFraction + type: object + instrumentationLibraryConfigs: + description: configurations for the instrumentation libraries + the the SDK should use + items: + properties: + libraryId: + properties: + libraryName: + description: |- + The name of the instrumentation library + - Node.js: The name of the npm package: `@opentelemetry/instrumentation-` + type: string + spanKind: + description: |- + SpanKind is only supported by Golang and will be ignored for any other SDK language. + In Go, SpanKind is used because the same instrumentation library can be utilized for different span kinds (e.g., client/server). + enum: + - client + - server + - producer + - consumer + - internal + type: string + required: + - libraryName + type: object + payloadCollection: + properties: + dbQuery: + description: rule for collecting db payloads for the + mentioned workload and instrumentation libraries + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + type: object + httpRequest: + description: |- + Collect HTTP request payload data when available. + Can be a client (outgoing) request or a server (incoming) request, depending on the instrumentation library + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + mimeTypes: + description: |- + Limit payload collection to specific mime types based on the content type header. + When not specified, all mime types payloads will be collected. + Empty array will make the rule ineffective. + items: + type: string + type: array + type: object + httpResponse: + description: |- + rule for collecting the response part of an http payload. + Can be a client response or a server response, depending on the instrumentation library + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + mimeTypes: + description: |- + Limit payload collection to specific mime types based on the content type header. + When not specified, all mime types payloads will be collected. + Empty array will make the rule ineffective. + items: + type: string + type: array + type: object + messaging: + description: rule for collecting messaging payloads + for the mentioned workload and instrumentation libraries + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + type: object + type: object + 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: + - libraryId + type: object + type: array + language: + description: The language of the SDK being configured + enum: + - java + - python + - go + - dotnet + - javascript + - mysql + - nginx + - unknown + - ignored + type: string + payloadCollection: + properties: + dbQuery: + description: rule for collecting db payloads for the mentioned + workload and instrumentation libraries + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + type: object + httpRequest: + description: |- + Collect HTTP request payload data when available. + Can be a client (outgoing) request or a server (incoming) request, depending on the instrumentation library + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + mimeTypes: + description: |- + Limit payload collection to specific mime types based on the content type header. + When not specified, all mime types payloads will be collected. + Empty array will make the rule ineffective. + items: + type: string + type: array + type: object + httpResponse: + description: |- + rule for collecting the response part of an http payload. + Can be a client response or a server response, depending on the instrumentation library + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + mimeTypes: + description: |- + Limit payload collection to specific mime types based on the content type header. + When not specified, all mime types payloads will be collected. + Empty array will make the rule ineffective. + items: + type: string + type: array + type: object + messaging: + description: rule for collecting messaging payloads for + the mentioned workload and instrumentation libraries + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + type: object + type: object + required: + - language + - payloadCollection + type: object + type: array + serviceName: + description: the service.name property is used to populate the `service.name` + resource attribute in the telemetry generated by this workload + type: string + type: object + status: + properties: + observedWorkloadGeneration: + description: |- + Runtime detection is applied on pods. + Pods run a specific workload template spec, so it's important to capture it do avoid + unpredictable behavior when multiple generations co-exist, + and to avoid running the detection when unnecessary. + format: int64 + type: integer + runtimeDetailsByContainer: + description: Capture Runtime Details for the workloads that this CR + applies to. + items: + properties: + containerName: + type: string + envVars: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + language: + enum: + - java + - python + - go + - dotnet + - javascript + - mysql + - nginx + - unknown + - ignored + type: string + otherAgent: + properties: + name: + type: string + type: object + runtimeVersion: + type: string + required: + - containerName + - language + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/odigos.io_instrumentationinstances.yaml b/helm/odigos/templates/crds/odigos.io_instrumentationinstances.yaml new file mode 100644 index 000000000..f59bd3801 --- /dev/null +++ b/helm/odigos/templates/crds/odigos.io_instrumentationinstances.yaml @@ -0,0 +1,196 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + 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: + properties: + containerName: + description: |- + stores the name of the container in the pod where the SDK is running. + The pod details can be found as the owner reference on the CR. + type: string + required: + - containerName + 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: + description: |- + Healthy true means that the odigos agent has started the SDK, and there are no errors. User can expect telemetry to be generated. + Healthy false means that the agent has stopped and telemetry data is not expected to be generated. + Healthy nil means that the agent did not report any health status yet (prefer to always report health status). + type: boolean + identifyingAttributes: + description: |- + Attributes that identify the SDK and are reported as resource attributes in the generated telemetry. + One can identify if an arbitrary telemetry is generated by this SDK by checking those resource attributes. + 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 SDK general health. + can be omitted if healthy is true + maxLength: 32768 + type: string + nonIdentifyingAttributes: + description: Attributes that are not reported as resource attributes + but useful to describe characteristics of the SDK. + 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: {} diff --git a/helm/odigos/templates/crds/odigos.io_instrumentationrules.yaml b/helm/odigos/templates/crds/odigos.io_instrumentationrules.yaml new file mode 100644 index 000000000..bc9867874 --- /dev/null +++ b/helm/odigos/templates/crds/odigos.io_instrumentationrules.yaml @@ -0,0 +1,310 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + metadata.labels.odigos.io/config: "1" + metadata.labels.odigos.io/system-object: "true" + name: instrumentationrules.odigos.io +spec: + group: odigos.io + names: + kind: InstrumentationRule + listKind: InstrumentationRuleList + plural: instrumentationrules + singular: instrumentationrule + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + 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: + properties: + disabled: + description: A boolean field allowing to temporarily disable the rule, + but keep it around for future use + type: boolean + instrumentationLibraries: + description: |- + For fine grained control, the user can specify the instrumentation library to use. + One can specify same rule for multiple languages and libraries at the same time. + If nil, all instrumentation libraries will be used. + If empty, no instrumentation libraries will be used. + items: + description: |- + Includes the instrumentation library name, span kind (for golang) and language + which identifies a specific library globally. + properties: + language: + description: The language in which this library will collect + data + enum: + - java + - python + - go + - dotnet + - javascript + - mysql + - nginx + - unknown + - ignored + type: string + name: + description: The name of the instrumentation library + type: string + spanKind: + description: |- + SpanKind is only supported by Golang and will be ignored for any other SDK language. + In Go, SpanKind is used because the same instrumentation library can be utilized for different span kinds (e.g., client/server). + enum: + - client + - server + - producer + - consumer + - internal + type: string + required: + - language + - name + type: object + type: array + notes: + description: 'A free-form text field that allows you to attach notes + regarding the rule for convenience. For example: why it was added. + Odigos does not use or assume any meaning from this field.' + type: string + otelSdks: + description: |- + Set the OtelSdk to use for the workloads in this rule. + instrumentation libraries will be ignored if set. + the rule will be used only for languages which are specified, and ignored otherwise. + properties: + otelSdkByLanguage: + additionalProperties: + properties: + sdkTier: + type: string + sdkType: + description: 'Odigos supports two types of OpenTelemetry + SDKs: native and ebpf.' + type: string + required: + - sdkTier + - sdkType + type: object + type: object + required: + - otelSdkByLanguage + type: object + payloadCollection: + description: Allows to configure payload collection aspects for different + types of payloads. + properties: + dbQuery: + description: rule for collecting db payloads for the mentioned + workload and instrumentation libraries + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + type: object + httpRequest: + description: |- + Collect HTTP request payload data when available. + Can be a client (outgoing) request or a server (incoming) request, depending on the instrumentation library + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + mimeTypes: + description: |- + Limit payload collection to specific mime types based on the content type header. + When not specified, all mime types payloads will be collected. + Empty array will make the rule ineffective. + items: + type: string + type: array + type: object + httpResponse: + description: |- + rule for collecting the response part of an http payload. + Can be a client response or a server response, depending on the instrumentation library + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + mimeTypes: + description: |- + Limit payload collection to specific mime types based on the content type header. + When not specified, all mime types payloads will be collected. + Empty array will make the rule ineffective. + items: + type: string + type: array + type: object + messaging: + description: rule for collecting messaging payloads for the mentioned + workload and instrumentation libraries + properties: + dropPartialPayloads: + description: |- + If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all. + This is useful if you require some decoding of the payload (like json) and having it partially is not useful. + type: boolean + maxPayloadLength: + description: |- + Maximum length of the payload to collect. + If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option + format: int64 + type: integer + type: object + type: object + ruleName: + description: Allows you to attach a meaningful name to the rule for + convenience. Odigos does not use or assume any meaning from this + field. + type: string + workloads: + description: An array of workload objects (name, namespace, kind) + to which the rule should be applied. If not specified, the rule + will be applied to all workloads. empty array will render the rule + inactive. + items: + description: |- + PodWorkload represents the higher-level controller managing a specific Pod within a Kubernetes cluster. + It contains essential details about the controller such as its Name, Namespace, and Kind. + 'Kind' refers to the type of controller, which can be a Deployment, StatefulSet, or DaemonSet. + This struct is useful for identifying and interacting with the overarching entity + that governs the lifecycle and behavior of a Pod, especially in contexts where + understanding the relationship between a Pod and its controlling workload is crucial. + properties: + kind: + description: |- + 1. the pascal case representation of the workload kind + it is used in k8s api objects as the `Kind` field. + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + - namespace + type: object + type: array + type: object + status: + properties: + conditions: + description: |- + Represents the observations of a instrumentationrule's current state. + Known .status.conditions.type are: "Available", "Progressing" + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/odigos.io_instrumentedapplications.yaml b/helm/odigos/templates/crds/odigos.io_instrumentedapplications.yaml new file mode 100644 index 000000000..696bd689b --- /dev/null +++ b/helm/odigos/templates/crds/odigos.io_instrumentedapplications.yaml @@ -0,0 +1,197 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: instrumentedapplications.odigos.io +spec: + group: odigos.io + names: + kind: InstrumentedApplication + listKind: InstrumentedApplicationList + plural: instrumentedapplications + singular: instrumentedapplication + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: InstrumentedApplication is the Schema for the instrumentedapplications + 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: + description: InstrumentedApplicationSpec defines the desired state of + InstrumentedApplication + properties: + options: + items: + properties: + containerName: + type: string + instrumentationsLibraries: + items: + properties: + libraryName: + type: string + options: + items: + properties: + optionKey: + type: string + spanKind: + description: |- + SpanKind is already defined in opentelemetry-go as int. + this value can go into the CRD in which case it will be string for user convenience. + enum: + - client + - server + - producer + - consumer + - internal + type: string + required: + - optionKey + - spanKind + type: object + type: array + required: + - libraryName + - options + type: object + type: array + required: + - containerName + - instrumentationsLibraries + type: object + type: array + runtimeDetails: + items: + properties: + containerName: + type: string + envVars: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + language: + enum: + - java + - python + - go + - dotnet + - javascript + - mysql + - nginx + - unknown + - ignored + type: string + otherAgent: + properties: + name: + type: string + type: object + runtimeVersion: + type: string + required: + - containerName + - language + type: object + type: array + type: object + status: + description: InstrumentedApplicationStatus defines the observed state + of InstrumentedApplication + properties: + conditions: + description: Represents the observations of a nstrumentedApplication's + current state. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/odigos/templates/crds/odigos.io_odigosconfigurations.yaml b/helm/odigos/templates/crds/odigos.io_odigosconfigurations.yaml new file mode 100644 index 000000000..37b9691b1 --- /dev/null +++ b/helm/odigos/templates/crds/odigos.io_odigosconfigurations.yaml @@ -0,0 +1,116 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: odigosconfigurations.odigos.io +spec: + group: odigos.io + names: + kind: OdigosConfiguration + listKind: OdigosConfigurationList + plural: odigosconfigurations + singular: odigosconfiguration + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: |- + OdigosConfiguration is the Schema for the odigos configuration + + Deprecated: Use common.OdigosConfiguration instead + 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: + 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: |- + the GOMEMLIMIT environment variable value for the collector gateway deployment. + this is when go runtime will start garbage collection. + if not specified, it will be set to 80% of the hard limit of the memory limiter. + type: integer + memoryLimiterLimitMiB: + description: |- + this parameter sets the "limit_mib" parameter in the memory limiter configuration for the collector gateway. + it is the hard limit after which a force garbage collection will be performed. + if not set, it will be 50Mi below the memory request. + type: integer + memoryLimiterSpikeLimitMiB: + description: |- + this parameter sets the "spike_limit_mib" parameter in the memory limiter configuration for the collector gateway. + note that this is not the processor soft limit, but the diff in Mib between the hard limit and the soft limit. + if not set, this will be set to 20% of the hard limit (so the soft limit will be 80% of the hard limit). + type: integer + requestMemoryMiB: + description: |- + 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: Mi" + default value is 500Mi + type: integer + type: object + configVersion: + type: integer + goAutoIncludeCodeAttributes: + description: |- + this is internal currently, and is not exposed on the CLI / helm + used for odigos enterprise + type: boolean + ignoredContainers: + items: + type: string + type: array + ignoredNamespaces: + items: + type: string + type: array + imagePrefix: + type: string + instrumentorImage: + type: string + odigletImage: + type: string + odigosVersion: + type: string + openshiftEnabled: + type: boolean + psp: + type: boolean + telemetryEnabled: + type: boolean + required: + - configVersion + - odigosVersion + type: object + type: object + served: true + storage: true diff --git a/helm/odigos/templates/crds/odigos.io_processors.yaml b/helm/odigos/templates/crds/odigos.io_processors.yaml new file mode 100644 index 000000000..659b5e037 --- /dev/null +++ b/helm/odigos/templates/crds/odigos.io_processors.yaml @@ -0,0 +1,112 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.16.1 + labels: + odigos.io/config: "1" + odigos.io/system-object: "true" + name: processors.odigos.io +spec: + group: odigos.io + names: + kind: Processor + listKind: ProcessorList + plural: processors + singular: processor + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Processor is the Schema for an Opentelemetry Collector Processor + that is added to Odigos pipeline + 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: + description: ProcessorSpec defines the an OpenTelemetry Collector processor + in odigos telemetry pipeline + properties: + collectorRoles: + description: control which collector roles in odigos pipeline this + processor is attached to. + items: + enum: + - CLUSTER_GATEWAY + - NODE_COLLECTOR + type: string + type: array + disabled: + description: |- + disable is a flag to enable or disable the processor. + if the processor is disabled, it will not be included in the collector configuration yaml. + this allows the user to keep the processor configuration in the CR, but disable it temporarily. + type: boolean + notes: + description: user can attach notes to the processor, to document its + purpose, usage, etc. + type: string + orderHint: + description: |- + control the order of processors. + a processor with lower order hint value will be placed before other processors with higher value. + if 2 processors have the same value, the order is arbitrary. + if the value is missing (or 0) the processor can be placed anywhere in the pipeline + type: integer + processorConfig: + description: this it the configuration of the opentelemetry collector + processor component with the type specified in 'type'. + type: object + x-kubernetes-preserve-unknown-fields: true + processorName: + description: |- + this name is solely for the user convenience, to attach a meaningful name to the processor. + odigos must not assume any semantics from this name. + odigos cannot assume this name is unique, not empty, exclude spaces or dots, limited in length, etc. + type: string + signals: + description: signals can be used to control which observability signals + are processed by the processor. + items: + enum: + - LOGS + - TRACES + - METRICS + type: string + type: array + type: + description: |- + type of the processor (batch, attributes, etc). + this field is only the type, not it's instance name in the collector configuration yaml + type: string + required: + - collectorRoles + - processorConfig + - signals + - type + type: object + status: + description: ProcessorStatus defines the observed state of the processor + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/scripts/release-charts.sh b/scripts/release-charts.sh index 0a5eb5709..28a4eb23f 100755 --- a/scripts/release-charts.sh +++ b/scripts/release-charts.sh @@ -34,9 +34,6 @@ fi helm repo add odigos https://odigos-io.github.io/odigos-charts 2> /dev/null || true git worktree add $TMPDIR gh-pages -f -# Setup work that needs to be done -cp -r api/config/crd/bases/* helm/odigos/templates/crds/ - # Update index with new packages for chart in "${CHARTDIRS[@]}" do diff --git a/tests/e2e/helm-chart/chainsaw-test.yaml b/tests/e2e/helm-chart/chainsaw-test.yaml index 95eb57c54..16c281e15 100644 --- a/tests/e2e/helm-chart/chainsaw-test.yaml +++ b/tests/e2e/helm-chart/chainsaw-test.yaml @@ -30,8 +30,6 @@ spec: content: | # The pwd is the directory of this file, so we have to walk up to the project root to find the helm chart P="../../.." - # "build" complete helm chart by copying CRDs into the template folder - cp -r $P/api/config/crd/bases/* $P/helm/odigos/templates/crds/ if [ "$MODE" = "cross-cloud-tests" ]; then helm upgrade --install odigos $P/helm/odigos --create-namespace --namespace odigos-test --set image.tag="$COMMIT_HASH" --set imagePrefix=public.ecr.aws/y2v0v6s7 else