# This file and its contents are licensed under the Apache License 2.0. # Please see the included NOTICE for copyright information and LICENSE for a copy of the license. dataNodes: 3 # To prevent very long names, we override the name, otherwise it would default to # timescaledb-multinode (the name of the chart) nameOverride: timescaledb image: # Image was built from # https://github.com/timescale/timescaledb-docker-ha repository: timescale/timescaledb-ha tag: pg14.5-ts2.8.0-patroni-static-primary-latest pullPolicy: IfNotPresent # Credentials used by PostgreSQL credentials: accessNode: superuser: big_dick dataNode: superuser: big_dick # Extra custom environment variables. # These should be an EnvVar, as this allows you to inject secrets into the environment # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#envvar-v1-core env: - name: LC_ALL value: C.UTF-8 - name: LANG value: C.UTF-8 - name: PGDATA # This should be a subdirectory of the persistentVolume (if any), as PostgreSQL will need to # fully manage permissions. Also, using /var/lib/postgresql/data is discouraged, as this is # a Docker Volume in many Docker images, which means the data is not actually persisted. value: /var/lib/postgresql/pgdata persistentVolume: enabled: true size: 100G ## database data Persistent Volume Storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning ## If undefined (the default) or set to null, no storageClassName spec is ## set, choosing the default provisioner. (gp2 on AWS, standard on ## GKE, AWS & OpenStack) ## # storageClass: "-" subPath: "" mountPath: "/var/lib/postgresql" annotations: {} accessModes: - ReadWriteOnce resources: {} postgresql: databases: - postgres - scada parameters: max_connections: 300 max_prepared_transactions: 300 effective_cache_size: 96272MB maintenance_work_mem: 2047MB max_worker_processes: 367 max_parallel_workers_per_gather: 32 max_parallel_workers: 64 wal_buffers: 16MB shared_buffers: 32090MB work_mem: 5134kB default_statistics_target: 500 random_page_cost: 1.1 checkpoint_completion_target: 0.9 max_locks_per_transaction: 512 autovacuum_max_workers: 10 autovacuum_naptime: 10 effective_io_concurrency: 256 log_connections: 'on' log_line_prefix: "%t [%p]: [%c-%l] %u@%d,app=%a [%e] " log_min_duration_statement: '1s' log_statement: ddl log_checkpoints: 'on' log_lock_waits: 'on' max_wal_senders: 0 wal_level: minimal fsync: false min_wal_size: 512MB wal_writer_delay: 1000 temp_file_limit: 1GB timescaledb.passfile: '/var/lib/postgresql/.pgpass' synchronous_commit: 'off' timescaledb.enable_2pc: false timescaledb.max_background_workers: 300 timezone: 'Asia/Shanghai' # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector nodeSelector: {} # https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ tolerations: [] # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity affinityTemplate: | podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: topologyKey: "kubernetes.io/hostname" labelSelector: matchLabels: app: {{ template "timescaledb.name" . }} release: {{ .Release.Name | quote }} affinity: {} ## Use an alternate scheduler, e.g. "stork". ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ ## # schedulerName: rbac: # Specifies whether RBAC resources should be created create: true serviceAccount: # Specifies whether a ServiceAccount should be created create: true # The name of the ServiceAccount to use. # If not set and create is true, a name is generated using the fullname template name: