Distributed logs

Creating a distributed logs cluster

The distributed logs CR represent a distributed logs cluster. When a cluster is configured to use a distributed logs cluster it will forward all logs from different sources to the distributed logs cluster. Under the hood, distributed log cluster use a SGCluster, therefore the distributed log cluster could be receive SQL queries in a postgres-util fashion but not with it.

For more information about distributed log usage please review the Distributed Log Cluster Administration Guide


Kind: SGDistributedLogs

listKind: SGDistributedLogsList

plural: sgdistributedlogs

singular: sgdistributedlogs


Spec

Property Required Updatable Type Default Description
persistentVolume string
Pod’s persistent volume configuration
nonProductionOptions array

Persistent volume

Property Required Updatable Type Default Description
size string
Size of the PersistentVolume set for the pod of the cluster for distributed logs. This size is specified either in Mebibytes, Gibibytes or Tebibytes (multiples of 2^20, 2^30 or 2^40, respectively).
storageClass string default storage class
Name of an existing StorageClass in the Kubernetes cluster, used to create the PersistentVolumes for the instances of the cluster.

Non Production options

The following options should NOT be enabled in a production environment.

Property Required Updatable Type Default Description
disableClusterPodAntiAffinity boolean false

It is a best practice, on non-containerized environments, when running production workloads, to run each database server on a different server (virtual or physical), i.e., not to co-locate more than one database server per host.

The same best practice applies to databases on containers. By default, StackGres will not allow to run more than one StackGres or Distributed Logs pod on a given Kubernetes node. If set to true it will allow more than one StackGres pod per node.

Example:

apiVersion: stackgres.io/v1
kind: SGDistributedLogs
metadata:
  name: distributedlogs
spec:
  persistentVolume:
    size: 10Gi