Skip to content

Commit

Permalink
adding priority-class for esIndexCleaner and fixing lint error
Browse files Browse the repository at this point in the history
Signed-off-by: Swapnil Potnis <[email protected]>
  • Loading branch information
swapnilpotnis committed Feb 2, 2022
1 parent f990030 commit f9e8d67
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions apis/v1/jaeger_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ type JaegerEsIndexCleanerSpec struct {

// +optional
JaegerCommonSpec `json:",inline,omitempty"`

// +optional
PriorityClassName string `json:"priorityClassName,omitempty"`
}

// JaegerEsRolloverSpec holds the options related to es-rollover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
description: Provides tracing, monitoring and troubleshooting for microservices-based
distributed systems
operators.openshift.io/infrastructure-features: '["disconnected"]'
operators.operatorframework.io/builder: operator-sdk-v1.13.0+git
operators.operatorframework.io/builder: operator-sdk-v1.15.0+git
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/jaegertracing/jaeger-operator
support: Jaeger Community
Expand Down
2 changes: 2 additions & 0 deletions bundle/manifests/jaegertracing.io_jaegers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9828,6 +9828,8 @@ spec:
type: object
numberOfDays:
type: integer
priorityClassName:
type: string
resources:
nullable: true
properties:
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/jaegertracing.io_jaegers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9828,6 +9828,8 @@ spec:
type: object
numberOfDays:
type: integer
priorityClassName:
type: string
resources:
nullable: true
properties:
Expand Down
6 changes: 6 additions & 0 deletions pkg/cronjob/es_index_cleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ func CreateEsIndexCleaner(jaeger *v1.Jaeger) *batchv1beta1.CronJob {

ca.Update(jaeger, commonSpec)

priorityClassName := ""
if jaeger.Spec.Storage.EsIndexCleaner.PriorityClassName != "" {
priorityClassName = jaeger.Spec.Storage.EsIndexCleaner.PriorityClassName
}

return &batchv1beta1.CronJob{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Expand Down Expand Up @@ -88,6 +93,7 @@ func CreateEsIndexCleaner(jaeger *v1.Jaeger) *batchv1beta1.CronJob {
SecurityContext: commonSpec.SecurityContext,
ServiceAccountName: account.JaegerServiceAccountFor(jaeger, account.EsIndexCleanerComponent),
Volumes: commonSpec.Volumes,
PriorityClassName: priorityClassName,
},
ObjectMeta: metav1.ObjectMeta{
Labels: commonSpec.Labels,
Expand Down

0 comments on commit f9e8d67

Please sign in to comment.