allocationStrategy |
enum |
@@ -18094,6 +18101,1308 @@ TargetAllocator indicates a value which determines whether to spawn a target all
+### OpenTelemetryCollector.spec.targetAllocator.affinity
+[↩ Parent](#opentelemetrycollectorspectargetallocator)
+
+
+
+If specified, indicates the pod's scheduling constraints
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ nodeAffinity |
+ object |
+
+ Describes node affinity scheduling rules for the pod.
+ |
+ false |
+
+ podAffinity |
+ object |
+
+ Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+ |
+ false |
+
+ podAntiAffinity |
+ object |
+
+ Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinity)
+
+
+
+Describes node affinity scheduling rules for the pod.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ preferredDuringSchedulingIgnoredDuringExecution |
+ []object |
+
+ The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+ |
+ false |
+
+ requiredDuringSchedulingIgnoredDuringExecution |
+ object |
+
+ If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinity)
+
+
+
+An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ preference |
+ object |
+
+ A node selector term, associated with the corresponding weight.
+ |
+ true |
+
+ weight |
+ integer |
+
+ Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+
+ Format: int32
+ |
+ true |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindex)
+
+
+
+A node selector term, associated with the corresponding weight.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ A list of node selector requirements by node's labels.
+ |
+ false |
+
+ matchFields |
+ []object |
+
+ A list of node selector requirements by node's fields.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindexpreference)
+
+
+
+A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ The label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ |
+ true |
+
+ values |
+ []string |
+
+ An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchFields[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindexpreference)
+
+
+
+A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ The label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ |
+ true |
+
+ values |
+ []string |
+
+ An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinity)
+
+
+
+If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ nodeSelectorTerms |
+ []object |
+
+ Required. A list of node selector terms. The terms are ORed.
+ |
+ true |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinityrequiredduringschedulingignoredduringexecution)
+
+
+
+A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ A list of node selector requirements by node's labels.
+ |
+ false |
+
+ matchFields |
+ []object |
+
+ A list of node selector requirements by node's fields.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinityrequiredduringschedulingignoredduringexecutionnodeselectortermsindex)
+
+
+
+A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ The label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ |
+ true |
+
+ values |
+ []string |
+
+ An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchFields[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinityrequiredduringschedulingignoredduringexecutionnodeselectortermsindex)
+
+
+
+A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ The label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+ |
+ true |
+
+ values |
+ []string |
+
+ An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinity)
+
+
+
+Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ preferredDuringSchedulingIgnoredDuringExecution |
+ []object |
+
+ The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+ |
+ false |
+
+ requiredDuringSchedulingIgnoredDuringExecution |
+ []object |
+
+ If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinity)
+
+
+
+The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ podAffinityTerm |
+ object |
+
+ Required. A pod affinity term, associated with the corresponding weight.
+ |
+ true |
+
+ weight |
+ integer |
+
+ weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
+
+ Format: int32
+ |
+ true |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindex)
+
+
+
+Required. A pod affinity term, associated with the corresponding weight.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ topologyKey |
+ string |
+
+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+ |
+ true |
+
+ labelSelector |
+ object |
+
+ A label query over a set of resources, in this case pods.
+ |
+ false |
+
+ namespaceSelector |
+ object |
+
+ A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+ |
+ false |
+
+ namespaces |
+ []string |
+
+ namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm)
+
+
+
+A label query over a set of resources, in this case pods.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ |
+ false |
+
+ matchLabels |
+ map[string]string |
+
+ matchLabels is a map of {key,value} pairs.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermlabelselector)
+
+
+
+A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ key is the label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ |
+ true |
+
+ values |
+ []string |
+
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm)
+
+
+
+A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ |
+ false |
+
+ matchLabels |
+ map[string]string |
+
+ matchLabels is a map of {key,value} pairs.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermnamespaceselector)
+
+
+
+A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ key is the label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ |
+ true |
+
+ values |
+ []string |
+
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinity)
+
+
+
+Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-locate
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ topologyKey |
+ string |
+
+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+ |
+ true |
+
+ labelSelector |
+ object |
+
+ A label query over a set of resources, in this case pods.
+ |
+ false |
+
+ namespaceSelector |
+ object |
+
+ A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+ |
+ false |
+
+ namespaces |
+ []string |
+
+ namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinityrequiredduringschedulingignoredduringexecutionindex)
+
+
+
+A label query over a set of resources, in this case pods.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ |
+ false |
+
+ matchLabels |
+ map[string]string |
+
+ matchLabels is a map of {key,value} pairs.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinityrequiredduringschedulingignoredduringexecutionindexlabelselector)
+
+
+
+A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ key is the label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ |
+ true |
+
+ values |
+ []string |
+
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinityrequiredduringschedulingignoredduringexecutionindex)
+
+
+
+A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ |
+ false |
+
+ matchLabels |
+ map[string]string |
+
+ matchLabels is a map of {key,value} pairs.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinityrequiredduringschedulingignoredduringexecutionindexnamespaceselector)
+
+
+
+A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ key is the label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ |
+ true |
+
+ values |
+ []string |
+
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinity)
+
+
+
+Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ preferredDuringSchedulingIgnoredDuringExecution |
+ []object |
+
+ The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+ |
+ false |
+
+ requiredDuringSchedulingIgnoredDuringExecution |
+ []object |
+
+ If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinity)
+
+
+
+The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ podAffinityTerm |
+ object |
+
+ Required. A pod affinity term, associated with the corresponding weight.
+ |
+ true |
+
+ weight |
+ integer |
+
+ weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
+
+ Format: int32
+ |
+ true |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindex)
+
+
+
+Required. A pod affinity term, associated with the corresponding weight.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ topologyKey |
+ string |
+
+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+ |
+ true |
+
+ labelSelector |
+ object |
+
+ A label query over a set of resources, in this case pods.
+ |
+ false |
+
+ namespaceSelector |
+ object |
+
+ A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+ |
+ false |
+
+ namespaces |
+ []string |
+
+ namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm)
+
+
+
+A label query over a set of resources, in this case pods.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ |
+ false |
+
+ matchLabels |
+ map[string]string |
+
+ matchLabels is a map of {key,value} pairs.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermlabelselector)
+
+
+
+A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ key is the label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ |
+ true |
+
+ values |
+ []string |
+
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm)
+
+
+
+A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ |
+ false |
+
+ matchLabels |
+ map[string]string |
+
+ matchLabels is a map of {key,value} pairs.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermnamespaceselector)
+
+
+
+A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ key is the label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ |
+ true |
+
+ values |
+ []string |
+
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinity)
+
+
+
+Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-locate
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ topologyKey |
+ string |
+
+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+ |
+ true |
+
+ labelSelector |
+ object |
+
+ A label query over a set of resources, in this case pods.
+ |
+ false |
+
+ namespaceSelector |
+ object |
+
+ A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+ |
+ false |
+
+ namespaces |
+ []string |
+
+ namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindex)
+
+
+
+A label query over a set of resources, in this case pods.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ |
+ false |
+
+ matchLabels |
+ map[string]string |
+
+ matchLabels is a map of {key,value} pairs.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindexlabelselector)
+
+
+
+A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ key is the label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ |
+ true |
+
+ values |
+ []string |
+
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindex)
+
+
+
+A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ matchExpressions |
+ []object |
+
+ matchExpressions is a list of label selector requirements. The requirements are ANDed.
+ |
+ false |
+
+ matchLabels |
+ map[string]string |
+
+ matchLabels is a map of {key,value} pairs.
+ |
+ false |
+
+
+
+
+### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index]
+[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindexnamespaceselector)
+
+
+
+A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ key |
+ string |
+
+ key is the label key that the selector applies to.
+ |
+ true |
+
+ operator |
+ string |
+
+ operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+ |
+ true |
+
+ values |
+ []string |
+
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+ |
+ false |
+
+
+
+
### OpenTelemetryCollector.spec.targetAllocator.env[index]
[↩ Parent](#opentelemetrycollectorspectargetallocator)
diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go
index d8018692d9..90fea45285 100644
--- a/internal/manifests/targetallocator/deployment.go
+++ b/internal/manifests/targetallocator/deployment.go
@@ -58,6 +58,7 @@ func Deployment(params manifests.Params) *appsv1.Deployment {
NodeSelector: params.OtelCol.Spec.TargetAllocator.NodeSelector,
Tolerations: params.OtelCol.Spec.TargetAllocator.Tolerations,
TopologySpreadConstraints: params.OtelCol.Spec.TargetAllocator.TopologySpreadConstraints,
+ Affinity: params.OtelCol.Spec.TargetAllocator.Affinity,
},
},
},
diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go
index eabe92c729..9767ca6813 100644
--- a/internal/manifests/targetallocator/deployment_test.go
+++ b/internal/manifests/targetallocator/deployment_test.go
@@ -49,6 +49,24 @@ var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{
},
}
+var testAffinityValue = &v1.Affinity{
+ NodeAffinity: &v1.NodeAffinity{
+ RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{
+ NodeSelectorTerms: []v1.NodeSelectorTerm{
+ {
+ MatchExpressions: []v1.NodeSelectorRequirement{
+ {
+ Key: "node",
+ Operator: v1.NodeSelectorOpIn,
+ Values: []string{"test-node"},
+ },
+ },
+ },
+ },
+ },
+ },
+}
+
func TestDeploymentNewDefault(t *testing.T) {
// prepare
otelcol := collectorInstance()
@@ -158,6 +176,47 @@ func TestDeploymentNodeSelector(t *testing.T) {
d2 := Deployment(params2)
assert.Equal(t, map[string]string{"node-key": "node-value"}, d2.Spec.Template.Spec.NodeSelector)
}
+func TestDeploymentAffinity(t *testing.T) {
+ // Test default
+ otelcol1 := v1alpha1.OpenTelemetryCollector{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "my-instance",
+ },
+ }
+
+ cfg := config.New()
+
+ params1 := manifests.Params{
+ OtelCol: otelcol1,
+ Config: cfg,
+ Log: logger,
+ }
+ d1 := Deployment(params1)
+ assert.Empty(t, d1.Spec.Template.Spec.Affinity)
+
+ // Test affinity
+ otelcol2 := v1alpha1.OpenTelemetryCollector{
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "my-instance-affinity",
+ },
+ Spec: v1alpha1.OpenTelemetryCollectorSpec{
+ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{
+ Affinity: testAffinityValue,
+ },
+ },
+ }
+
+ cfg = config.New()
+
+ params2 := manifests.Params{
+ OtelCol: otelcol2,
+ Config: cfg,
+ Log: logger,
+ }
+
+ d2 := Deployment(params2)
+ assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity)
+}
func TestDeploymentTolerations(t *testing.T) {
// Test default
diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml
index d7676d9b1f..d53e870704 100644
--- a/tests/e2e/targetallocator-features/00-assert.yaml
+++ b/tests/e2e/targetallocator-features/00-assert.yaml
@@ -47,6 +47,15 @@ metadata:
spec:
template:
spec:
+ affinity:
+ nodeAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ nodeSelectorTerms:
+ - matchExpressions:
+ - key: ingress-ready
+ operator: In
+ values:
+ - "true"
containers:
- name: ta-container
args:
diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml
index fb9b04c689..9b75be12db 100644
--- a/tests/e2e/targetallocator-features/00-install.yaml
+++ b/tests/e2e/targetallocator-features/00-install.yaml
@@ -41,6 +41,15 @@ spec:
enabled: true
image: "local/opentelemetry-operator-targetallocator:e2e"
serviceAccount: ta
+ affinity:
+ nodeAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ nodeSelectorTerms:
+ - matchExpressions:
+ - key: ingress-ready
+ operator: In
+ values:
+ - "true"
prometheusCR:
enabled: true
env:
From b549933d8ad77bf81eb8388ac760985d345ac327 Mon Sep 17 00:00:00 2001
From: Andreas Gerstmayr
Date: Mon, 13 Nov 2023 15:18:22 +0100
Subject: [PATCH 02/34] Support configuring images via RELATED_IMAGE_
environment variables (#2325)
For disconnected environments, various tools expect the image location to be set in RELATED_IMAGE_ environment variables:
https://redhat-connect.gitbook.io/certified-operator-guide/troubleshooting-and-resources/offline-enabled-operators#golang-operators
https://docs.openshift.com/container-platform/4.14/operators/operator_sdk/osdk-generating-csvs.html#olm-enabling-operator-for-restricted-network_osdk-generating-csvs
Resolves: #2326
Signed-off-by: Andreas Gerstmayr
---
.chloggen/related_images_env_vars.yaml | 16 ++++++++++++++
main.go | 30 +++++++++++++++++---------
2 files changed, 36 insertions(+), 10 deletions(-)
create mode 100644 .chloggen/related_images_env_vars.yaml
diff --git a/.chloggen/related_images_env_vars.yaml b/.chloggen/related_images_env_vars.yaml
new file mode 100644
index 0000000000..dd855dc07b
--- /dev/null
+++ b/.chloggen/related_images_env_vars.yaml
@@ -0,0 +1,16 @@
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: enhancement
+
+# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
+component: operator
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Support configuring images via RELATED_IMAGE_ environment variables
+
+# One or more tracking issues related to the change
+issues: [2326]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext:
diff --git a/main.go b/main.go
index ea9afae869..222a9d5253 100644
--- a/main.go
+++ b/main.go
@@ -75,6 +75,16 @@ func init() {
// +kubebuilder:scaffold:scheme
}
+// stringFlagOrEnv defines a string flag which can be set by an environment variable.
+// Precedence: flag > env var > default value.
+func stringFlagOrEnv(p *string, name string, envName string, defaultValue string, usage string) {
+ envValue := os.Getenv(envName)
+ if envValue != "" {
+ defaultValue = envValue
+ }
+ pflag.StringVar(p, name, defaultValue, usage)
+}
+
func main() {
// registers any flags that underlying libraries might use
opts := zap.Options{}
@@ -112,16 +122,16 @@ func main() {
pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
- pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&operatorOpAMPBridgeImage, "operator-opamp-bridge-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:%s", v.OperatorOpAMPBridge), "The default OpenTelemetry Operator OpAMP Bridge image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&autoInstrumentationGo, "auto-instrumentation-go-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:%s", v.AutoInstrumentationGo), "The default OpenTelemetry Go instrumentation image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&autoInstrumentationApacheHttpd, "auto-instrumentation-apache-httpd-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationApacheHttpd), "The default OpenTelemetry Apache HTTPD instrumentation image. This image is used when no image is specified in the CustomResource.")
- pflag.StringVar(&autoInstrumentationNginx, "auto-instrumentation-nginx-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationNginx), "The default OpenTelemetry Nginx instrumentation image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&targetAllocatorImage, "target-allocator-image", "RELATED_IMAGE_TARGET_ALLOCATOR", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&operatorOpAMPBridgeImage, "operator-opamp-bridge-image", "RELATED_IMAGE_OPERATOR_OPAMP_BRIDGE", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:%s", v.OperatorOpAMPBridge), "The default OpenTelemetry Operator OpAMP Bridge image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_NODEJS", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&autoInstrumentationPython, "auto-instrumentation-python-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_PYTHON", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_DOTNET", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&autoInstrumentationGo, "auto-instrumentation-go-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_GO", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:%s", v.AutoInstrumentationGo), "The default OpenTelemetry Go instrumentation image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&autoInstrumentationApacheHttpd, "auto-instrumentation-apache-httpd-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_APACHE_HTTPD", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationApacheHttpd), "The default OpenTelemetry Apache HTTPD instrumentation image. This image is used when no image is specified in the CustomResource.")
+ stringFlagOrEnv(&autoInstrumentationNginx, "auto-instrumentation-nginx-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_NGINX", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationNginx), "The default OpenTelemetry Nginx instrumentation image. This image is used when no image is specified in the CustomResource.")
pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys")
pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.")
pflag.StringVar(&tlsOpt.minVersion, "tls-min-version", "VersionTLS12", "Minimum TLS version supported. Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants.")
From 1876f506fd4a87bf7a01bbf816c40c5c94a670d5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Nov 2023 15:18:46 +0100
Subject: [PATCH 03/34] Bump go.opentelemetry.io/otel from 1.19.0 to 1.20.0
(#2340)
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...v1.20.0)
---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
go.mod | 6 +++---
go.sum | 11 ++++++-----
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/go.mod b/go.mod
index 27de9cb5f0..adac66488d 100644
--- a/go.mod
+++ b/go.mod
@@ -16,7 +16,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
go.opentelemetry.io/collector/featuregate v0.77.0
- go.opentelemetry.io/otel v1.19.0
+ go.opentelemetry.io/otel v1.20.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.28.3
k8s.io/apiextensions-apiserver v0.28.3
@@ -76,7 +76,7 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
- github.com/google/go-cmp v0.5.9 // indirect
+ github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect
@@ -134,7 +134,7 @@ require (
github.com/spf13/cobra v1.7.0 // indirect
github.com/vultr/govultr/v2 v2.17.2 // indirect
go.opencensus.io v0.24.0 // indirect
- go.opentelemetry.io/otel/trace v1.19.0 // indirect
+ go.opentelemetry.io/otel/trace v1.20.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
diff --git a/go.sum b/go.sum
index ca7ff04714..cc26d127c0 100644
--- a/go.sum
+++ b/go.sum
@@ -242,8 +242,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -532,10 +533,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU=
go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY=
-go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs=
-go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY=
-go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg=
-go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
+go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc=
+go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs=
+go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ=
+go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
From d631efd1fa0a4dfff29dc2ac1d436a4d43663297 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?=
Date: Mon, 13 Nov 2023 15:19:14 +0100
Subject: [PATCH 04/34] Add otel sdk group to dependabot config (#2342)
---
.github/dependabot.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index c00d2ffcfe..fa1ed9e3f4 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -41,6 +41,10 @@ updates:
patterns:
- "k8s.io/*"
- "sigs.k8s.io/*"
+ otel:
+ patterns:
+ - go.opentelemetry.io/otel
+ - go.opentelemetry.io/otel/*
- package-ecosystem: gomod
directory: /cmd/otel-allocator
schedule:
From 6f579ca015d8dc3e06c13ee9bafb6da43111234d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Nov 2023 15:19:38 +0100
Subject: [PATCH 05/34] Bump
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp (#2339)
Bumps [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://github.com/open-telemetry/opentelemetry-go) from 0.42.0 to 0.43.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/example/view/v0.42.0...example/view/v0.43.0)
---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
cmd/operator-opamp-bridge/go.mod | 27 +++++++--------
cmd/operator-opamp-bridge/go.sum | 59 ++++++++++++++++----------------
2 files changed, 42 insertions(+), 44 deletions(-)
diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod
index f580d8904a..12671de858 100644
--- a/cmd/operator-opamp-bridge/go.mod
+++ b/cmd/operator-opamp-bridge/go.mod
@@ -10,11 +10,11 @@ require (
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
- go.opentelemetry.io/otel v1.19.0
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0
- go.opentelemetry.io/otel/metric v1.19.0
- go.opentelemetry.io/otel/sdk v1.19.0
- go.opentelemetry.io/otel/sdk/metric v1.19.0
+ go.opentelemetry.io/otel v1.20.0
+ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0
+ go.opentelemetry.io/otel/metric v1.20.0
+ go.opentelemetry.io/otel/sdk v1.20.0
+ go.opentelemetry.io/otel/sdk/metric v1.20.0
go.uber.org/multierr v1.11.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/apimachinery v0.28.3
@@ -44,9 +44,9 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
- github.com/google/go-cmp v0.5.9 // indirect
+ github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
- github.com/google/uuid v1.3.0 // indirect
+ github.com/google/uuid v1.3.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
@@ -68,22 +68,21 @@ require (
github.com/tklauser/numcpus v0.6.0 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opentelemetry.io/collector/featuregate v0.77.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect
- go.opentelemetry.io/otel/trace v1.19.0 // indirect
+ go.opentelemetry.io/otel/trace v1.20.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect
golang.org/x/net v0.17.0 // indirect
- golang.org/x/oauth2 v0.10.0 // indirect
- golang.org/x/sys v0.13.0 // indirect
+ golang.org/x/oauth2 v0.11.0 // indirect
+ golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect
- google.golang.org/grpc v1.58.3 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
+ google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum
index 9e762e30bf..0d503f6b30 100644
--- a/cmd/operator-opamp-bridge/go.sum
+++ b/cmd/operator-opamp-bridge/go.sum
@@ -40,7 +40,7 @@ github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE=
+github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -51,14 +51,15 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
-github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
-github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
+github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
@@ -115,7 +116,7 @@ github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdO
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk=
github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
-github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
+github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
@@ -141,20 +142,18 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU=
go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY=
-go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs=
-go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 h1:ZtfnDL+tUrs1F0Pzfwbg2d59Gru9NCH3bgSHBM6LDwU=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0 h1:wNMDy/LVGLj2h3p6zg4d0gypKfWKSWI14E1C4smOgl8=
-go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0/go.mod h1:YfbDdXAAkemWJK3H/DshvlrxqFB2rtW4rY6ky/3x/H0=
-go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE=
-go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8=
-go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o=
-go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A=
-go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k=
-go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY=
-go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg=
-go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
+go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc=
+go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg=
+go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ=
+go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA=
+go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM=
+go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM=
+go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0=
+go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk=
+go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8=
+go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ=
+go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
@@ -184,8 +183,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
-golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8=
-golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI=
+golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU=
+golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -200,8 +199,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
-golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
+golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
@@ -227,13 +226,13 @@ gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw
gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw=
-google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE=
-google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
-google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
-google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
+google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY=
+google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q=
+google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
+google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
+google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
From 0eff4e3063fbd4b6ce32b2eabb307e32f3534106 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 13 Nov 2023 15:20:33 +0100
Subject: [PATCH 06/34] Bump the prometheus group with 1 update (#2333)
Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator).
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/v0.69.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.69.0...v0.69.1)
---
updated-dependencies:
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: prometheus
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
go.mod | 2 +-
go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/go.mod b/go.mod
index adac66488d..3681c8e8b1 100644
--- a/go.mod
+++ b/go.mod
@@ -11,7 +11,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/openshift/api v3.9.0+incompatible
github.com/operator-framework/operator-lib v0.11.0
- github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0
+ github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1
github.com/prometheus/prometheus v0.47.2
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
diff --git a/go.sum b/go.sum
index cc26d127c0..d92dbef85d 100644
--- a/go.sum
+++ b/go.sum
@@ -448,8 +448,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
-github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0 h1:cPzbMVI2tvPict9TE0R5BkVRHuG5IWXvpVB2fTXkjL4=
-github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI=
+github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 h1:hOnp+1FLBm+ifsyiRbunmfSs99jKAq+Tr5elCmo5l5U=
+github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
From 86b57da704b7615c96f3f292e9004bbc9c209611 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?=
Date: Mon, 13 Nov 2023 19:36:40 +0100
Subject: [PATCH 07/34] Bump the prometheus group otel-allocator to 0.69.1
(#2347)
prometheus-operator now requires go 1.21, so I needed to bump that
version in otel-allocator as well.
---
cmd/otel-allocator/go.mod | 30 ++++++++-------
cmd/otel-allocator/go.sum | 79 ++++++++++++++++++++++++++-------------
2 files changed, 71 insertions(+), 38 deletions(-)
diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod
index b72d8f36bf..7fe51cdc72 100644
--- a/cmd/otel-allocator/go.mod
+++ b/cmd/otel-allocator/go.mod
@@ -1,6 +1,8 @@
module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator
-go 1.20
+go 1.21
+
+toolchain go1.21.3
require (
github.com/buraksezer/consistent v0.10.0
@@ -12,9 +14,9 @@ require (
github.com/go-logr/logr v1.3.0
github.com/json-iterator/go v1.1.12
github.com/oklog/run v1.1.0
- github.com/prometheus-operator/prometheus-operator v0.68.0
- github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0
- github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0
+ github.com/prometheus-operator/prometheus-operator v0.69.1
+ github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1
+ github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/common v0.45.0
github.com/prometheus/prometheus v0.47.2
@@ -33,8 +35,8 @@ require (
cloud.google.com/go/compute v1.22.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect
- github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect
- github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect
+ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect
+ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.29 // indirect
@@ -44,12 +46,12 @@ require (
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
- github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect
+ github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
- github.com/aws/aws-sdk-go v1.44.317 // indirect
+ github.com/aws/aws-sdk-go v1.44.327 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
@@ -58,7 +60,8 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/digitalocean/godo v1.99.0 // indirect
- github.com/docker/distribution v2.8.2+incompatible // indirect
+ github.com/distribution/reference v0.5.0 // indirect
+ github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v24.0.7+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
@@ -68,7 +71,7 @@ require (
github.com/envoyproxy/go-control-plane v0.11.1 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
- github.com/evanphx/json-patch/v5 v5.6.0 // indirect
+ github.com/evanphx/json-patch/v5 v5.7.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
@@ -93,11 +96,12 @@ require (
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
+ github.com/golang-jwt/jwt/v5 v5.0.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
- github.com/google/go-cmp v0.5.9 // indirect
+ github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect
@@ -178,7 +182,7 @@ require (
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
- golang.org/x/sync v0.3.0 // indirect
+ golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
@@ -200,7 +204,7 @@ require (
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
- sigs.k8s.io/yaml v1.3.0 // indirect
+ sigs.k8s.io/yaml v1.4.0 // indirect
)
// A exclude directive is needed for k8s.io/client-go because Cortex (which
diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum
index 989ca2cd71..c8ac33da3e 100644
--- a/cmd/otel-allocator/go.sum
+++ b/cmd/otel-allocator/go.sum
@@ -37,13 +37,14 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw=
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ=
-github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
-github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg=
-github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY=
+github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
+github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc=
+github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM=
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
+github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw=
@@ -64,8 +65,8 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
-github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY=
-github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o=
+github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk=
+github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
@@ -92,10 +93,11 @@ github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:W
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so=
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
-github.com/aws/aws-sdk-go v1.44.317 h1:+8XWrLmGMwPPXSRSLPzhgcGnzJ2mYkgkrcB9C/GnSOU=
-github.com/aws/aws-sdk-go v1.44.317/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
+github.com/aws/aws-sdk-go v1.44.327 h1:ZS8oO4+7MOBLhkdwIhgtVeDzCeWOlTfKJS7EgggbIEY=
+github.com/aws/aws-sdk-go v1.44.327/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o=
+github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -139,9 +141,12 @@ github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE=
github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA=
github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E=
github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA=
+github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
+github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
-github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
-github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
+github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
+github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM=
github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
@@ -166,14 +171,15 @@ github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBF
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
-github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww=
-github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4=
+github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc=
+github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
+github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
@@ -245,6 +251,7 @@ github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+
github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU=
github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
+github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
@@ -255,6 +262,7 @@ github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPr
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
+github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg=
github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
@@ -289,6 +297,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=
+github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -326,6 +336,7 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
+github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -339,8 +350,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -356,6 +368,7 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA=
+github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc=
github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
@@ -379,6 +392,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb
github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE=
github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg=
github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU=
+github.com/hashicorp/consul/sdk v0.14.0/go.mod h1:gHYeuDa0+0qRAD6Wwr6yznMBvBwHKoxSBoW5l73+saE=
github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A=
github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -395,6 +409,7 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI=
+github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
@@ -406,11 +421,14 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc=
+github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
+github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI=
+github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4=
@@ -434,7 +452,7 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf
github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0=
github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k=
github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc=
-github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
+github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
@@ -473,6 +491,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -509,6 +528,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g=
+github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM=
github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM=
github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q=
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
@@ -519,12 +539,14 @@ github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXx
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
+github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA=
+github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -534,6 +556,7 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
+github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -545,7 +568,9 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
+github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
+github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
@@ -573,12 +598,12 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
github.com/prometheus-community/prom-label-proxy v0.7.0 h1:1iNHXF7V8z2iOCinEyxKDUHu2jppPAAd6PmBCi3naok=
github.com/prometheus-community/prom-label-proxy v0.7.0/go.mod h1:wR9C/Mwp5aBbiqM6gQ+FZdFRwL8pCzzhsje8lTAx/aA=
-github.com/prometheus-operator/prometheus-operator v0.68.0 h1:cbsqyRh0rLKiLas5lG8pQQaITLQl/PVvw0K/xC0CZ4w=
-github.com/prometheus-operator/prometheus-operator v0.68.0/go.mod h1:BrMWJOfNvXRaO2Y7fUuxOLzuTM8wzzlC96d0opwzWnk=
-github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 h1:yl9ceUSUBo9woQIO+8eoWpcxZkdZgm89g+rVvu37TUw=
-github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0/go.mod h1:9Uuu3pEU2jB8PwuqkHvegQ0HV/BlZRJUyfTYAqfdVF8=
-github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 h1:8FS0sXpFkFPxp2gfkxyEMnhZV9yhf7xPbpsIeUZHlzM=
-github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0/go.mod h1:ul4ND0BMCcOX1OSZvbJA1/lh7yQ2ILHNKuZIojGISe4=
+github.com/prometheus-operator/prometheus-operator v0.69.1 h1:pqNMssMBBaM6mYg7FKK7kQi9sIyWYCA33z5FSmmbybw=
+github.com/prometheus-operator/prometheus-operator v0.69.1/go.mod h1:1GSjL8dKOO9be+b7aSowZo7cuTdsdTqLT3ZETktVqvU=
+github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 h1:hOnp+1FLBm+ifsyiRbunmfSs99jKAq+Tr5elCmo5l5U=
+github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI=
+github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1 h1:hCqId2xt6kOPuoeTxVxV/GiKmZyCJjYeuRRL90qcwH0=
+github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1/go.mod h1:XfInnOa8WYXOlzOb0Iw+9eg0s/bkeOnXyten1pKFjuc=
github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc=
github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
@@ -618,6 +643,7 @@ github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
+github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0=
@@ -625,6 +651,7 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU=
+github.com/shoenig/test v0.6.6/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
@@ -694,6 +721,7 @@ go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeH
go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo=
go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4=
go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE=
+go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4=
go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs=
go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
@@ -829,8 +857,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
-golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
+golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
+golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1096,7 +1124,8 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY=
+gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
+gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@@ -1130,5 +1159,5 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk=
sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
-sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
-sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
+sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
+sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
From 3d16cee5a3f53235b4f2153bf7d8fd33e4d7fda7 Mon Sep 17 00:00:00 2001
From: rashmichandrashekar
Date: Mon, 13 Nov 2023 16:38:45 -0800
Subject: [PATCH 08/34] Add logging for prometheus operator in
TargetAllocator's config generator (#2329)
* add logging for prometheus operator
* adding yaml for changelog
* Adding tracking issue
---
...et-allocator-prometheus-operator-logging.yaml | 16 ++++++++++++++++
cmd/otel-allocator/watcher/promOperator.go | 6 +++++-
2 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 .chloggen/target-allocator-prometheus-operator-logging.yaml
diff --git a/.chloggen/target-allocator-prometheus-operator-logging.yaml b/.chloggen/target-allocator-prometheus-operator-logging.yaml
new file mode 100644
index 0000000000..e823ee64d1
--- /dev/null
+++ b/.chloggen/target-allocator-prometheus-operator-logging.yaml
@@ -0,0 +1,16 @@
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: enhancement
+
+# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
+component: target allocator
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Add logging for prometheus operator in TargetAllocator's config generator
+
+# One or more tracking issues related to the change
+issues: [2348]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext:
diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go
index b687b96048..9f916c881e 100644
--- a/cmd/otel-allocator/watcher/promOperator.go
+++ b/cmd/otel-allocator/watcher/promOperator.go
@@ -17,9 +17,11 @@ package watcher
import (
"context"
"fmt"
+ "os"
"time"
"github.com/go-kit/log"
+ "github.com/go-kit/log/level"
"github.com/go-logr/logr"
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
promv1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1"
@@ -67,7 +69,9 @@ func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config) (*Pr
},
}
- generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), prom, true) // TODO replace Nop?
+ promOperatorLogger := level.NewFilter(log.NewLogfmtLogger(os.Stderr), level.AllowWarn())
+ generator, err := prometheus.NewConfigGenerator(promOperatorLogger, prom, true)
+
if err != nil {
return nil, err
}
From c0f8e03694a9fc9f32cb8ef3fcc5c1242d0d7a6f Mon Sep 17 00:00:00 2001
From: Israel Blancas
Date: Tue, 14 Nov 2023 16:34:25 +0100
Subject: [PATCH 09/34] [chore] Add v1alpha2 types (#2283)
* Add v1alpha2 types
Signed-off-by: Israel Blancas
* Fix lint
Signed-off-by: Israel Blancas
---------
Signed-off-by: Israel Blancas
---
apis/v1alpha1/opentelemetrycollector_types.go | 1 +
apis/v1alpha2/groupversion_info.go | 34 +
apis/v1alpha2/instrumentation_types.go | 325 +++++++++
apis/v1alpha2/opentelemetrycollector_types.go | 255 +++++++
apis/v1alpha2/zz_generated.deepcopy.go | 639 ++++++++++++++++++
5 files changed, 1254 insertions(+)
create mode 100644 apis/v1alpha2/groupversion_info.go
create mode 100644 apis/v1alpha2/instrumentation_types.go
create mode 100644 apis/v1alpha2/opentelemetrycollector_types.go
create mode 100644 apis/v1alpha2/zz_generated.deepcopy.go
diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go
index 7d0af3e203..ab5cc54bde 100644
--- a/apis/v1alpha1/opentelemetrycollector_types.go
+++ b/apis/v1alpha1/opentelemetrycollector_types.go
@@ -401,6 +401,7 @@ type OpenTelemetryCollectorStatus struct {
}
// +kubebuilder:object:root=true
+// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=otelcol;otelcols
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.scale.replicas,selectorpath=.status.scale.selector
diff --git a/apis/v1alpha2/groupversion_info.go b/apis/v1alpha2/groupversion_info.go
new file mode 100644
index 0000000000..4a5c2ac8c6
--- /dev/null
+++ b/apis/v1alpha2/groupversion_info.go
@@ -0,0 +1,34 @@
+// Copyright The OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package v1alpha2 contains API Schema definitions for the v1alpha2 API group
+// +kubebuilder:object:generate=true
+// +groupName=opentelemetry.io
+package v1alpha2
+
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "sigs.k8s.io/controller-runtime/pkg/scheme"
+)
+
+var (
+ // GroupVersion is group version used to register these objects.
+ GroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha2"}
+
+ // SchemeBuilder is used to add go types to the GroupVersionKind scheme.
+ SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
+
+ // AddToScheme adds the types in this group-version to the given scheme.
+ AddToScheme = SchemeBuilder.AddToScheme
+)
diff --git a/apis/v1alpha2/instrumentation_types.go b/apis/v1alpha2/instrumentation_types.go
new file mode 100644
index 0000000000..e07d350a81
--- /dev/null
+++ b/apis/v1alpha2/instrumentation_types.go
@@ -0,0 +1,325 @@
+// Copyright The OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +kubebuilder:skip
+
+package v1alpha2
+
+import (
+ corev1 "k8s.io/api/core/v1"
+ "k8s.io/apimachinery/pkg/api/resource"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1"
+)
+
+// InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation.
+type InstrumentationSpec struct {
+ // Exporter defines exporter configuration.
+ // +optional
+ Exporter `json:"exporter,omitempty"`
+
+ // Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification.
+ // +optional
+ Resource Resource `json:"resource,omitempty"`
+
+ // Propagators defines inter-process context propagation configuration.
+ // Values in this list will be set in the OTEL_PROPAGATORS env var.
+ // Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none
+ // +optional
+ Propagators []v1alpha1.Propagator `json:"propagators,omitempty"`
+
+ // Sampler defines sampling configuration.
+ // +optional
+ Sampler `json:"sampler,omitempty"`
+
+ // Env defines common env vars. There are four layers for env vars' definitions and
+ // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
+ // If the former var had been defined, then the other vars would be ignored.
+ // +optional
+ Env []corev1.EnvVar `json:"env,omitempty"`
+
+ // Java defines configuration for java auto-instrumentation.
+ // +optional
+ Java Java `json:"java,omitempty"`
+
+ // NodeJS defines configuration for nodejs auto-instrumentation.
+ // +optional
+ NodeJS NodeJS `json:"nodejs,omitempty"`
+
+ // Python defines configuration for python auto-instrumentation.
+ // +optional
+ Python Python `json:"python,omitempty"`
+
+ // DotNet defines configuration for DotNet auto-instrumentation.
+ // +optional
+ DotNet DotNet `json:"dotnet,omitempty"`
+
+ // Go defines configuration for Go auto-instrumentation.
+ // When using Go auto-instrumentation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the
+ // Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation.
+ // Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged.
+ // +optional
+ Go Go `json:"go,omitempty"`
+
+ // ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation.
+ // +optional
+ ApacheHttpd ApacheHttpd `json:"apacheHttpd,omitempty"`
+
+ // Nginx defines configuration for Nginx auto-instrumentation.
+ // +optional
+ Nginx Nginx `json:"nginx,omitempty"`
+}
+
+// Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification.
+// See also: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/overview.md#resources
+type Resource struct {
+ // Attributes defines attributes that are added to the resource.
+ // For example environment: dev
+ // +optional
+ Attributes map[string]string `json:"resourceAttributes,omitempty"`
+
+ // AddK8sUIDAttributes defines whether K8s UID attributes should be collected (e.g. k8s.deployment.uid).
+ // +optional
+ AddK8sUIDAttributes bool `json:"addK8sUIDAttributes,omitempty"`
+}
+
+// Exporter defines OTLP exporter configuration.
+type Exporter struct {
+ // Endpoint is address of the collector with OTLP endpoint.
+ // +optional
+ Endpoint string `json:"endpoint,omitempty"`
+}
+
+// Sampler defines sampling configuration.
+type Sampler struct {
+ // Type defines sampler type.
+ // The value will be set in the OTEL_TRACES_SAMPLER env var.
+ // The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio...
+ // +optional
+ Type v1alpha1.SamplerType `json:"type,omitempty"`
+
+ // Argument defines sampler argument.
+ // The value depends on the sampler type.
+ // For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25.
+ // The value will be set in the OTEL_TRACES_SAMPLER_ARG env var.
+ // +optional
+ Argument string `json:"argument,omitempty"`
+}
+
+// Java defines Java SDK and instrumentation configuration.
+type Java struct {
+ // Image is a container image with javaagent auto-instrumentation JAR.
+ // +optional
+ Image string `json:"image,omitempty"`
+
+ // VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
+ // The default size is 200Mi.
+ VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`
+
+ // Env defines java specific env vars. There are four layers for env vars' definitions and
+ // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
+ // If the former var had been defined, then the other vars would be ignored.
+ // +optional
+ Env []corev1.EnvVar `json:"env,omitempty"`
+
+ // Resources describes the compute resource requirements.
+ // +optional
+ Resources corev1.ResourceRequirements `json:"resources,omitempty"`
+}
+
+// NodeJS defines NodeJS SDK and instrumentation configuration.
+type NodeJS struct {
+ // Image is a container image with NodeJS SDK and auto-instrumentation.
+ // +optional
+ Image string `json:"image,omitempty"`
+
+ // VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
+ // The default size is 200Mi.
+ VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`
+
+ // Env defines nodejs specific env vars. There are four layers for env vars' definitions and
+ // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
+ // If the former var had been defined, then the other vars would be ignored.
+ // +optional
+ Env []corev1.EnvVar `json:"env,omitempty"`
+
+ // Resources describes the compute resource requirements.
+ // +optional
+ Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
+}
+
+// Python defines Python SDK and instrumentation configuration.
+type Python struct {
+ // Image is a container image with Python SDK and auto-instrumentation.
+ // +optional
+ Image string `json:"image,omitempty"`
+
+ // VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
+ // The default size is 200Mi.
+ VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`
+
+ // Env defines python specific env vars. There are four layers for env vars' definitions and
+ // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
+ // If the former var had been defined, then the other vars would be ignored.
+ // +optional
+ Env []corev1.EnvVar `json:"env,omitempty"`
+
+ // Resources describes the compute resource requirements.
+ // +optional
+ Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
+}
+
+// DotNet defines DotNet SDK and instrumentation configuration.
+type DotNet struct {
+ // Image is a container image with DotNet SDK and auto-instrumentation.
+ // +optional
+ Image string `json:"image,omitempty"`
+
+ // VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
+ // The default size is 200Mi.
+ VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`
+
+ // Env defines DotNet specific env vars. There are four layers for env vars' definitions and
+ // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
+ // If the former var had been defined, then the other vars would be ignored.
+ // +optional
+ Env []corev1.EnvVar `json:"env,omitempty"`
+ // Resources describes the compute resource requirements.
+ // +optional
+ Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
+}
+
+type Go struct {
+ // Image is a container image with Go SDK and auto-instrumentation.
+ // +optional
+ Image string `json:"image,omitempty"`
+
+ // VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
+ // The default size is 200Mi.
+ VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`
+
+ // Env defines Go specific env vars. There are four layers for env vars' definitions and
+ // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
+ // If the former var had been defined, then the other vars would be ignored.
+ // +optional
+ Env []corev1.EnvVar `json:"env,omitempty"`
+
+ // Resources describes the compute resource requirements.
+ // +optional
+ Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
+}
+
+// ApacheHttpd defines Apache SDK and instrumentation configuration.
+type ApacheHttpd struct {
+ // Image is a container image with Apache SDK and auto-instrumentation.
+ // +optional
+ Image string `json:"image,omitempty"`
+
+ // VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
+ // The default size is 200Mi.
+ VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`
+
+ // Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and
+ // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
+ // If the former var had been defined, then the other vars would be ignored.
+ // +optional
+ Env []corev1.EnvVar `json:"env,omitempty"`
+
+ // Attrs defines Apache HTTPD agent specific attributes. The precedence is:
+ // `agent default attributes` > `instrument spec attributes` .
+ // Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module
+ // +optional
+ Attrs []corev1.EnvVar `json:"attrs,omitempty"`
+
+ // Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4
+ // +optional
+ Version string `json:"version,omitempty"`
+
+ // Location of Apache HTTPD server configuration.
+ // Needed only if different from default "/usr/local/apache2/conf"
+ // +optional
+ ConfigPath string `json:"configPath,omitempty"`
+
+ // Resources describes the compute resource requirements.
+ // +optional
+ Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
+}
+
+// Nginx defines Nginx SDK and instrumentation configuration.
+type Nginx struct {
+ // Image is a container image with Nginx SDK and auto-instrumentation.
+ // +optional
+ Image string `json:"image,omitempty"`
+
+ // VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
+ // The default size is 200Mi.
+ VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`
+
+ // Env defines Nginx specific env vars. There are four layers for env vars' definitions and
+ // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
+ // If the former var had been defined, then the other vars would be ignored.
+ // +optional
+ Env []corev1.EnvVar `json:"env,omitempty"`
+
+ // Attrs defines Nginx agent specific attributes. The precedence order is:
+ // `agent default attributes` > `instrument spec attributes` .
+ // Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module
+ // +optional
+ Attrs []corev1.EnvVar `json:"attrs,omitempty"`
+
+ // Location of Nginx configuration file.
+ // Needed only if different from default "/etx/nginx/nginx.conf"
+ // +optional
+ ConfigFile string `json:"configFile,omitempty"`
+
+ // Resources describes the compute resource requirements.
+ // +optional
+ Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
+}
+
+// InstrumentationStatus defines status of the instrumentation.
+type InstrumentationStatus struct {
+}
+
+// +kubebuilder:object:root=true
+// +kubebuilder:resource:shortName=otelinst;otelinsts
+// +kubebuilder:subresource:status
+// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
+// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.exporter.endpoint"
+// +kubebuilder:printcolumn:name="Sampler",type="string",JSONPath=".spec.sampler.type"
+// +kubebuilder:printcolumn:name="Sampler Arg",type="string",JSONPath=".spec.sampler.argument"
+// +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Instrumentation"
+// +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1}}
+
+// Instrumentation is the spec for OpenTelemetry instrumentation.
+type Instrumentation struct {
+ Status InstrumentationStatus `json:"status,omitempty"`
+ metav1.TypeMeta `json:",inline"`
+ Spec InstrumentationSpec `json:"spec,omitempty"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+}
+
+// +kubebuilder:object:root=true
+
+// InstrumentationList contains a list of Instrumentation.
+type InstrumentationList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []Instrumentation `json:"items"`
+}
+
+func init() {
+ SchemeBuilder.Register(&Instrumentation{}, &InstrumentationList{})
+}
diff --git a/apis/v1alpha2/opentelemetrycollector_types.go b/apis/v1alpha2/opentelemetrycollector_types.go
new file mode 100644
index 0000000000..710766ffbb
--- /dev/null
+++ b/apis/v1alpha2/opentelemetrycollector_types.go
@@ -0,0 +1,255 @@
+// Copyright The OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +kubebuilder:skip
+
+package v1alpha2
+
+import (
+ v1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1"
+)
+
+// OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.
+type OpenTelemetryCollectorSpec struct {
+ // ManagementState defines if the CR should be managed by the operator or not.
+ // Default is managed.
+ //
+ // +required
+ // +kubebuilder:validation:Required
+ // +kubebuilder:default:=managed
+ ManagementState v1alpha1.ManagementStateType `json:"managementState,omitempty"`
+ // Resources to set on the OpenTelemetry Collector pods.
+ // +optional
+ Resources v1.ResourceRequirements `json:"resources,omitempty"`
+ // NodeSelector to schedule OpenTelemetry Collector pods.
+ // This is only relevant to daemonset, statefulset, and deployment mode
+ // +optional
+ NodeSelector map[string]string `json:"nodeSelector,omitempty"`
+ // Args is the set of arguments to pass to the OpenTelemetry Collector binary
+ // +optional
+ Args map[string]string `json:"args,omitempty"`
+ // Replicas is the number of pod instances for the underlying OpenTelemetry Collector. Set this if your are not using autoscaling
+ // +optional
+ Replicas *int32 `json:"replicas,omitempty"`
+ // Autoscaler specifies the pod autoscaling configuration to use
+ // for the OpenTelemetryCollector workload.
+ //
+ // +optional
+ Autoscaler *v1alpha1.AutoscalerSpec `json:"autoscaler,omitempty"`
+ // PodDisruptionBudget specifies the pod disruption budget configuration to use
+ // for the OpenTelemetryCollector workload.
+ //
+ // +optional
+ PodDisruptionBudget *v1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
+ // SecurityContext configures the container security context for
+ // the opentelemetry-collector container.
+ //
+ // In deployment, daemonset, or statefulset mode, this controls
+ // the security context settings for the primary application
+ // container.
+ //
+ // In sidecar mode, this controls the security context for the
+ // injected sidecar container.
+ //
+ // +optional
+ SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"`
+ // PodSecurityContext configures the pod security context for the
+ // opentelemetry-collector pod, when running as a deployment, daemonset,
+ // or statefulset.
+ //
+ // In sidecar mode, the opentelemetry-operator will ignore this setting.
+ //
+ // +optional
+ PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"`
+ // PodAnnotations is the set of annotations that will be attached to
+ // Collector and Target Allocator pods.
+ // +optional
+ PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
+ // TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not.
+ // +optional
+ TargetAllocator v1alpha1.OpenTelemetryTargetAllocator `json:"targetAllocator,omitempty"`
+ // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar)
+ // +optional
+ Mode v1alpha1.Mode `json:"mode,omitempty"`
+ // ServiceAccount indicates the name of an existing service account to use with this instance. When set,
+ // the operator will not automatically create a ServiceAccount for the collector.
+ // +optional
+ ServiceAccount string `json:"serviceAccount,omitempty"`
+ // Image indicates the container image to use for the OpenTelemetry Collector.
+ // +optional
+ Image string `json:"image,omitempty"`
+ // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed
+ // +optional
+ UpgradeStrategy v1alpha1.UpgradeStrategy `json:"upgradeStrategy"`
+
+ // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent)
+ // +optional
+ ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"`
+ // Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details.
+ // +required
+ Config string `json:"config,omitempty"`
+ // VolumeMounts represents the mount points to use in the underlying collector deployment(s)
+ // +optional
+ // +listType=atomic
+ VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
+ // Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator
+ // will attempt to infer the required ports by parsing the .Spec.Config property but this property can be
+ // used to open additional ports that can't be inferred by the operator, like for custom receivers.
+ // +optional
+ // +listType=atomic
+ Ports []v1.ServicePort `json:"ports,omitempty"`
+ // ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be
+ // consumed in the config file for the Collector.
+ // +optional
+ Env []v1.EnvVar `json:"env,omitempty"`
+ // List of sources to populate environment variables on the OpenTelemetry Collector's Pods.
+ // These can then in certain cases be consumed in the config file for the Collector.
+ // +optional
+ EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"`
+ // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset.
+ // +optional
+ // +listType=atomic
+ VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
+ // Toleration to schedule OpenTelemetry Collector pods.
+ // This is only relevant to daemonset, statefulset, and deployment mode
+ // +optional
+ Tolerations []v1.Toleration `json:"tolerations,omitempty"`
+ // Volumes represents which volumes to use in the underlying collector deployment(s).
+ // +optional
+ // +listType=atomic
+ Volumes []v1.Volume `json:"volumes,omitempty"`
+ // Ingress is used to specify how OpenTelemetry Collector is exposed. This
+ // functionality is only available if one of the valid modes is set.
+ // Valid modes are: deployment, daemonset and statefulset.
+ // +optional
+ Ingress v1alpha1.Ingress `json:"ingress,omitempty"`
+ // HostNetwork indicates if the pod should run in the host networking namespace.
+ // +optional
+ HostNetwork bool `json:"hostNetwork,omitempty"`
+ // If specified, indicates the pod's priority.
+ // If not specified, the pod priority will be default or zero if there is no
+ // default.
+ // +optional
+ PriorityClassName string `json:"priorityClassName,omitempty"`
+ // If specified, indicates the pod's scheduling constraints
+ // +optional
+ Affinity *v1.Affinity `json:"affinity,omitempty"`
+ // Actions that the management system should take in response to container lifecycle events. Cannot be updated.
+ // +optional
+ Lifecycle *v1.Lifecycle `json:"lifecycle,omitempty"`
+ // Duration in seconds the pod needs to terminate gracefully upon probe failure.
+ // +optional
+ TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
+ // Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector.
+ // It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline.
+ // +optional
+ LivenessProbe *v1alpha1.Probe `json:"livenessProbe,omitempty"`
+ // InitContainers allows injecting initContainers to the Collector's pod definition.
+ // These init containers can be used to fetch secrets for injection into the
+ // configuration from external sources, run added checks, etc. Any errors during the execution of
+ // an initContainer will lead to a restart of the Pod. More info:
+ // https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ // +optional
+ InitContainers []v1.Container `json:"initContainers,omitempty"`
+
+ // AdditionalContainers allows injecting additional containers into the Collector's pod definition.
+ // These sidecar containers can be used for authentication proxies, log shipping sidecars, agents for shipping
+ // metrics to their cloud, or in general sidecars that do not support automatic injection. This option only
+ // applies to Deployment, DaemonSet, and StatefulSet deployment modes of the collector. It does not apply to the sidecar
+ // deployment mode. More info about sidecars:
+ // https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
+ //
+ // Container names managed by the operator:
+ // * `otc-container`
+ //
+ // Overriding containers managed by the operator is outside the scope of what the maintainers will support and by
+ // doing so, you wil accept the risk of it breaking things.
+ //
+ // +optional
+ AdditionalContainers []v1.Container `json:"additionalContainers,omitempty"`
+
+ // ObservabilitySpec defines how telemetry data gets handled.
+ //
+ // +optional
+ // +kubebuilder:validation:Optional
+ // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Observability"
+ Observability v1alpha1.ObservabilitySpec `json:"observability,omitempty"`
+
+ // TopologySpreadConstraints embedded kubernetes pod configuration option,
+ // controls how pods are spread across your cluster among failure-domains
+ // such as regions, zones, nodes, and other user-defined topology domains
+ // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
+ // This is only relevant to statefulset, and deployment mode
+ // +optional
+ TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
+
+ // ConfigMaps is a list of ConfigMaps in the same namespace as the OpenTelemetryCollector
+ // object, which shall be mounted into the Collector Pods.
+ // Each ConfigMap will be added to the Collector's Deployments as a volume named `configmap-`.
+ ConfigMaps []v1alpha1.ConfigMapsSpec `json:"configmaps,omitempty"`
+}
+
+// OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector.
+type OpenTelemetryCollectorStatus struct {
+ // Scale is the OpenTelemetryCollector's scale subresource status.
+ // +optional
+ Scale v1alpha1.ScaleSubresourceStatus `json:"scale,omitempty"`
+
+ // Version of the managed OpenTelemetry Collector (operand)
+ // +optional
+ Version string `json:"version,omitempty"`
+
+ // Image indicates the container image to use for the OpenTelemetry Collector.
+ // +optional
+ Image string `json:"image,omitempty"`
+
+ // Messages about actions performed by the operator on this resource.
+ // +optional
+ // +listType=atomic
+ // Deprecated: use Kubernetes events instead.
+ Messages []string `json:"messages,omitempty"`
+
+ // Replicas is currently not being set and might be removed in the next version.
+ // +optional
+ // Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead.
+ Replicas int32 `json:"replicas,omitempty"`
+}
+
+//+kubebuilder:object:root=true
+//+kubebuilder:subresource:status
+
+// OpenTelemetryCollector is the Schema for the opentelemetrycollectors API.
+type OpenTelemetryCollector struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec OpenTelemetryCollectorSpec `json:"spec,omitempty"`
+ Status OpenTelemetryCollectorStatus `json:"status,omitempty"`
+}
+
+//+kubebuilder:object:root=true
+
+// OpenTelemetryCollectorList contains a list of OpenTelemetryCollector.
+type OpenTelemetryCollectorList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []OpenTelemetryCollector `json:"items"`
+}
+
+func init() {
+ SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{})
+}
diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go
new file mode 100644
index 0000000000..a72a170fb6
--- /dev/null
+++ b/apis/v1alpha2/zz_generated.deepcopy.go
@@ -0,0 +1,639 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+// Copyright The OpenTelemetry Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Code generated by controller-gen. DO NOT EDIT.
+
+package v1alpha2
+
+import (
+ "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1"
+ "k8s.io/api/core/v1"
+ runtime "k8s.io/apimachinery/pkg/runtime"
+)
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ApacheHttpd) DeepCopyInto(out *ApacheHttpd) {
+ *out = *in
+ if in.VolumeSizeLimit != nil {
+ in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Attrs != nil {
+ in, out := &in.Attrs, &out.Attrs
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Resources.DeepCopyInto(&out.Resources)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApacheHttpd.
+func (in *ApacheHttpd) DeepCopy() *ApacheHttpd {
+ if in == nil {
+ return nil
+ }
+ out := new(ApacheHttpd)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *DotNet) DeepCopyInto(out *DotNet) {
+ *out = *in
+ if in.VolumeSizeLimit != nil {
+ in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Resources.DeepCopyInto(&out.Resources)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DotNet.
+func (in *DotNet) DeepCopy() *DotNet {
+ if in == nil {
+ return nil
+ }
+ out := new(DotNet)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Exporter) DeepCopyInto(out *Exporter) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exporter.
+func (in *Exporter) DeepCopy() *Exporter {
+ if in == nil {
+ return nil
+ }
+ out := new(Exporter)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Go) DeepCopyInto(out *Go) {
+ *out = *in
+ if in.VolumeSizeLimit != nil {
+ in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Resources.DeepCopyInto(&out.Resources)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Go.
+func (in *Go) DeepCopy() *Go {
+ if in == nil {
+ return nil
+ }
+ out := new(Go)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Instrumentation) DeepCopyInto(out *Instrumentation) {
+ *out = *in
+ out.Status = in.Status
+ out.TypeMeta = in.TypeMeta
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instrumentation.
+func (in *Instrumentation) DeepCopy() *Instrumentation {
+ if in == nil {
+ return nil
+ }
+ out := new(Instrumentation)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *Instrumentation) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *InstrumentationList) DeepCopyInto(out *InstrumentationList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]Instrumentation, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationList.
+func (in *InstrumentationList) DeepCopy() *InstrumentationList {
+ if in == nil {
+ return nil
+ }
+ out := new(InstrumentationList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *InstrumentationList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) {
+ *out = *in
+ out.Exporter = in.Exporter
+ in.Resource.DeepCopyInto(&out.Resource)
+ if in.Propagators != nil {
+ in, out := &in.Propagators, &out.Propagators
+ *out = make([]v1alpha1.Propagator, len(*in))
+ copy(*out, *in)
+ }
+ out.Sampler = in.Sampler
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Java.DeepCopyInto(&out.Java)
+ in.NodeJS.DeepCopyInto(&out.NodeJS)
+ in.Python.DeepCopyInto(&out.Python)
+ in.DotNet.DeepCopyInto(&out.DotNet)
+ in.Go.DeepCopyInto(&out.Go)
+ in.ApacheHttpd.DeepCopyInto(&out.ApacheHttpd)
+ in.Nginx.DeepCopyInto(&out.Nginx)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec.
+func (in *InstrumentationSpec) DeepCopy() *InstrumentationSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(InstrumentationSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *InstrumentationStatus) DeepCopyInto(out *InstrumentationStatus) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationStatus.
+func (in *InstrumentationStatus) DeepCopy() *InstrumentationStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(InstrumentationStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Java) DeepCopyInto(out *Java) {
+ *out = *in
+ if in.VolumeSizeLimit != nil {
+ in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Resources.DeepCopyInto(&out.Resources)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Java.
+func (in *Java) DeepCopy() *Java {
+ if in == nil {
+ return nil
+ }
+ out := new(Java)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Nginx) DeepCopyInto(out *Nginx) {
+ *out = *in
+ if in.VolumeSizeLimit != nil {
+ in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Attrs != nil {
+ in, out := &in.Attrs, &out.Attrs
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Resources.DeepCopyInto(&out.Resources)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Nginx.
+func (in *Nginx) DeepCopy() *Nginx {
+ if in == nil {
+ return nil
+ }
+ out := new(Nginx)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeJS) DeepCopyInto(out *NodeJS) {
+ *out = *in
+ if in.VolumeSizeLimit != nil {
+ in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Resources.DeepCopyInto(&out.Resources)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJS.
+func (in *NodeJS) DeepCopy() *NodeJS {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeJS)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ in.Status.DeepCopyInto(&out.Status)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollector.
+func (in *OpenTelemetryCollector) DeepCopy() *OpenTelemetryCollector {
+ if in == nil {
+ return nil
+ }
+ out := new(OpenTelemetryCollector)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *OpenTelemetryCollector) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OpenTelemetryCollectorList) DeepCopyInto(out *OpenTelemetryCollectorList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]OpenTelemetryCollector, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorList.
+func (in *OpenTelemetryCollectorList) DeepCopy() *OpenTelemetryCollectorList {
+ if in == nil {
+ return nil
+ }
+ out := new(OpenTelemetryCollectorList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *OpenTelemetryCollectorList) DeepCopyObject() runtime.Object {
+ if c := in.DeepCopy(); c != nil {
+ return c
+ }
+ return nil
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSpec) {
+ *out = *in
+ in.Resources.DeepCopyInto(&out.Resources)
+ if in.NodeSelector != nil {
+ in, out := &in.NodeSelector, &out.NodeSelector
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Args != nil {
+ in, out := &in.Args, &out.Args
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ if in.Replicas != nil {
+ in, out := &in.Replicas, &out.Replicas
+ *out = new(int32)
+ **out = **in
+ }
+ if in.Autoscaler != nil {
+ in, out := &in.Autoscaler, &out.Autoscaler
+ *out = new(v1alpha1.AutoscalerSpec)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.PodDisruptionBudget != nil {
+ in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget
+ *out = new(v1alpha1.PodDisruptionBudgetSpec)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.SecurityContext != nil {
+ in, out := &in.SecurityContext, &out.SecurityContext
+ *out = new(v1.SecurityContext)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.PodSecurityContext != nil {
+ in, out := &in.PodSecurityContext, &out.PodSecurityContext
+ *out = new(v1.PodSecurityContext)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.PodAnnotations != nil {
+ in, out := &in.PodAnnotations, &out.PodAnnotations
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ in.TargetAllocator.DeepCopyInto(&out.TargetAllocator)
+ if in.VolumeMounts != nil {
+ in, out := &in.VolumeMounts, &out.VolumeMounts
+ *out = make([]v1.VolumeMount, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Ports != nil {
+ in, out := &in.Ports, &out.Ports
+ *out = make([]v1.ServicePort, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.EnvFrom != nil {
+ in, out := &in.EnvFrom, &out.EnvFrom
+ *out = make([]v1.EnvFromSource, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.VolumeClaimTemplates != nil {
+ in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates
+ *out = make([]v1.PersistentVolumeClaim, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Tolerations != nil {
+ in, out := &in.Tolerations, &out.Tolerations
+ *out = make([]v1.Toleration, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]v1.Volume, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Ingress.DeepCopyInto(&out.Ingress)
+ if in.Affinity != nil {
+ in, out := &in.Affinity, &out.Affinity
+ *out = new(v1.Affinity)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.Lifecycle != nil {
+ in, out := &in.Lifecycle, &out.Lifecycle
+ *out = new(v1.Lifecycle)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.TerminationGracePeriodSeconds != nil {
+ in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds
+ *out = new(int64)
+ **out = **in
+ }
+ if in.LivenessProbe != nil {
+ in, out := &in.LivenessProbe, &out.LivenessProbe
+ *out = new(v1alpha1.Probe)
+ (*in).DeepCopyInto(*out)
+ }
+ if in.InitContainers != nil {
+ in, out := &in.InitContainers, &out.InitContainers
+ *out = make([]v1.Container, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.AdditionalContainers != nil {
+ in, out := &in.AdditionalContainers, &out.AdditionalContainers
+ *out = make([]v1.Container, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ out.Observability = in.Observability
+ if in.TopologySpreadConstraints != nil {
+ in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints
+ *out = make([]v1.TopologySpreadConstraint, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.ConfigMaps != nil {
+ in, out := &in.ConfigMaps, &out.ConfigMaps
+ *out = make([]v1alpha1.ConfigMapsSpec, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec.
+func (in *OpenTelemetryCollectorSpec) DeepCopy() *OpenTelemetryCollectorSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(OpenTelemetryCollectorSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollectorStatus) {
+ *out = *in
+ out.Scale = in.Scale
+ if in.Messages != nil {
+ in, out := &in.Messages, &out.Messages
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorStatus.
+func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(OpenTelemetryCollectorStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Python) DeepCopyInto(out *Python) {
+ *out = *in
+ if in.VolumeSizeLimit != nil {
+ in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit
+ x := (*in).DeepCopy()
+ *out = &x
+ }
+ if in.Env != nil {
+ in, out := &in.Env, &out.Env
+ *out = make([]v1.EnvVar, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.Resources.DeepCopyInto(&out.Resources)
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Python.
+func (in *Python) DeepCopy() *Python {
+ if in == nil {
+ return nil
+ }
+ out := new(Python)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Resource) DeepCopyInto(out *Resource) {
+ *out = *in
+ if in.Attributes != nil {
+ in, out := &in.Attributes, &out.Attributes
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
+func (in *Resource) DeepCopy() *Resource {
+ if in == nil {
+ return nil
+ }
+ out := new(Resource)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *Sampler) DeepCopyInto(out *Sampler) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sampler.
+func (in *Sampler) DeepCopy() *Sampler {
+ if in == nil {
+ return nil
+ }
+ out := new(Sampler)
+ in.DeepCopyInto(out)
+ return out
+}
From 7e6e3e06c81b4592a591fd306c07c187c6d0d196 Mon Sep 17 00:00:00 2001
From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com>
Date: Tue, 14 Nov 2023 16:57:32 +0100
Subject: [PATCH 10/34] Added service.instance.id into resource env (#2259)
* Added service.instance.id into resource env
Signed-off-by: Yuri Sa
* Changed ServiceInstanceID following the RFC4122
Signed-off-by: Yuri Sa
* Changed ServiceInstanceID following the RFC4122
Signed-off-by: Yuri Sa
* Added semantic conventions
Signed-off-by: Yuri Sa
---------
Signed-off-by: Yuri Sa
---
.chloggen/new-service-instance-id.yaml | 16 ++++++++++++++++
pkg/instrumentation/podmutator_test.go | 2 +-
pkg/instrumentation/sdk.go | 20 ++++++++++++++++----
pkg/instrumentation/sdk_test.go | 4 ++--
4 files changed, 35 insertions(+), 7 deletions(-)
create mode 100755 .chloggen/new-service-instance-id.yaml
diff --git a/.chloggen/new-service-instance-id.yaml b/.chloggen/new-service-instance-id.yaml
new file mode 100755
index 0000000000..8ee2e35402
--- /dev/null
+++ b/.chloggen/new-service-instance-id.yaml
@@ -0,0 +1,16 @@
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: enhancement
+
+# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
+component: Operator
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Added the service.instance.id as the pod.UID into the traces resource Env.
+
+# One or more tracking issues related to the change
+issues: [1921]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext: ""
diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go
index bbe8397f1b..54f8a762b4 100644
--- a/pkg/instrumentation/podmutator_test.go
+++ b/pkg/instrumentation/podmutator_test.go
@@ -2991,7 +2991,7 @@ func TestMutatePod(t *testing.T) {
},
{
Name: "OTEL_RESOURCE_ATTRIBUTES",
- Value: "k8s.container.name=nginx,k8s.namespace.name=req-namespace,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=my-nginx-6c44bcbdd",
+ Value: "k8s.container.name=nginx,k8s.namespace.name=req-namespace,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=my-nginx-6c44bcbdd,service.instance.id=req-namespace.my-nginx-6c44bcbdd.nginx",
},
},
},
diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go
index 8d945339a8..0f6de945fe 100644
--- a/pkg/instrumentation/sdk.go
+++ b/pkg/instrumentation/sdk.go
@@ -23,6 +23,10 @@ import (
"unsafe"
"github.com/go-logr/logr"
+
+ "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1"
+ "github.com/open-telemetry/opentelemetry-operator/pkg/constants"
+
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
appsv1 "k8s.io/api/apps/v1"
@@ -33,9 +37,6 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/util/retry"
"sigs.k8s.io/controller-runtime/pkg/client"
-
- "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1"
- "github.com/open-telemetry/opentelemetry-operator/pkg/constants"
)
const (
@@ -401,6 +402,17 @@ func chooseServiceVersion(pod corev1.Pod, index int) string {
return tag
}
+// creates the service.instance.id following the semantic defined by
+// https://github.com/open-telemetry/semantic-conventions/pull/312.
+func createServiceInstanceId(namespaceName, podName, containerName string) string {
+ var serviceInstanceId string
+ if namespaceName != "" && podName != "" && containerName != "" {
+ resNames := []string{namespaceName, podName, containerName}
+ serviceInstanceId = strings.Join(resNames, ".")
+ }
+ return serviceInstanceId
+}
+
// createResourceMap creates resource attribute map.
// User defined attributes (in explicitly set env var) have higher precedence.
func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod, index int) map[string]string {
@@ -424,7 +436,6 @@ func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.I
res[k] = v
}
}
-
k8sResources := map[attribute.Key]string{}
k8sResources[semconv.K8SNamespaceNameKey] = ns.Name
k8sResources[semconv.K8SContainerNameKey] = pod.Spec.Containers[index].Name
@@ -433,6 +444,7 @@ func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.I
k8sResources[semconv.K8SPodNameKey] = pod.Name
k8sResources[semconv.K8SPodUIDKey] = string(pod.UID)
k8sResources[semconv.K8SNodeNameKey] = pod.Spec.NodeName
+ k8sResources[semconv.ServiceInstanceIDKey] = createServiceInstanceId(ns.Name, pod.Name, pod.Spec.Containers[index].Name)
i.addParentResourceLabels(ctx, otelinst.Spec.Resource.AddK8sUIDAttributes, ns, pod.ObjectMeta, k8sResources)
for k, v := range k8sResources {
if !existingRes[string(k)] && v != "" {
diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go
index af34d0df34..b5817e28d6 100644
--- a/pkg/instrumentation/sdk_test.go
+++ b/pkg/instrumentation/sdk_test.go
@@ -201,7 +201,7 @@ func TestSDKInjection(t *testing.T) {
},
{
Name: "OTEL_RESOURCE_ATTRIBUTES",
- Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid,service.version=latest",
+ Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid,service.instance.id=project1.app.application-name,service.version=latest",
},
},
},
@@ -369,7 +369,7 @@ func TestSDKInjection(t *testing.T) {
},
{
Name: "OTEL_RESOURCE_ATTRIBUTES",
- Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,service.version=latest",
+ Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,service.instance.id=project1.app.application-name,service.version=latest",
},
},
},
From 9255f75460062b456d8ed7195e7d5ba58a0f9100 Mon Sep 17 00:00:00 2001
From: David Leadbeater
Date: Thu, 16 Nov 2023 05:21:46 +1100
Subject: [PATCH 11/34] Run the target allocator as non-root (#2352)
* Run the target allocator as non-root
Signed-off-by: David Leadbeater
* Add issue to changelog
Signed-off-by: David Leadbeater
---------
Signed-off-by: David Leadbeater
---
.chloggen/target-allocator-nonroot.yaml | 19 +++++++++++++++++++
cmd/operator-opamp-bridge/Dockerfile | 3 +++
2 files changed, 22 insertions(+)
create mode 100644 .chloggen/target-allocator-nonroot.yaml
diff --git a/.chloggen/target-allocator-nonroot.yaml b/.chloggen/target-allocator-nonroot.yaml
new file mode 100644
index 0000000000..1718b4d0a9
--- /dev/null
+++ b/.chloggen/target-allocator-nonroot.yaml
@@ -0,0 +1,19 @@
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: bug_fix
+
+# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
+component: target allocator
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Run the target allocator as a non-root user
+
+# One or more tracking issues related to the change
+issues: [738]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext: |
+ Some Kubernetes configurations do not allow running images as root, so
+ provide a non-zero UID in the Docker image.
+
diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile
index ae8a861b89..2031695f24 100644
--- a/cmd/operator-opamp-bridge/Dockerfile
+++ b/cmd/operator-opamp-bridge/Dockerfile
@@ -16,4 +16,7 @@ COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-ce
# Copy binary built on the host
COPY bin/opampbridge_${TARGETARCH} ./main
+# "nonroot"
+USER 65532:65532
+
ENTRYPOINT ["./main"]
From 9dc4417324d664da7d8169f04bc5cc83f1946dc0 Mon Sep 17 00:00:00 2001
From: rashmichandrashekar
Date: Wed, 15 Nov 2023 10:22:25 -0800
Subject: [PATCH 12/34] Update file watcher to detect file write event (#2334)
* adding file write event
* adding issue link
---
.chloggen/target-allocator-file-watch.yaml | 16 ++++++++++++++++
cmd/otel-allocator/watcher/file.go | 4 +++-
2 files changed, 19 insertions(+), 1 deletion(-)
create mode 100644 .chloggen/target-allocator-file-watch.yaml
diff --git a/.chloggen/target-allocator-file-watch.yaml b/.chloggen/target-allocator-file-watch.yaml
new file mode 100644
index 0000000000..fd1fa3f755
--- /dev/null
+++ b/.chloggen/target-allocator-file-watch.yaml
@@ -0,0 +1,16 @@
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: bug_fix
+
+# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
+component: target allocator
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Update file watcher to detect file write events
+
+# One or more tracking issues related to the change
+issues: [2349]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext:
diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go
index a6bbd15fd0..ef7ea166bc 100644
--- a/cmd/otel-allocator/watcher/file.go
+++ b/cmd/otel-allocator/watcher/file.go
@@ -70,7 +70,9 @@ func (f *FileWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error
case <-f.closer:
return nil
case fileEvent := <-f.watcher.Events:
- if fileEvent.Op == fsnotify.Create {
+ // Using Op.Has as per this doc - https://github.com/fsnotify/fsnotify/blob/9342b6df577910c6eac718dc62845d8c95f8548b/fsnotify.go#L30
+ if fileEvent.Op.Has(fsnotify.Create) || fileEvent.Op.Has(fsnotify.Write) {
+ f.logger.Info("File change detected", "event", fileEvent.Op.String())
upstreamEvents <- Event{
Source: EventSourceConfigMap,
Watcher: Watcher(f),
From 78e98e78cf533c9bc3c77eb1d79a26ad7a46e0f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?=
Date: Thu, 16 Nov 2023 17:45:46 +0100
Subject: [PATCH 13/34] Disable configuration hot reload (#2354)
---
.chloggen/disable-hot-reload.yaml | 18 ++++++++++++
cmd/otel-allocator/config/config.go | 6 ++++
cmd/otel-allocator/config/flags.go | 6 ++++
cmd/otel-allocator/config/flags_test.go | 6 ++++
cmd/otel-allocator/main.go | 38 ++++++++++++++-----------
5 files changed, 57 insertions(+), 17 deletions(-)
create mode 100755 .chloggen/disable-hot-reload.yaml
diff --git a/.chloggen/disable-hot-reload.yaml b/.chloggen/disable-hot-reload.yaml
new file mode 100755
index 0000000000..2c5f91f102
--- /dev/null
+++ b/.chloggen/disable-hot-reload.yaml
@@ -0,0 +1,18 @@
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: breaking
+
+# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
+component: target allocator
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Disable configuration hot reload
+
+# One or more tracking issues related to the change
+issues: [2032]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext: |
+ This feature can be re-enabled by passing the --reload-config flag to the target allocator.
+ However, this is deprecated and will be removed in an upcoming release.
diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go
index 96748c1e4d..386b0edd29 100644
--- a/cmd/otel-allocator/config/config.go
+++ b/cmd/otel-allocator/config/config.go
@@ -43,6 +43,7 @@ type Config struct {
KubeConfigFilePath string `yaml:"kube_config_file_path,omitempty"`
ClusterConfig *rest.Config `yaml:"-"`
RootLogger logr.Logger `yaml:"-"`
+ ReloadConfig bool `yaml:"-"`
LabelSelector map[string]string `yaml:"label_selector,omitempty"`
PromConfig *promconfig.Config `yaml:"config"`
AllocationStrategy *string `yaml:"allocation_strategy,omitempty"`
@@ -110,6 +111,11 @@ func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error {
return err
}
+ target.ReloadConfig, err = getConfigReloadEnabled(flagSet)
+ if err != nil {
+ return err
+ }
+
return nil
}
diff --git a/cmd/otel-allocator/config/flags.go b/cmd/otel-allocator/config/flags.go
index bb7dbbb344..152dbc803e 100644
--- a/cmd/otel-allocator/config/flags.go
+++ b/cmd/otel-allocator/config/flags.go
@@ -30,6 +30,7 @@ const (
listenAddrFlagName = "listen-addr"
prometheusCREnabledFlagName = "enable-prometheus-cr-watcher"
kubeConfigPathFlagName = "kubeconfig-path"
+ reloadConfigFlagName = "reload-config"
)
// We can't bind this flag to our FlagSet, so we need to handle it separately.
@@ -41,6 +42,7 @@ func getFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet {
flagSet.String(listenAddrFlagName, ":8080", "The address where this service serves.")
flagSet.Bool(prometheusCREnabledFlagName, false, "Enable Prometheus CRs as target sources")
flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file")
+ flagSet.Bool(reloadConfigFlagName, false, "Enable automatic configuration reloading. This functionality is deprecated and will be removed in a future release.")
zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling))
zapCmdLineOpts.BindFlags(zapFlagSet)
flagSet.AddGoFlagSet(zapFlagSet)
@@ -62,3 +64,7 @@ func getListenAddr(flagSet *pflag.FlagSet) (string, error) {
func getPrometheusCREnabled(flagSet *pflag.FlagSet) (bool, error) {
return flagSet.GetBool(prometheusCREnabledFlagName)
}
+
+func getConfigReloadEnabled(flagSet *pflag.FlagSet) (bool, error) {
+ return flagSet.GetBool(reloadConfigFlagName)
+}
diff --git a/cmd/otel-allocator/config/flags_test.go b/cmd/otel-allocator/config/flags_test.go
index b1bf11b6ce..9d50212a25 100644
--- a/cmd/otel-allocator/config/flags_test.go
+++ b/cmd/otel-allocator/config/flags_test.go
@@ -64,6 +64,12 @@ func TestFlagGetters(t *testing.T) {
expectedValue: true,
getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getPrometheusCREnabled(fs) },
},
+ {
+ name: "GetConfigReloadEnabled",
+ flagArgs: []string{"--" + reloadConfigFlagName, "true"},
+ expectedValue: true,
+ getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigReloadEnabled(fs) },
+ },
{
name: "InvalidFlag",
flagArgs: []string{"--invalid-flag", "value"},
diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go
index 297b7d58da..5167e0a946 100644
--- a/cmd/otel-allocator/main.go
+++ b/cmd/otel-allocator/main.go
@@ -98,10 +98,12 @@ func main() {
setupLog.Error(collectorWatcherErr, "Unable to initialize collector watcher")
os.Exit(1)
}
- fileWatcher, err = allocatorWatcher.NewFileWatcher(setupLog.WithName("file-watcher"), configFilePath)
- if err != nil {
- setupLog.Error(err, "Can't start the file watcher")
- os.Exit(1)
+ if cfg.ReloadConfig {
+ fileWatcher, err = allocatorWatcher.NewFileWatcher(setupLog.WithName("file-watcher"), configFilePath)
+ if err != nil {
+ setupLog.Error(err, "Can't start the file watcher")
+ os.Exit(1)
+ }
}
signal.Notify(interrupts, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
defer close(interrupts)
@@ -126,19 +128,21 @@ func main() {
}
})
}
- runGroup.Add(
- func() error {
- fileWatcherErr := fileWatcher.Watch(eventChan, errChan)
- setupLog.Info("File watcher exited")
- return fileWatcherErr
- },
- func(_ error) {
- setupLog.Info("Closing file watcher")
- fileWatcherErr := fileWatcher.Close()
- if fileWatcherErr != nil {
- setupLog.Error(fileWatcherErr, "file watcher failed to close")
- }
- })
+ if cfg.ReloadConfig {
+ runGroup.Add(
+ func() error {
+ fileWatcherErr := fileWatcher.Watch(eventChan, errChan)
+ setupLog.Info("File watcher exited")
+ return fileWatcherErr
+ },
+ func(_ error) {
+ setupLog.Info("Closing file watcher")
+ fileWatcherErr := fileWatcher.Close()
+ if fileWatcherErr != nil {
+ setupLog.Error(fileWatcherErr, "file watcher failed to close")
+ }
+ })
+ }
runGroup.Add(
func() error {
discoveryManagerErr := discoveryManager.Run()
From 9d6fff70dcc73e9a210ec03d4f81a58230d8dfeb Mon Sep 17 00:00:00 2001
From: Darren Wang <68258717+changexd@users.noreply.github.com>
Date: Fri, 17 Nov 2023 01:02:43 +0800
Subject: [PATCH 14/34] implement livenessProbe endpoint to target allocator
(#2355)
* add liveness probe endpoint to TA
* add chlog
* reformat a bit
* change liveness probe endpoint to /livez
---
.chloggen/TA-healthcheck.yaml | 16 ++++++++++++++++
cmd/otel-allocator/server/server.go | 5 +++++
cmd/otel-allocator/server/server_test.go | 13 +++++++++++++
3 files changed, 34 insertions(+)
create mode 100755 .chloggen/TA-healthcheck.yaml
diff --git a/.chloggen/TA-healthcheck.yaml b/.chloggen/TA-healthcheck.yaml
new file mode 100755
index 0000000000..7c2f8770c9
--- /dev/null
+++ b/.chloggen/TA-healthcheck.yaml
@@ -0,0 +1,16 @@
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: enhancement
+
+# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
+component: target allocator
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: add healthcheck endpoint to TA
+
+# One or more tracking issues related to the change
+issues: [2258]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext:
diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go
index c9c93951d7..93c8208725 100644
--- a/cmd/otel-allocator/server/server.go
+++ b/cmd/otel-allocator/server/server.go
@@ -88,6 +88,7 @@ func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr strin
router.GET("/jobs", s.JobHandler)
router.GET("/jobs/:job_id/targets", s.TargetsHandler)
router.GET("/metrics", gin.WrapH(promhttp.Handler()))
+ router.GET("/livez", s.LivenessProbeHandler)
registerPprof(router.Group("/debug/pprof/"))
s.server = &http.Server{Addr: listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second}
@@ -146,6 +147,10 @@ func (s *Server) JobHandler(c *gin.Context) {
s.jsonHandler(c.Writer, displayData)
}
+func (s *Server) LivenessProbeHandler(c *gin.Context) {
+ c.Status(http.StatusOK)
+}
+
func (s *Server) PrometheusMiddleware(c *gin.Context) {
path := c.FullPath()
timer := prometheus.NewTimer(httpDuration.WithLabelValues(path))
diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go
index 975df83acf..1a1e99150d 100644
--- a/cmd/otel-allocator/server/server_test.go
+++ b/cmd/otel-allocator/server/server_test.go
@@ -50,6 +50,19 @@ var (
testJobTargetItemTwo = target.NewItem("test-job", "test-url2", testJobLabelSetTwo, "test-collector2")
)
+func TestServer_LivenessProbeHandler(t *testing.T) {
+ leastWeighted, _ := allocation.New("least-weighted", logger)
+ listenAddr := ":8080"
+ s := NewServer(logger, leastWeighted, listenAddr)
+ request := httptest.NewRequest("GET", "/livez", nil)
+ w := httptest.NewRecorder()
+
+ s.server.Handler.ServeHTTP(w, request)
+ result := w.Result()
+
+ assert.Equal(t, http.StatusOK, result.StatusCode)
+}
+
func TestServer_TargetsHandler(t *testing.T) {
leastWeighted, _ := allocation.New("least-weighted", logger)
type args struct {
From 3b6cf2cbcd17f212b33e65ec22d865d2cf49119f Mon Sep 17 00:00:00 2001
From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com>
Date: Thu, 16 Nov 2023 18:43:44 +0100
Subject: [PATCH 15/34] Added updateStrategy to DaemonSet mode (#2305)
* Added updateStrategy to DaemonSet mode
Signed-off-by: Yuri Sa
* Added updateStrategy to DaemonSet mode
Signed-off-by: Yuri Sa
* Added updateStrategy to DaemonSet mode
Signed-off-by: Yuri Sa
Added updateStrategy to DaemonSet mode
Signed-off-by: Yuri Sa
* Added webhooks test for DaemonSet Mode
Signed-off-by: Yuri Sa
---------
Signed-off-by: Yuri Sa
---
.chloggen/add-updatestrategy.yaml | 16 ++++
apis/v1alpha1/collector_webhook.go | 5 ++
apis/v1alpha1/collector_webhook_test.go | 17 +++++
apis/v1alpha1/opentelemetrycollector_types.go | 6 ++
apis/v1alpha1/zz_generated.deepcopy.go | 1 +
...ntelemetry.io_opentelemetrycollectors.yaml | 30 ++++++++
...ntelemetry.io_opentelemetrycollectors.yaml | 30 ++++++++
docs/api.md | 75 +++++++++++++++++++
internal/manifests/collector/daemonset.go | 1 +
.../manifests/collector/daemonset_test.go | 70 +++++++++++++++++
tests/e2e/smoke-daemonset/00-assert.yaml | 14 ++++
tests/e2e/smoke-daemonset/00-install.yaml | 24 ++++++
12 files changed, 289 insertions(+)
create mode 100755 .chloggen/add-updatestrategy.yaml
create mode 100644 tests/e2e/smoke-daemonset/00-assert.yaml
create mode 100644 tests/e2e/smoke-daemonset/00-install.yaml
diff --git a/.chloggen/add-updatestrategy.yaml b/.chloggen/add-updatestrategy.yaml
new file mode 100755
index 0000000000..1b3b3b317d
--- /dev/null
+++ b/.chloggen/add-updatestrategy.yaml
@@ -0,0 +1,16 @@
+# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
+change_type: 'enhancement'
+
+# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
+component: operator
+
+# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Added updateStrategy for DaemonSet mode.
+
+# One or more tracking issues related to the change
+issues: [2107]
+
+# (Optional) One or more lines of additional information to render under the primary note.
+# These lines will be padded with 2 spaces and then inserted directly into the document.
+# Use pipe (|) for multiline entries.
+subtext:
diff --git a/apis/v1alpha1/collector_webhook.go b/apis/v1alpha1/collector_webhook.go
index cc61f72b59..7b0cefddfa 100644
--- a/apis/v1alpha1/collector_webhook.go
+++ b/apis/v1alpha1/collector_webhook.go
@@ -295,6 +295,11 @@ func (c CollectorWebhook) validate(r *OpenTelemetryCollector) (admission.Warning
}
}
+ // validate updateStrategy for DaemonSet
+ if r.Spec.Mode != ModeDaemonSet && len(r.Spec.UpdateStrategy.Type) > 0 {
+ return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'updateStrategy'", r.Spec.Mode)
+ }
+
return warnings, nil
}
diff --git a/apis/v1alpha1/collector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go
index 0f23134717..8ccc26bb11 100644
--- a/apis/v1alpha1/collector_webhook_test.go
+++ b/apis/v1alpha1/collector_webhook_test.go
@@ -22,6 +22,7 @@ import (
"github.com/go-logr/logr"
"github.com/stretchr/testify/assert"
+ appsv1 "k8s.io/api/apps/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
@@ -766,6 +767,22 @@ func TestOTELColValidatingWebhook(t *testing.T) {
},
expectedErr: "a valid Ingress hostname has to be defined for subdomain ruleType",
},
+ {
+ name: "invalid updateStrategy for Deployment mode",
+ otelcol: OpenTelemetryCollector{
+ Spec: OpenTelemetryCollectorSpec{
+ Mode: ModeDeployment,
+ UpdateStrategy: appsv1.DaemonSetUpdateStrategy{
+ Type: "RollingUpdate",
+ RollingUpdate: &appsv1.RollingUpdateDaemonSet{
+ MaxSurge: &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)},
+ MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)},
+ },
+ },
+ },
+ },
+ expectedErr: "the OpenTelemetry Collector mode is set to deployment, which does not support the attribute 'updateStrategy'",
+ },
}
for _, test := range tests {
diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go
index ab5cc54bde..6f08afb9ef 100644
--- a/apis/v1alpha1/opentelemetrycollector_types.go
+++ b/apis/v1alpha1/opentelemetrycollector_types.go
@@ -15,6 +15,7 @@
package v1alpha1
import (
+ appsv1 "k8s.io/api/apps/v1"
autoscalingv2 "k8s.io/api/autoscaling/v2"
v1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
@@ -275,6 +276,11 @@ type OpenTelemetryCollectorSpec struct {
// object, which shall be mounted into the Collector Pods.
// Each ConfigMap will be added to the Collector's Deployments as a volume named `configmap-`.
ConfigMaps []ConfigMapsSpec `json:"configmaps,omitempty"`
+ // UpdateStrategy represents the strategy the operator will take replacing existing DaemonSet pods with new pods
+ // https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec
+ // This is only applicable to Daemonset mode.
+ // +optional
+ UpdateStrategy appsv1.DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
}
// OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator.
diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go
index a69ec8774a..05890e08a9 100644
--- a/apis/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/v1alpha1/zz_generated.deepcopy.go
@@ -911,6 +911,7 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp
*out = make([]ConfigMapsSpec, len(*in))
copy(*out, *in)
}
+ in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec.
diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml
index 94b00968cf..9ba4074582 100644
--- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml
+++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml
@@ -5320,6 +5320,36 @@ spec:
- whenUnsatisfiable
type: object
type: array
+ updateStrategy:
+ description: UpdateStrategy represents the strategy the operator will
+ take replacing existing DaemonSet pods with new pods https://kubernetes.
+ properties:
+ rollingUpdate:
+ description: 'Rolling update config params. Present only if type
+ = "RollingUpdate". --- TODO: Update this to follow our convention
+ for oneOf, whatever we decide it to be. Same as Deployment `strategy.'
+ properties:
+ maxSurge:
+ anyOf:
+ - type: integer
+ - type: string
+ description: The maximum number of nodes with an existing
+ available DaemonSet pod that can have an updated DaemonSet
+ pod during during an update.
+ x-kubernetes-int-or-string: true
+ maxUnavailable:
+ anyOf:
+ - type: integer
+ - type: string
+ description: The maximum number of DaemonSet pods that can
+ be unavailable during the update.
+ x-kubernetes-int-or-string: true
+ type: object
+ type:
+ description: Type of daemon set update. Can be "RollingUpdate"
+ or "OnDelete". Default is RollingUpdate.
+ type: string
+ type: object
upgradeStrategy:
description: UpgradeStrategy represents how the operator will handle
upgrades to the CR when a newer version of the operator is deployed
diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml
index 48a1ace9c6..de4a47805e 100644
--- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml
+++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml
@@ -5317,6 +5317,36 @@ spec:
- whenUnsatisfiable
type: object
type: array
+ updateStrategy:
+ description: UpdateStrategy represents the strategy the operator will
+ take replacing existing DaemonSet pods with new pods https://kubernetes.
+ properties:
+ rollingUpdate:
+ description: 'Rolling update config params. Present only if type
+ = "RollingUpdate". --- TODO: Update this to follow our convention
+ for oneOf, whatever we decide it to be. Same as Deployment `strategy.'
+ properties:
+ maxSurge:
+ anyOf:
+ - type: integer
+ - type: string
+ description: The maximum number of nodes with an existing
+ available DaemonSet pod that can have an updated DaemonSet
+ pod during during an update.
+ x-kubernetes-int-or-string: true
+ maxUnavailable:
+ anyOf:
+ - type: integer
+ - type: string
+ description: The maximum number of DaemonSet pods that can
+ be unavailable during the update.
+ x-kubernetes-int-or-string: true
+ type: object
+ type:
+ description: Type of daemon set update. Can be "RollingUpdate"
+ or "OnDelete". Default is RollingUpdate.
+ type: string
+ type: object
upgradeStrategy:
description: UpgradeStrategy represents how the operator will handle
upgrades to the CR when a newer version of the operator is deployed
diff --git a/docs/api.md b/docs/api.md
index c3761bd934..22425e911f 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -9677,6 +9677,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.
TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined top
|
false |
+