From eb9bda2a3cce9406c7cd74bac36616b4b1846742 Mon Sep 17 00:00:00 2001 From: Subbarao Meduri Date: Fri, 29 Sep 2023 09:22:55 -0400 Subject: [PATCH] add tlsSecretMountPath for tlsSecretName (#1247) (#1248) Signed-off-by: David Luong Co-authored-by: David Luong <32136994+rh-dluong@users.noreply.github.com> --- .../api/shared/multiclusterobservability_shared.go | 3 +++ ...er-management.io_multiclusterobservabilities.yaml | 9 +++++++++ ...er-management.io_multiclusterobservabilities.yaml | 12 ++++++++++++ .../multiclusterobservability/observatorium.go | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/operators/multiclusterobservability/api/shared/multiclusterobservability_shared.go b/operators/multiclusterobservability/api/shared/multiclusterobservability_shared.go index 60258c2ca..b395aa033 100644 --- a/operators/multiclusterobservability/api/shared/multiclusterobservability_shared.go +++ b/operators/multiclusterobservability/api/shared/multiclusterobservability_shared.go @@ -42,6 +42,9 @@ type PreConfiguredStorage struct { // TLS secret contains the custom certificate for the object store // +optional TLSSecretName string `json:"tlsSecretName,omitempty"` + // TLS secret mount path for the custom certificate for the object store + // +optional + TLSSecretMountPath string `json:"tlsSecretMountPath,omitempty"` // serviceAccountProjection indicates whether mount service account token to thanos pods. Default is false. // +optional ServiceAccountProjection bool `json:"serviceAccountProjection,omitempty"` diff --git a/operators/multiclusterobservability/bundle/manifests/observability.open-cluster-management.io_multiclusterobservabilities.yaml b/operators/multiclusterobservability/bundle/manifests/observability.open-cluster-management.io_multiclusterobservabilities.yaml index d75f1333d..766c92a48 100644 --- a/operators/multiclusterobservability/bundle/manifests/observability.open-cluster-management.io_multiclusterobservabilities.yaml +++ b/operators/multiclusterobservability/bundle/manifests/observability.open-cluster-management.io_multiclusterobservabilities.yaml @@ -133,6 +133,9 @@ spec: tlsSecretName: description: TLS secret contains the custom certificate for the object store type: string + tlsSecretMountPath: + description: TLS secret mount path for the custom certificate for the object store + type: string required: - key - name @@ -748,6 +751,9 @@ spec: tlsSecretName: description: TLS secret contains the custom certificate for the object store type: string + tlsSecretMountPath: + description: TLS secret mount path for the custom certificate for the object store + type: string required: - key - name @@ -781,6 +787,9 @@ spec: tlsSecretName: description: TLS secret contains the custom certificate for the object store type: string + tlsSecretMountPath: + description: TLS secret mount path for the custom certificate for the object store + type: string required: - key - name diff --git a/operators/multiclusterobservability/config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml b/operators/multiclusterobservability/config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml index d9aeb5945..e4955a89b 100644 --- a/operators/multiclusterobservability/config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml +++ b/operators/multiclusterobservability/config/crd/bases/observability.open-cluster-management.io_multiclusterobservabilities.yaml @@ -142,6 +142,10 @@ spec: description: TLS secret contains the custom certificate for the object store type: string + tlsSecretMountPath: + description: TLS secret mount path for the custom certificate for + the object store + type: string required: - key - name @@ -894,6 +898,10 @@ spec: description: TLS secret contains the custom certificate for the object store type: string + tlsSecretMountPath: + description: TLS secret mount path for the custom certificate for + the object store + type: string required: - key - name @@ -935,6 +943,10 @@ spec: description: TLS secret contains the custom certificate for the object store type: string + tlsSecretMountPath: + description: TLS secret mount path for the custom certificate + for the object store + type: string required: - key - name diff --git a/operators/multiclusterobservability/controllers/multiclusterobservability/observatorium.go b/operators/multiclusterobservability/controllers/multiclusterobservability/observatorium.go index c0c68ba27..8812cddb9 100644 --- a/operators/multiclusterobservability/controllers/multiclusterobservability/observatorium.go +++ b/operators/multiclusterobservability/controllers/multiclusterobservability/observatorium.go @@ -279,7 +279,7 @@ func newDefaultObservatoriumSpec(cl client.Client, mco *mcov1beta2.MultiClusterO obs.ObjectStorageConfig.Thanos.Name = objStorageConf.Name obs.ObjectStorageConfig.Thanos.Key = objStorageConf.Key obs.ObjectStorageConfig.Thanos.TLSSecretName = objStorageConf.TLSSecretName - obs.ObjectStorageConfig.Thanos.TLSSecretMountPath = tlsSecretMountPath + obs.ObjectStorageConfig.Thanos.TLSSecretMountPath = objStorageConf.TLSSecretMountPath obs.ObjectStorageConfig.Thanos.ServiceAccountProjection = mco.Spec.StorageConfig.MetricObjectStorage.ServiceAccountProjection }