diff --git a/.github/workflows/verify-api-crds.yml b/.github/workflows/verify-api-crds.yml index 3217a26c1..885b3bcde 100644 --- a/.github/workflows/verify-api-crds.yml +++ b/.github/workflows/verify-api-crds.yml @@ -4,6 +4,9 @@ on: jobs: verify-api-crds: + defaults: + run: + working-directory: ./api runs-on: ubuntu-latest steps: - name: Checkout Repo @@ -12,15 +15,13 @@ jobs: with: go-version: "1.21.0" - name: install controller-gen - working-directory: ./api - run: "make controller-gen" + run: make controller-gen - name: Check API CRDs - working-directory: ./api - run: "make generate && make manifests" + run: make generate && make manifests - name: Verify Generate - working-directory: ./api run: | if [[ $(git diff --exit-code) ]]; then + git diff echo "api CRDs are not up to date. Please run 'make generate && make manifests' and commit the changes." exit 1 fi diff --git a/api/Makefile b/api/Makefile index dd8e690ee..e26f29f14 100644 --- a/api/Makefile +++ b/api/Makefile @@ -41,7 +41,7 @@ help: ## Display this help. .PHONY: manifests manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases .PHONY: generate generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. @@ -67,7 +67,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.14.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/api/config/crd/bases/actions.odigos.io_addclusterinfos.yaml b/api/config/crd/bases/actions.odigos.io_addclusterinfos.yaml index 8fea3cb72..bf7208a24 100644 --- a/api/config/crd/bases/actions.odigos.io_addclusterinfos.yaml +++ b/api/config/crd/bases/actions.odigos.io_addclusterinfos.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: addclusterinfos.actions.odigos.io spec: group: actions.odigos.io @@ -24,14 +23,19 @@ spec: 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' + 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' + 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 @@ -48,8 +52,9 @@ spec: 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 + description: |- + if the value is a string, this field should be used. + empty string is a valid value type: string required: - attributeName @@ -77,46 +82,47 @@ spec: action properties: conditions: - description: 'Represents the observations of a addclusterinfo''s current - state. Known .status.conditions.type are: "Available", "Progressing"' + 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. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" 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. + 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. + 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. + 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. + 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 @@ -130,11 +136,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) 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 @@ -155,9 +162,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/api/config/crd/bases/actions.odigos.io_deleteattributes.yaml b/api/config/crd/bases/actions.odigos.io_deleteattributes.yaml index c76bf1277..f326c29bd 100644 --- a/api/config/crd/bases/actions.odigos.io_deleteattributes.yaml +++ b/api/config/crd/bases/actions.odigos.io_deleteattributes.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: deleteattributes.actions.odigos.io spec: group: actions.odigos.io @@ -24,14 +23,19 @@ spec: 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' + 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' + 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 @@ -66,46 +70,47 @@ spec: action properties: conditions: - description: 'Represents the observations of a DeleteAttribute''s - current state. Known .status.conditions.type are: "Available", "Progressing"' + 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. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" 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. + 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. + 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. + 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. + 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 @@ -119,11 +124,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) 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 @@ -144,9 +150,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/api/config/crd/bases/odigos.io_collectorsgroups.yaml b/api/config/crd/bases/odigos.io_collectorsgroups.yaml index 660f6dee4..b642cbfe1 100644 --- a/api/config/crd/bases/odigos.io_collectorsgroups.yaml +++ b/api/config/crd/bases/odigos.io_collectorsgroups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: collectorsgroups.odigos.io spec: group: odigos.io @@ -21,14 +20,19 @@ spec: 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' + 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' + 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 @@ -56,9 +60,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/api/config/crd/bases/odigos.io_destinations.yaml b/api/config/crd/bases/odigos.io_destinations.yaml index 31f6b726d..934c838dd 100644 --- a/api/config/crd/bases/odigos.io_destinations.yaml +++ b/api/config/crd/bases/odigos.io_destinations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: destinations.odigos.io spec: group: odigos.io @@ -21,14 +20,19 @@ spec: 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' + 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' + 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 @@ -42,14 +46,18 @@ spec: destinationName: type: string secretRef: - description: LocalObjectReference contains enough information to let - you locate the referenced object inside the same namespace. + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? type: string type: object + x-kubernetes-map-type: atomic signals: items: enum: @@ -74,9 +82,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/api/config/crd/bases/odigos.io_instrumentationconfigs.yaml b/api/config/crd/bases/odigos.io_instrumentationconfigs.yaml index a468eb1f3..86e79d481 100644 --- a/api/config/crd/bases/odigos.io_instrumentationconfigs.yaml +++ b/api/config/crd/bases/odigos.io_instrumentationconfigs.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: instrumentationconfigs.odigos.io spec: group: odigos.io @@ -22,34 +21,42 @@ spec: 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' + 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' + 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 + 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. + 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 + 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. + 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 @@ -75,18 +82,19 @@ spec: 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. + 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. + 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 @@ -107,9 +115,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/api/config/crd/bases/odigos.io_instrumentedapplications.yaml b/api/config/crd/bases/odigos.io_instrumentedapplications.yaml index 03021e640..decb48a35 100644 --- a/api/config/crd/bases/odigos.io_instrumentedapplications.yaml +++ b/api/config/crd/bases/odigos.io_instrumentedapplications.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: instrumentedapplications.odigos.io spec: group: odigos.io @@ -22,14 +21,19 @@ spec: 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' + 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' + 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 @@ -72,9 +76,9 @@ spec: 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. + 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 @@ -107,9 +111,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/api/config/crd/bases/odigos.io_odigosconfigurations.yaml b/api/config/crd/bases/odigos.io_odigosconfigurations.yaml index 3b2cbec2b..9c7b89b3f 100644 --- a/api/config/crd/bases/odigos.io_odigosconfigurations.yaml +++ b/api/config/crd/bases/odigos.io_odigosconfigurations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: odigosconfigurations.odigos.io spec: group: odigos.io @@ -21,14 +20,19 @@ spec: description: OdigosConfiguration is the Schema for the odigos configuration 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' + 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' + 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 @@ -40,31 +44,28 @@ spec: collectorGateway: 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. + 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. + 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). + 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' + 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: @@ -122,9 +123,3 @@ spec: type: object served: true storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/api/config/crd/bases/odigos.io_processors.yaml b/api/config/crd/bases/odigos.io_processors.yaml index 6b8dd7f2e..d208c711b 100644 --- a/api/config/crd/bases/odigos.io_processors.yaml +++ b/api/config/crd/bases/odigos.io_processors.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: processors.odigos.io spec: group: odigos.io @@ -22,14 +21,19 @@ spec: 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' + 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' + 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 @@ -47,21 +51,21 @@ spec: 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. + 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 + 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 @@ -69,10 +73,10 @@ spec: 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. + 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 @@ -85,9 +89,9 @@ spec: 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 + 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 @@ -103,9 +107,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/api/odigos/actions/v1alpha1/zz_generated.deepcopy.go b/api/odigos/actions/v1alpha1/zz_generated.deepcopy.go index 9464bfaeb..fcb77a721 100644 --- a/api/odigos/actions/v1alpha1/zz_generated.deepcopy.go +++ b/api/odigos/actions/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022. diff --git a/api/odigos/v1alpha1/zz_generated.deepcopy.go b/api/odigos/v1alpha1/zz_generated.deepcopy.go index b1a01711a..e38f73d1c 100644 --- a/api/odigos/v1alpha1/zz_generated.deepcopy.go +++ b/api/odigos/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022. @@ -542,7 +541,8 @@ func (in *OdigosConfigurationSpec) DeepCopyInto(out *OdigosConfigurationSpec) { if val == nil { (*out)[key] = nil } else { - in, out := &val, &outVal + inVal := (*in)[key] + in, out := &inVal, &outVal *out = make([]common.OtelSdk, len(*in)) copy(*out, *in) } diff --git a/autoscaler/Makefile b/autoscaler/Makefile index 4c98e81e1..f63382bf4 100644 --- a/autoscaler/Makefile +++ b/autoscaler/Makefile @@ -41,7 +41,7 @@ help: ## Display this help. .PHONY: manifests manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases .PHONY: generate generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. @@ -114,7 +114,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.14.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/scheduler/Makefile b/scheduler/Makefile index 4c98e81e1..f63382bf4 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -41,7 +41,7 @@ help: ## Display this help. .PHONY: manifests manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases .PHONY: generate generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. @@ -114,7 +114,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.14.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize diff --git a/scheduler/config/rbac/role.yaml b/scheduler/config/rbac/role.yaml deleted file mode 100644 index 789d24e06..000000000 --- a/scheduler/config/rbac/role.yaml +++ /dev/null @@ -1,59 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - name: manager-role -rules: -- apiGroups: - - odigos.io - resources: - - collectorsgroups - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - odigos.io - resources: - - collectorsgroups/finalizers - verbs: - - update -- apiGroups: - - odigos.io - resources: - - collectorsgroups/status - verbs: - - get - - patch - - update -- apiGroups: - - odigos.io - resources: - - destinations - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - odigos.io - resources: - - destinations/finalizers - verbs: - - update -- apiGroups: - - odigos.io - resources: - - destinations/status - verbs: - - get - - patch - - update