Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apis/v1alpha1/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func tov1beta1TA(in OpenTelemetryTargetAllocator) v1beta1.TargetAllocatorEmbedde
Image: in.Image,
Enabled: in.Enabled,
Affinity: in.Affinity,
PriorityClassName: in.PriorityClassName,
PrometheusCR: v1beta1.TargetAllocatorPrometheusCR{
Enabled: in.PrometheusCR.Enabled,
ScrapeInterval: in.PrometheusCR.ScrapeInterval,
Expand Down Expand Up @@ -455,6 +456,7 @@ func tov1alpha1TA(in v1beta1.TargetAllocatorEmbedded) OpenTelemetryTargetAllocat
Image: in.Image,
Enabled: in.Enabled,
Affinity: in.Affinity,
PriorityClassName: in.PriorityClassName,
PrometheusCR: OpenTelemetryTargetAllocatorPrometheusCR{
Enabled: in.PrometheusCR.Enabled,
ScrapeInterval: in.PrometheusCR.ScrapeInterval,
Expand Down
1 change: 1 addition & 0 deletions apis/v1alpha1/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ func createTA() OpenTelemetryTargetAllocator {
ServiceAccount: "serviceAccountName",
Image: "custom_image",
Enabled: true,
PriorityClassName: "priority-class",
Affinity: &v1.Affinity{
NodeAffinity: &v1.NodeAffinity{
RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{
Expand Down
4 changes: 4 additions & 0 deletions apis/v1alpha1/opentelemetrycollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ type OpenTelemetryTargetAllocator struct {
// If specified, indicates the pod's scheduling constraints
// +optional
Affinity *v1.Affinity `json:"affinity,omitempty"`
// PriorityClassName specifies the pod priority class.
// The pod priority will be default or zero if there is no default and this is not set.
// +optional
PriorityClassName string `json:"priorityClassName,omitempty"`
// PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval.
// All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces.
// +optional
Expand Down
4 changes: 4 additions & 0 deletions apis/v1beta1/opentelemetrycollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ type TargetAllocatorEmbedded struct {
// If specified, indicates the pod's scheduling constraints
// +optional
Affinity *v1.Affinity `json:"affinity,omitempty"`
// PriorityClassName specifies the pod priority class.
// The pod priority will be default or zero if there is no default and this is not set.
// +optional
PriorityClassName string `json:"priorityClassName,omitempty"`
// PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval.
// All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces.
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3215,6 +3215,8 @@ spec:
type: string
type: object
type: object
priorityClassName:
type: string
prometheusCR:
properties:
enabled:
Expand Down Expand Up @@ -7902,6 +7904,8 @@ spec:
type: string
type: object
type: object
priorityClassName:
type: string
prometheusCR:
properties:
allowNamespaces:
Expand Down
16 changes: 16 additions & 0 deletions docs/api/opentelemetrycollectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -10959,6 +10959,14 @@ for the target allocator workload.<br/>
targetallocator.<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>priorityClassName</b></td>
<td>string</td>
<td>
PriorityClassName specifies the pod priority class.
The pod priority will be default or zero if there is no default and this is not set.<br/>
</td>
<td>false</td>
</tr><tr>
<td><b><a href="#opentelemetrycollectorspectargetallocatorprometheuscr">prometheusCR</a></b></td>
<td>object</td>
Expand Down Expand Up @@ -30876,6 +30884,14 @@ allocation strategy.<br/>
targetallocator.<br/>
</td>
<td>false</td>
</tr><tr>
<td><b>priorityClassName</b></td>
<td>string</td>
<td>
PriorityClassName specifies the pod priority class.
The pod priority will be default or zero if there is no default and this is not set.<br/>
</td>
<td>false</td>
</tr><tr>
<td><b><a href="#opentelemetrycollectorspectargetallocatorprometheuscr-1">prometheusCR</a></b></td>
<td>object</td>
Expand Down
1 change: 1 addition & 0 deletions internal/manifests/collector/targetallocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func TargetAllocator(params manifests.Params) (*v1alpha1.TargetAllocator, error)
ServiceAccount: taSpec.ServiceAccount,
Image: taSpec.Image,
Affinity: taSpec.Affinity,
PriorityClassName: taSpec.PriorityClassName,
SecurityContext: taSpec.SecurityContext,
PodSecurityContext: taSpec.PodSecurityContext,
TopologySpreadConstraints: taSpec.TopologySpreadConstraints,
Expand Down
6 changes: 4 additions & 2 deletions internal/manifests/collector/targetallocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func TestTargetAllocator(t *testing.T) {
ServiceAccount: "serviceAccountName",
Image: "custom_image",
Enabled: true,
PriorityClassName: "priority-class",
Affinity: &v1.Affinity{
NodeAffinity: &v1.NodeAffinity{
RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{
Expand Down Expand Up @@ -198,8 +199,9 @@ func TestTargetAllocator(t *testing.T) {
v1.ResourceMemory: resource.MustParse("128Mi"),
},
},
ServiceAccount: "serviceAccountName",
Image: "custom_image",
ServiceAccount: "serviceAccountName",
Image: "custom_image",
PriorityClassName: "priority-class",
Affinity: &v1.Affinity{
NodeAffinity: &v1.NodeAffinity{
RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{
Expand Down