Skip to content

Commit

Permalink
suppot Remotewrite endpoints (observatorium#69)
Browse files Browse the repository at this point in the history
* 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]
  • Loading branch information
marcolan018 authored Mar 4, 2022
1 parent 6c1bbab commit 4093e6d
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 30 deletions.
22 changes: 14 additions & 8 deletions api/v1alpha1/observatorium_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ type ReceiversSpec struct {
// How long to retain raw samples on local storage
// +optional
Retention string `json:"retention,omitempty"`
// TenantHeader is the http header for tenant id.
// +optional
TenantHeader string `json:"tenantHeader,omitempty"`
}

type StoreSpec struct {
Expand Down Expand Up @@ -306,6 +303,18 @@ type TLS struct {
ReloadInterval string `json:"reloadInterval,omitempty"`
}

// EndpointsConfig contains the configuration for all endpoints
type EndpointsConfig struct {
// Secret name for the endpoints configuration
EndpointsConfigSecret string `json:"endpointsConfigSecret"`
// Secret list to be mounted
// +optional
MountSecrets []string `json:"mountSecrets,omitempty"`
// Mount path for the secrets
// +optional
MountPath string `json:"mountPath,omitempty"`
}

type APISpec struct {
// API image
Image string `json:"image,omitempty"`
Expand All @@ -327,12 +336,9 @@ type APISpec struct {
// ServiceMonitor enables servicemonitor.
// +optional
ServiceMonitor bool `json:"serviceMonitor,omitempty"`
// WriteEndpoint is the write endpoint.
// +optional
WriteEndpoint string `json:"writeEndpoint,omitempty"`
// TenantHeader is the http header for tenant id.
// AdditionalWriteEndpoints is a slice of additional write endpoint for the Observatorium API.
// +optional
TenantHeader string `json:"tenantHeader,omitempty"`
AdditionalWriteEndpoints *EndpointsConfig `json:"additionalWriteEndpoints,omitempty"`
}

type QuerySpec struct {
Expand Down
25 changes: 25 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.

16 changes: 8 additions & 8 deletions jsonnet/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"subdir": "jsonnet/lib"
}
},
"version": "c8691fa6eb610fc88b877069304be0320393caac",
"sum": "PeiropwPLWC8g7o0xaH0clwLoYHTngNJKtaTaEh+hc0=",
"version": "b3a191802b501fb6051e73f2f986240e1e406be4",
"sum": "22T84MojWGsw3EoXp8Ag3zP4rRucp1IpP5aC5umFqnY=",
"name": "observatorium-api"
},
{
Expand All @@ -19,7 +19,7 @@
"subdir": "configuration"
}
},
"version": "60bbf7ac4baac885449866d07ffdce30047330f4",
"version": "e17d1d9cb34615a292aa23e46c8a964109014d27",
"sum": "IHlHbcCdcJlnwCjfpNP2BNeIZRPHYjRei5bxvHV9xsA="
},
{
Expand All @@ -40,7 +40,7 @@
"subdir": "jsonnet"
}
},
"version": "21b9125fa700ce2f2472caef720086179329b33e",
"version": "098c31ad09f7eab87796b7f91e5caddc6c41bd60",
"sum": "0FKabnXd0rMeu8YpkkopEOknqBf5PLq/DIIDd0ve7cU=",
"name": "up"
},
Expand All @@ -61,8 +61,8 @@
"subdir": "jsonnet/lib"
}
},
"version": "50ffaec20114a46691d549bf3a881c42fba4e8e3",
"sum": "FNZlZ8ImUS/MhQhtFqOOiLKxG6+g1cx2TIJNFf1ONF0="
"version": "2df9e7bc65394014cc7a1b61f37e0f8837f9ac91",
"sum": "axYSi0irj4BhHKYqQ9U575vNaX1Xo8IapJ/BpQUuzQI="
},
{
"source": {
Expand All @@ -71,8 +71,8 @@
"subdir": "jsonnet/kube-thanos"
}
},
"version": "55d79c62ffbf39c7a8f5973e5bf6421944b3aea6",
"sum": "K3y2JG3FCgXv3zuiaUl2BIfwODpahnb9wphykDreoyI=",
"version": "6328583a623765ed6ebf18064a301104def57420",
"sum": "9XtRX02CoqEIb2BHJ0nDhuV6VvncFBanwQRFd60qYGg=",
"name": "upstream-kube-thanos"
}
],
Expand Down

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

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

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

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

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

26 changes: 17 additions & 9 deletions manifests/crds/core.observatorium.io_observatoria.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,23 @@ spec:
api:
description: API
properties:
additionalWriteEndpoints:
description: AdditionalWriteEndpoints is a slice of additional write endpoint for the Observatorium API.
properties:
endpointsConfigSecret:
description: Secret name for the endpoints configuration
type: string
mountPath:
description: Mount path for the secrets
type: string
mountSecrets:
description: Secret list to be mounted
items:
type: string
type: array
required:
- endpointsConfigSecret
type: object
image:
description: API image
type: string
Expand Down Expand Up @@ -483,9 +500,6 @@ spec:
serviceMonitor:
description: ServiceMonitor enables servicemonitor.
type: boolean
tenantHeader:
description: TenantHeader is the http header for tenant id.
type: string
tenants:
description: Tenants is a slice of tenants for the Observatorium API.
items:
Expand Down Expand Up @@ -560,9 +574,6 @@ spec:
version:
description: Version describes the version of API to use.
type: string
writeEndpoint:
description: WriteEndpoint is the write endpoint.
type: string
required:
- rbac
- tenants
Expand Down Expand Up @@ -1227,9 +1238,6 @@ spec:
serviceMonitor:
description: ServiceMonitor enables servicemonitor.
type: boolean
tenantHeader:
description: TenantHeader is the http header for tenant id.
type: string
volumeClaimTemplate:
description: VolumeClaimTemplate
properties:
Expand Down

0 comments on commit 4093e6d

Please sign in to comment.