Skip to content
Snippets Groups Projects
cm.yml 1.56 KiB
Newer Older
{{- range $tier, $tier_map :=  $.Values.picodata.tiers }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ $tier_map.tierName }}-{{ include "picodata.fullname" $ }}
  namespace: {{ $.Release.Namespace | default "default" }}
data:
  config.yaml: |
      cluster:
Artur Sabirov's avatar
Artur Sabirov committed
        name: {{ $.Values.clusterName }}
        tier:
          {{ $tier_map.tierName }}:
            replication_factor: {{ $tier_map.replicationFactor }}
            can_vote: {{ $tier_map.canVote }}
Artur Sabirov's avatar
Artur Sabirov committed
        default_replication_factor: 1
      instance:
        instance_dir: {{ $.Values.picodata.instanceDir }}
        tier: {{ $tier_map.tierName }}
Artur Sabirov's avatar
Artur Sabirov committed
        peer:
        - {{ $tier_map.tierName }}-{{ include "picodata.fullname" $ }}-0.{{ $tier_map.tierName }}-{{ include "picodata.fullname" $ }}-interconnect.{{ $.Release.Namespace }}.svc.cluster.local:{{ include "picodata.binaryTargetPort" $ }}
        http_listen: 0.0.0.0:{{ include "picodata.httpTargetPort" $ }}
        admin_socket: {{ $.Values.picodata.instanceDir }}/admin.sock
        plugin_dir: /var/lib/plugins
        audit: {{ $tier_map.audit | default "null" }}
Artur Sabirov's avatar
Artur Sabirov committed
        shredding: {{ $tier_map.shredding }}
        log:
          level: {{ $tier_map.log.level }}
          destination: {{ $tier_map.log.destination }}
          format: {{ $tier_map.log.format }}
        memtx:
          memory: {{ $tier_map.memtx.memory }}
        vinyl:
          memory: {{ $tier_map.vinyl.memory }}
          cache: {{ $tier_map.vinyl.cache }}
        pg:
          listen: {{ $tier_map.pg.listen | default "null" }}
Artur Sabirov's avatar
Artur Sabirov committed
          ssl: {{ $tier_map.pg.ssl }}
      {{- end }}