<commit_before>{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "barman.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "barman.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "barman.initContainers" -}}
initContainers:
  {{- if .Values.tls.enabled }}
  - name: certificates
    image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
    imagePullPolicy: {{ .Values.image.pullPolicy }}
    command:
      - /bin/bash
      - -c
      - mkdir -p /var/lib/barman/.postgresql/ &&
          cp -f /certs/{postgresql,root}.* /var/lib/barman/.postgresql/ &&
          chown -R barman:barman /var/lib/barman/.postgresql &&
          chmod -R 0600 /var/lib/barman/.postgresql/*
    volumeMounts:
      - mountPath: /var/lib/barman
        name: data
        subPath: data
      - mountPath: /certs/root.crt
        name: secret
        subPath: certs-root.crt
        readOnly: true
      - mountPath: /certs/root.crl
        name: secret
        subPath: certs-root.crl
        readOnly: true
      - mountPath: /certs/postgresql.crt
        name: secret
        subPath: certs-postgresql.crt
        readOnly: true
      - mountPath: /certs/postgresql.key
        name: secret
        subPath: certs-postgresql.key
        readOnly: true
  {{- else }} []
  {{- end }}
{{- end -}}<commit_msg>Update barman initContainers<commit_after>{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "barman.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "barman.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "barman.initContainers" -}}
initContainers:
  {{- if .Values.tls.enabled }}
  - name: certificates
    image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
    imagePullPolicy: {{ .Values.image.pullPolicy }}
    command:
      - /bin/sh
      - -c
      - export dir=/var/lib/barman/.postgresql && 
        mkdir -p ${dir} && 
        cp -f /certs/.* ${dir} && 
        chown -R barman:barman ${dir} && 
        chmod -R 0600 ${dir}/*
    volumeMounts:
      - mountPath: /var/lib/barman
        name: data
        subPath: data
      {{- range $key := keys .Values.tls.files }}
      - mountPath: /certs/{{ $key }}
        name: secret
        subPath: certs-{{ $key }}
        readOnly: true
      {{- end }}
  {{- else }} []
  {{- end }}
{{- end -}}
{'fraction_non_alphanumeric': 0.1770350761085374, 'fraction_numerical': 0.0066181336863004635, 'mean_word_length': 2.233155080213904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7123267', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1017, 'n_words': 249}