Skip to content

Commit

Permalink
RHOBS-957: Allow overwriting of Thanos CLI args
Browse files Browse the repository at this point in the history
With this commit we add a new `containers` object to each for the thanos
components advanced configuration. This would allow users to do
fine-grained changes to the thanos container specs. For now, only
overwriting of the CLI arguments are supported.

Signed-off-by: Jacob Baungard Hansen <[email protected]>
  • Loading branch information
jacobbaungard committed Jan 5, 2024
1 parent 2dc20cf commit c3e0fda
Show file tree
Hide file tree
Showing 9 changed files with 8,822 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cicd-scripts/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ else
clusterServerURL=$(kubectl config view -o jsonpath="{.clusters[0].cluster.server}")
app_domain=$(kubectl -n openshift-ingress-operator get ingresscontrollers default -ojsonpath='{.status.domain}')
base_domain="${app_domain#apps.}"
kubectl apply -f ${ROOTDIR}/operators/multiclusterobservability/config/crd/bases
kubectl apply -f ${ROOTDIR}/operators/multiclusterobservability/config/crd/bases --server-side=true
fi

OPTIONSFILE=${ROOTDIR}/tests/resources/options.yaml
Expand Down
2 changes: 1 addition & 1 deletion cicd-scripts/setup-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ deploy_mco_operator() {
cd ${ROOTDIR}/operators/multiclusterobservability/config/manager && kustomize edit set image quay.io/stolostron/multicluster-observability-operator="${IMAGE_REPO}/multicluster-observability-operator:${LATEST_SNAPSHOT}"
fi
cd ${ROOTDIR}
kustomize build ${ROOTDIR}/operators/multiclusterobservability/config/default | kubectl apply -n ${OCM_DEFAULT_NS} -f -
kustomize build ${ROOTDIR}/operators/multiclusterobservability/config/default | kubectl apply -n ${OCM_DEFAULT_NS} --server-side=true -f -

# wait until mco is ready
wait_for_deployment_ready 10 60s ${OCM_DEFAULT_NS} multicluster-observability-operator
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/stolostron/multicluster-observability-operator

go 1.20

replace github.com/stolostron/observatorium-operator => github.com/jacobbaungard/observatorium-operator v0.0.0-20231221095005-6436e62a6f63

require (
github.com/IBM/controller-filtered-cache v0.3.6
github.com/cenkalti/backoff v2.2.1+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,8 @@ github.com/ionos-cloud/sdk-go/v6 v6.1.3 h1:vb6yqdpiqaytvreM0bsn2pXw+1YDvEk2RKSmB
github.com/ionos-cloud/sdk-go/v6 v6.1.3/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME=
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
github.com/jacobbaungard/observatorium-operator v0.0.0-20231221095005-6436e62a6f63 h1:M2XyokcXiVqe49xLXM1kMBUE+kfbSY8b/EtPDphxtM4=
github.com/jacobbaungard/observatorium-operator v0.0.0-20231221095005-6436e62a6f63/go.mod h1:fFyJt9/dkQ1/4NxiW4CjH4lj7brxGlkA4SscxoLfzYY=
github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
Expand Down Expand Up @@ -1772,8 +1774,6 @@ github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
github.com/stolostron/multiclusterhub-operator v0.0.0-20220106205009-2af6f43fd562 h1:ifA576QBRoYFKuym91i5s6orpG1w+G7csDoMxn4FmHE=
github.com/stolostron/multiclusterhub-operator v0.0.0-20220106205009-2af6f43fd562/go.mod h1:bnUDg8gb0adzST1gzFiivscUlXtE3tYbMtoHsW6DHaY=
github.com/stolostron/observatorium-operator v0.0.0-20230411203847-4514321263d1 h1:lSmMIJB1zUS99gc2VpahBNw13bHBejHMMfPPGPyhQt0=
github.com/stolostron/observatorium-operator v0.0.0-20230411203847-4514321263d1/go.mod h1:CqPit+zjsk3vi7XzpB2Xid6nHdy4qV54GfA9a7cfVck=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type AdvancedConfig struct {
ObservatoriumAPI *CommonSpec `json:"observatoriumAPI,omitempty"`
// spec for thanos-query-frontend
// +optional
QueryFrontend *CommonSpec `json:"queryFrontend,omitempty"`
QueryFrontend *QueryFrontendSpec `json:"queryFrontend,omitempty"`
// spec for thanos-query
// +optional
Query *QuerySpec `json:"query,omitempty"`
Expand Down Expand Up @@ -98,6 +98,11 @@ type QuerySpec struct {
// +optional
ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"`

// The container object, provides a way to override parameters of existing containers.
// Currently only the `args` value are overwritten.
// +optional
Containers []corev1.Container `json:"containers,omitempty"`

CommonSpec `json:",inline"`
}

Expand All @@ -107,6 +112,11 @@ type ReceiveSpec struct {
// +optional
ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"`

// The container object, provides a way to override parameters of existing containers.
// Currently only the `args` value are overwritten.
// +optional
Containers []corev1.Container `json:"containers,omitempty"`

CommonSpec `json:",inline"`
}

Expand All @@ -117,6 +127,11 @@ type StoreSpec struct {
ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"`

CommonSpec `json:",inline"`

// The container object, provides a way to override parameters of existing containers.
// Currently only the `args` value are overwritten.
// +optional
Containers []corev1.Container `json:"containers,omitempty"`
}

// Thanos Rule Spec.
Expand All @@ -129,6 +144,11 @@ type RuleSpec struct {
// +optional
ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"`

// The container object, provides a way to override parameters of existing containers.
// Currently only the `args` value are overwritten.
// +optional
Containers []corev1.Container `json:"containers,omitempty"`

CommonSpec `json:",inline"`
}

Expand All @@ -140,6 +160,11 @@ type CompactSpec struct {
// Annotations is an unstructured key value map stored with a service account
// +optional
ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"`

// The container object, provides a way to override parameters of existing containers.
// Currently only the `args` value are overwritten.
// +optional
Containers []corev1.Container `json:"containers,omitempty"`
}

// CacheConfig is the spec of memcached.
Expand All @@ -157,6 +182,16 @@ type CacheConfig struct {
CommonSpec `json:",inline"`
}

// Thanos QueryFrontend Spec.
type QueryFrontendSpec struct {
// The container object, provides a way to override parameters of existing containers.
// Currently only the `args` value are overwritten.
// +optional
Containers []corev1.Container `json:"containers,omitempty"`

CommonSpec `json:",inline"`
}

// RetentionConfig is the spec of retention configurations.
type RetentionConfig struct {
// How long to retain raw samples in a bucket.
Expand Down

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

Loading

0 comments on commit c3e0fda

Please sign in to comment.