From e4e890dbfc2b810a141f8933bbb5ec821bda479c Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Thu, 11 Jul 2024 07:30:16 -0600 Subject: [PATCH] Check if custom certs are enabled before use service cert Signed-off-by: Ruben Vargas --- internal/manifests/distributor/distributor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/manifests/distributor/distributor.go b/internal/manifests/distributor/distributor.go index a2a0ff7b6..2dbeaf020 100644 --- a/internal/manifests/distributor/distributor.go +++ b/internal/manifests/distributor/distributor.go @@ -44,7 +44,8 @@ func BuildDistributor(params manifestutils.Params) ([]client.Object, error) { objects := []client.Object{dep, distributorService} if tempo.Spec.Template.Distributor.TLS.Enabled { - if params.CtrlConfig.Gates.OpenShift.ServingCertsService { + if params.CtrlConfig.Gates.OpenShift.ServingCertsService && tempo.Spec.Template.Distributor.TLS.CA == "" && + tempo.Spec.Template.Distributor.TLS.Cert == "" { caSecretName := naming.ServingCABundleName(tempo.Name) certSecretName := naming.ServingCertName(manifestutils.DistributorComponentName, tempo.Name) err = configureReceiversTLS(dep, caSecretName, certSecretName)