diff --git a/pkg/kubeserver/models/components_monitor.go b/pkg/kubeserver/models/components_monitor.go index 03c18ac3..503481e0 100644 --- a/pkg/kubeserver/models/components_monitor.go +++ b/pkg/kubeserver/models/components_monitor.go @@ -678,6 +678,11 @@ func (m SMonitorComponentManager) GetHelmValues(cluster *SCluster, setting *api. } if input.Loki.ObjectStoreConfig != nil { objConf := input.Loki.ObjectStoreConfig + s3Proto := "s3" + if !objConf.Insecure { + s3Proto = "https" + } + s3Endpoint := fmt.Sprintf("%s://%s:%s@%s/%s", s3Proto, objConf.AccessKey, objConf.SecretKey, objConf.Endpoint, objConf.Bucket) conf.Loki.Config = &components.LokiConfig{ SchemaConfig: components.LokiConfigSchemaConfig{ Configs: []components.LokiSchemaConfig{ @@ -696,7 +701,8 @@ func (m SMonitorComponentManager) GetHelmValues(cluster *SCluster, setting *api. StorageConfig: components.LokiStorageConfig{ Aws: components.LokiStorageConfigAws{ S3ForcepathStyle: true, - S3: fmt.Sprintf("s3://%s:%s@%s/%s", objConf.AccessKey, objConf.SecretKey, objConf.Endpoint, objConf.Bucket), + S3: s3Endpoint, + Insecure: objConf.Insecure, }, BoltdbShipper: components.LokiStorageConfigBoltdbShipper{ // ActiveIndexDirectory: "/data/loki/boltdb-shipper-active", diff --git a/pkg/kubeserver/templates/components/monitor_promtheus.go b/pkg/kubeserver/templates/components/monitor_promtheus.go index f56428ac..203a13d0 100644 --- a/pkg/kubeserver/templates/components/monitor_promtheus.go +++ b/pkg/kubeserver/templates/components/monitor_promtheus.go @@ -293,10 +293,17 @@ type LokiStorageConfigBoltdbShipper struct { SharedStore string `json:"shared_store"` } +type LokiStorageHTTPConfig struct { + IdleConnTimeout string `json:"idle_conn_timeout"` + ResponseHeaderTimeout string `json:"response_header_timeout"` + InsecureSkipVerify bool `json:"insecure_skip_verify"` +} + type LokiStorageConfigAws struct { // e.g. `s3://plUbSwTzWXi3QsP0B8Ab:Rp40yaVS7NVf4zkrpIU6WANlbxWQTUErSIs1EduG@minio-test.default:9000/loki-bucket` S3 string `json:"s3"` S3ForcepathStyle bool `json:"s3forcepathstyle"` + Insecure bool `json:"insecure"` } type LokiStorageConfig struct {