diff --git a/pkg/apis/operator/v1alpha1/tektonresult_types.go b/pkg/apis/operator/v1alpha1/tektonresult_types.go index 53906378f..ef52a40d6 100644 --- a/pkg/apis/operator/v1alpha1/tektonresult_types.go +++ b/pkg/apis/operator/v1alpha1/tektonresult_types.go @@ -71,6 +71,7 @@ type ResultsAPIProperties struct { DBEnableAutoMigration *bool `json:"db_enable_auto_migration,omitempty"` ServerPort *int64 `json:"server_port,omitempty"` PrometheusPort *int64 `json:"prometheus_port,omitempty"` + PrometheusHistogram *bool `json:"prometheus_histogram,omitempty"` LogLevel string `json:"log_level,omitempty"` LogsAPI *bool `json:"logs_api,omitempty"` LogsType string `json:"logs_type,omitempty"` diff --git a/pkg/reconciler/kubernetes/tektonresult/testdata/api-config.yaml b/pkg/reconciler/kubernetes/tektonresult/testdata/api-config.yaml index 4af343ad7..413549f77 100644 --- a/pkg/reconciler/kubernetes/tektonresult/testdata/api-config.yaml +++ b/pkg/reconciler/kubernetes/tektonresult/testdata/api-config.yaml @@ -5,6 +5,7 @@ data: DB_PORT=5432 SERVER_PORT=8080 PROMETHEUS_PORT=9090 + PROMETHEUS_HISTOGRAM=true DB_NAME= DB_SSLMODE=disable DB_ENABLE_AUTO_MIGRATION=true diff --git a/pkg/reconciler/kubernetes/tektonresult/transform_test.go b/pkg/reconciler/kubernetes/tektonresult/transform_test.go index 29b0eee7f..be1a82264 100644 --- a/pkg/reconciler/kubernetes/tektonresult/transform_test.go +++ b/pkg/reconciler/kubernetes/tektonresult/transform_test.go @@ -84,6 +84,8 @@ func Test_updateApiConfig(t *testing.T) { TLSHostnameOverride: "localhostTest", AuthDisable: &boolVal, AuthImpersonate: &boolVal, + PrometheusPort: &intVal, + PrometheusHistogram: &boolVal, LogLevel: "warn", LogsAPI: &boolVal, LogsPath: "/logs/test", @@ -105,7 +107,8 @@ func Test_updateApiConfig(t *testing.T) { assert.Equal(t, cm.Data["config"], `DB_HOST=localhost DB_PORT=5432 SERVER_PORT=12345 -PROMETHEUS_PORT=9090 +PROMETHEUS_PORT=12345 +PROMETHEUS_HISTOGRAM=true DB_NAME=test DB_SSLMODE=enable DB_ENABLE_AUTO_MIGRATION=true