Skip to content

Commit 4093e6d

Browse files
authored
suppot Remotewrite endpoints (observatorium#69)
* support remote write endpoints Signed-off-by: Marco [email protected] * observatorium cr refacotoring Signed-off-by: Marco [email protected] * jb update Signed-off-by: Marco [email protected] * add mountPath in EndpointConfig Signed-off-by: Marco [email protected]
1 parent 6c1bbab commit 4093e6d

File tree

9 files changed

+147
-30
lines changed

9 files changed

+147
-30
lines changed

api/v1alpha1/observatorium_types.go

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ type ReceiversSpec struct {
152152
// How long to retain raw samples on local storage
153153
// +optional
154154
Retention string `json:"retention,omitempty"`
155-
// TenantHeader is the http header for tenant id.
156-
// +optional
157-
TenantHeader string `json:"tenantHeader,omitempty"`
158155
}
159156

160157
type StoreSpec struct {
@@ -306,6 +303,18 @@ type TLS struct {
306303
ReloadInterval string `json:"reloadInterval,omitempty"`
307304
}
308305

306+
// EndpointsConfig contains the configuration for all endpoints
307+
type EndpointsConfig struct {
308+
// Secret name for the endpoints configuration
309+
EndpointsConfigSecret string `json:"endpointsConfigSecret"`
310+
// Secret list to be mounted
311+
// +optional
312+
MountSecrets []string `json:"mountSecrets,omitempty"`
313+
// Mount path for the secrets
314+
// +optional
315+
MountPath string `json:"mountPath,omitempty"`
316+
}
317+
309318
type APISpec struct {
310319
// API image
311320
Image string `json:"image,omitempty"`
@@ -327,12 +336,9 @@ type APISpec struct {
327336
// ServiceMonitor enables servicemonitor.
328337
// +optional
329338
ServiceMonitor bool `json:"serviceMonitor,omitempty"`
330-
// WriteEndpoint is the write endpoint.
331-
// +optional
332-
WriteEndpoint string `json:"writeEndpoint,omitempty"`
333-
// TenantHeader is the http header for tenant id.
339+
// AdditionalWriteEndpoints is a slice of additional write endpoint for the Observatorium API.
334340
// +optional
335-
TenantHeader string `json:"tenantHeader,omitempty"`
341+
AdditionalWriteEndpoints *EndpointsConfig `json:"additionalWriteEndpoints,omitempty"`
336342
}
337343

338344
type QuerySpec struct {

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonnet/jsonnetfile.lock.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"subdir": "jsonnet/lib"
99
}
1010
},
11-
"version": "c8691fa6eb610fc88b877069304be0320393caac",
12-
"sum": "PeiropwPLWC8g7o0xaH0clwLoYHTngNJKtaTaEh+hc0=",
11+
"version": "b3a191802b501fb6051e73f2f986240e1e406be4",
12+
"sum": "22T84MojWGsw3EoXp8Ag3zP4rRucp1IpP5aC5umFqnY=",
1313
"name": "observatorium-api"
1414
},
1515
{
@@ -19,7 +19,7 @@
1919
"subdir": "configuration"
2020
}
2121
},
22-
"version": "60bbf7ac4baac885449866d07ffdce30047330f4",
22+
"version": "e17d1d9cb34615a292aa23e46c8a964109014d27",
2323
"sum": "IHlHbcCdcJlnwCjfpNP2BNeIZRPHYjRei5bxvHV9xsA="
2424
},
2525
{
@@ -40,7 +40,7 @@
4040
"subdir": "jsonnet"
4141
}
4242
},
43-
"version": "21b9125fa700ce2f2472caef720086179329b33e",
43+
"version": "098c31ad09f7eab87796b7f91e5caddc6c41bd60",
4444
"sum": "0FKabnXd0rMeu8YpkkopEOknqBf5PLq/DIIDd0ve7cU=",
4545
"name": "up"
4646
},
@@ -61,8 +61,8 @@
6161
"subdir": "jsonnet/lib"
6262
}
6363
},
64-
"version": "50ffaec20114a46691d549bf3a881c42fba4e8e3",
65-
"sum": "FNZlZ8ImUS/MhQhtFqOOiLKxG6+g1cx2TIJNFf1ONF0="
64+
"version": "2df9e7bc65394014cc7a1b61f37e0f8837f9ac91",
65+
"sum": "axYSi0irj4BhHKYqQ9U575vNaX1Xo8IapJ/BpQUuzQI="
6666
},
6767
{
6868
"source": {
@@ -71,8 +71,8 @@
7171
"subdir": "jsonnet/kube-thanos"
7272
}
7373
},
74-
"version": "55d79c62ffbf39c7a8f5973e5bf6421944b3aea6",
75-
"sum": "K3y2JG3FCgXv3zuiaUl2BIfwODpahnb9wphykDreoyI=",
74+
"version": "6328583a623765ed6ebf18064a301104def57420",
75+
"sum": "9XtRX02CoqEIb2BHJ0nDhuV6VvncFBanwQRFd60qYGg=",
7676
"name": "upstream-kube-thanos"
7777
}
7878
],

jsonnet/vendor/github.com/observatorium/api/jsonnet/lib/observatorium-api.libsonnet

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonnet/vendor/github.com/stolostron/observatorium/jsonnet/lib/observatorium-api.libsonnet

Lines changed: 44 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonnet/vendor/github.com/thanos-io/kube-thanos/jsonnet/kube-thanos/kube-thanos-compact-default-params.libsonnet

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonnet/vendor/github.com/thanos-io/kube-thanos/jsonnet/kube-thanos/kube-thanos-compact.libsonnet

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonnet/vendor/github.com/thanos-io/kube-thanos/jsonnet/kube-thanos/kube-thanos-rule.libsonnet

Lines changed: 25 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/crds/core.observatorium.io_observatoria.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,23 @@ spec:
376376
api:
377377
description: API
378378
properties:
379+
additionalWriteEndpoints:
380+
description: AdditionalWriteEndpoints is a slice of additional write endpoint for the Observatorium API.
381+
properties:
382+
endpointsConfigSecret:
383+
description: Secret name for the endpoints configuration
384+
type: string
385+
mountPath:
386+
description: Mount path for the secrets
387+
type: string
388+
mountSecrets:
389+
description: Secret list to be mounted
390+
items:
391+
type: string
392+
type: array
393+
required:
394+
- endpointsConfigSecret
395+
type: object
379396
image:
380397
description: API image
381398
type: string
@@ -483,9 +500,6 @@ spec:
483500
serviceMonitor:
484501
description: ServiceMonitor enables servicemonitor.
485502
type: boolean
486-
tenantHeader:
487-
description: TenantHeader is the http header for tenant id.
488-
type: string
489503
tenants:
490504
description: Tenants is a slice of tenants for the Observatorium API.
491505
items:
@@ -560,9 +574,6 @@ spec:
560574
version:
561575
description: Version describes the version of API to use.
562576
type: string
563-
writeEndpoint:
564-
description: WriteEndpoint is the write endpoint.
565-
type: string
566577
required:
567578
- rbac
568579
- tenants
@@ -1227,9 +1238,6 @@ spec:
12271238
serviceMonitor:
12281239
description: ServiceMonitor enables servicemonitor.
12291240
type: boolean
1230-
tenantHeader:
1231-
description: TenantHeader is the http header for tenant id.
1232-
type: string
12331241
volumeClaimTemplate:
12341242
description: VolumeClaimTemplate
12351243
properties:

0 commit comments

Comments
 (0)