terraform-provider-rancher2 icon indicating copy to clipboard operation
terraform-provider-rancher2 copied to clipboard

rancher2_cluster_logging resource doesn’t configure log streaming

Open empeekdev opened this issue 3 years ago • 1 comments

Rancher Server Setup

  • Rancher version: 2.6.3
  • Installation option: Helm Chart
  • If Helm Chart, Kubernetes Cluster and version: RKE1
  • Proxy/Cert Details:

Cluster info:

  • Kube version: v1.20.12
  • Cluster type: custom downstream cluster based on EC2 instances.

Hi, we used rancher2_cluster_logging terraform resource to configure log streaming to AWS Opensearch from one of the downstream clusters. terraform apply finished without any issues, but there are no logging configurations in that downstream cluster, and cluster-logging namespace is empty now. At the same moment, local cluster has fluentd related pods in cluster-logging namespace and they are successfully sending logs to OpenSearch.

We’ve checked v3/clusters/foobar/clusterloggings endpoint, and we are found something:

"data": [
      {
      "annotations": { },
      "appliedSpec": {
      "clusterId": "",
      "enableJSONParsing": false,
      "includeSystemComponent": true,
      "outputFlushInterval": 60,
      "type": "/v3/schemas/clusterLoggingSpec"
      },
      "baseType": "clusterLogging",
      "clusterId": "foobar"
      "conditions": [
      {
              "lastUpdateTime": "2022-02-22T12:45:40Z",
              "message": "tls handshake opensearch.foobar.com failed: dial tcp: address opensearch.foobar.com: missing port in address",
              "status": "False",
              "type": "Updated"
      }
],

empeekdev avatar Feb 22 '22 13:02 empeekdev

I think rancher2_cluster_logging might be deprecated. You need to use "rancher2_app_v2" "rancher-logging" rancher-logging

But that will only install the logging plugin not the configuration of it.

mikekuzak avatar Mar 25 '22 11:03 mikekuzak