Skip to content

Commit

Permalink
Enable tolerations support in elasticsearch config (#1296)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Earls <kearls@redhat.com>
  • Loading branch information
kevinearls authored Nov 12, 2020
1 parent 4b2f557 commit 660a6ff
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 3 deletions.
16 changes: 16 additions & 0 deletions deploy/crds/jaegertracing.io_jaegers_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7325,6 +7325,22 @@ spec:
storageClassName:
type: string
type: object
tolerations:
items:
properties:
effect:
type: string
key:
type: string
operator:
type: string
tolerationSeconds:
format: int64
type: integer
value:
type: string
type: object
type: array
type: object
esIndexCleaner:
properties:
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/jaegertracing/v1/jaeger_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@ type ElasticsearchSpec struct {

// +optional
RedundancyPolicy esv1.RedundancyPolicyType `json:"redundancyPolicy,omitempty"`

// +optional
// +listType=atomic
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
}

// JaegerCassandraCreateSchemaSpec holds the options related to the create-schema batch job
Expand Down
7 changes: 7 additions & 0 deletions pkg/apis/jaegertracing/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion pkg/apis/jaegertracing/v1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkg/storage/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ func (ed *ElasticsearchDeployment) Elasticsearch() *esv1.Elasticsearch {
ManagementState: esv1.ManagementStateManaged,
RedundancyPolicy: ed.Jaeger.Spec.Storage.Elasticsearch.RedundancyPolicy,
Spec: esv1.ElasticsearchNodeSpec{
Image: ed.Jaeger.Spec.Storage.Elasticsearch.Image,
Resources: res,
Image: ed.Jaeger.Spec.Storage.Elasticsearch.Image,
Resources: res,
Tolerations: ed.Jaeger.Spec.Storage.Elasticsearch.Tolerations,
},
Nodes: getNodes(uuid, ed.Jaeger.Spec.Storage.Elasticsearch),
},
Expand Down
1 change: 1 addition & 0 deletions pkg/storage/elasticsearch/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type ElasticsearchNodeSpec struct {
Image string `json:"image,omitempty"`
Resources v1.ResourceRequirements `json:"resources"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Tolerations []v1.Toleration `json:"tolerations,omitempty"`
}

type ElasticsearchRequiredAction string
Expand Down

0 comments on commit 660a6ff

Please sign in to comment.