Skip to content

Commit

Permalink
Merge pull request #7 from openshift-cherrypick-robot/cherry-pick-5-t…
Browse files Browse the repository at this point in the history
…o-release-2.1

[release-2.1] Support configure replicationFactor
  • Loading branch information
clyang82 authored Nov 22, 2020
2 parents fa3c061 + f2d343d commit 5f7f07b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha1/observatorium_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ type ReceiversSpec struct {
Version string `json:"version,omitempty"`
// VolumeClaimTemplate
VolumeClaimTemplate VolumeClaimTemplate `json:"volumeClaimTemplate"`
// ReplicationFactor defines the number of copies of every time-series
ReplicationFactor *int32 `json:"replicationFactor,omitempty"`
}

type StoreSpec struct {
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

1 change: 1 addition & 0 deletions jsonnet/operator-config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ cr.spec {
hashrings: hashrings,
objectStorageConfig: thanosObjectStorageConfig,
replicas: if std.objectHas(cr.spec.receivers, 'replicas') then cr.spec.receivers.replicas else default.receivers.replicas,
replicationFactor: if std.objectHas(cr.spec.receivers, 'replicationFactor') then cr.spec.receivers.replicationFactor else 1,
logLevel: 'info',
debug: '',
},
Expand Down
4 changes: 4 additions & 0 deletions manifests/crds/core.observatorium.io_observatoria.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,10 @@ spec:
description: Number of Receiver replicas.
format: int32
type: integer
replicationFactor:
description: ReplicationFactor defines the number of copies of every time-series
format: int32
type: integer
version:
description: Version of Thanos image to be deployed.
type: string
Expand Down

0 comments on commit 5f7f07b

Please sign in to comment.