<commit_before>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "vault.fullname" . }}
  labels:
    app: {{ template "vault.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      labels:
        app: {{ template "vault.name" . }}
        release: {{ .Release.Name }}
      annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
    spec:
      containers:
      - name: vault
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        command: ["vault", "server", "-config", "/vault/config/config.json"]
        env:
          - name: VAULT_CACERT
            value: /vault/tls/ca.crt
          - name: VAULT_LOG_LEVEL
            value: {{ .Values.vault.logLevel }}
        envFrom:
        {{- range .Values.vault.customSecrets }}
        - secretRef:
            name: {{ .secretName }}
        {{- end }}
        ports:
        - containerPort: {{ .Values.service.port }}
          name: vault
        - containerPort: {{ add .Values.service.port 1 }}
          name: cluster
        # This probe makes sure Vault is responsive in a HTTPS manner
        # See: https://www.vaultproject.io/api/system/init.html
        livenessProbe:
          httpGet:
            scheme: HTTPS
            path: /v1/sys/init
            port: vault
        # This probe makes sure that only the active Vault instance gets traffic
        # See: https://www.vaultproject.io/api/system/health.html
        readinessProbe:
          httpGet:
            scheme: HTTPS
            path: /v1/sys/health
            port: vault
        securityContext:
          readOnlyRootFilesystem: true
          capabilities:
            add:
            - IPC_LOCK
        volumeMounts:
        - name: vault-config
          mountPath: /vault/config/
        - name: vault-root
          mountPath: /root/
        - name: vault-file
          mountPath: /vault/file
        - name: vault-tls
          mountPath: /vault/tls
        {{- range .Values.vault.customSecrets }}
        - name: {{ .secretName }}
          mountPath: {{ .mountPath }}
        {{- end }}
        resources:
{{ toYaml .Values.resources | indent 10 }}
      - name: vault-unsealer
        image: "{{ .Values.unsealer.image.repository }}:{{ .Values.unsealer.image.tag }}"
        imagePullPolicy: {{ .Values.unsealer.image.pullPolicy }}
        command: ["bank-vaults", "unseal", "--init"]
        args: {{ toJson .Values.unsealer.args }}
        env:
          - name: VAULT_CACERT
            value: /vault/tls/ca.crt
        envFrom:
        {{- range .Values.vault.customSecrets }}
        - secretRef:
            name: {{ .secretName }}
        {{- end }}
        volumeMounts:
        - name: vault-tls
          mountPath: /vault/tls
        resources:
{{ toYaml .Values.resources | indent 10 }}
      - name: vault-configurer
        image: "{{ .Values.unsealer.image.repository }}:{{ .Values.unsealer.image.tag }}"
        imagePullPolicy: {{ .Values.unsealer.image.pullPolicy }}
        command: ["bank-vaults", "configure"]
        args: {{ toJson .Values.unsealer.args }}
        env:
          - name: VAULT_CACERT
            value: /vault/tls/ca.crt
        envFrom:
        {{- range .Values.vault.customSecrets }}
        - secretRef:
            name: {{ .secretName }}
        {{- end }}
        workingDir: /config
        volumeMounts:
        - name: vault-tls
          mountPath: /vault/tls
        - name: vault-config
          mountPath: /config/
        resources:
{{ toYaml .Values.resources | indent 10 }}
      - name: prometheus-statsd-exporter
        image: "prom/statsd-exporter:latest"
        imagePullPolicy: IfNotPresent
        args: ["-statsd.mapping-config=/tmp/statsd-mapping.conf"]
        ports:
        - containerPort: 9102
          name: prometheus
        volumeMounts:
        - name: statsd-mapping
          mountPath: /tmp/
        resources:
{{ toYaml .Values.resources | indent 10 }}
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:<commit_msg>Add plain HTTP support (for bank-vaults-0.2.13)<commit_after>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "vault.fullname" . }}
  labels:
    app: {{ template "vault.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      labels:
        app: {{ template "vault.name" . }}
        release: {{ .Release.Name }}
      annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
    spec:
      containers:
      - name: vault
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        command: ["vault", "server", "-config", "/vault/config/config.json"]
        env:
          - name: VAULT_CACERT
            value: /vault/tls/ca.crt
          - name: VAULT_LOG_LEVEL
            value: {{ .Values.vault.logLevel }}
          - name: VAULT_ADDR
          {{ if .Values.vault.config.listener.tcp.tls_disable }}
            value: http://127.0.0.1:{{ .Values.service.port }}
           {{ else }}
            value: https://127.0.0.1:{{ .Values.service.port }}
           {{ end }}
        envFrom:
        {{- range .Values.vault.customSecrets }}
        - secretRef:
            name: {{ .secretName }}
        {{- end }}
        ports:
        - containerPort: {{ .Values.service.port }}
          name: vault
        - containerPort: {{ add .Values.service.port 1 }}
          name: cluster
        # This probe makes sure Vault is responsive in a HTTPS manner
        # See: https://www.vaultproject.io/api/system/init.html
        livenessProbe:
          httpGet:
            {{ if .Values.vault.config.listener.tcp.tls_disable }}
            scheme: HTTP
            {{ else }}
            scheme: HTTPS
            {{ end }}
            path: /v1/sys/init
            port: vault
        # This probe makes sure that only the active Vault instance gets traffic
        # See: https://www.vaultproject.io/api/system/health.html
        readinessProbe:
          httpGet:
            {{ if .Values.vault.config.listener.tcp.tls_disable }}
            scheme: HTTP
            {{ else }}
            scheme: HTTPS
            {{ end }}
            path: /v1/sys/health
            port: vault
        securityContext:
          readOnlyRootFilesystem: true
          capabilities:
            add:
            - IPC_LOCK
        volumeMounts:
        - name: vault-config
          mountPath: /vault/config/
        - name: vault-root
          mountPath: /root/
        - name: vault-file
          mountPath: /vault/file
        - name: vault-tls
          mountPath: /vault/tls
        {{- range .Values.vault.customSecrets }}
        - name: {{ .secretName }}
          mountPath: {{ .mountPath }}
        {{- end }}
        resources:
{{ toYaml .Values.resources | indent 10 }}
      - name: vault-unsealer
        image: "{{ .Values.unsealer.image.repository }}:{{ .Values.unsealer.image.tag }}"
        imagePullPolicy: {{ .Values.unsealer.image.pullPolicy }}
        command: ["bank-vaults", "unseal", "--init"]
        args: {{ toJson .Values.unsealer.args }}
        env:
          - name: VAULT_CACERT
            value: /vault/tls/ca.crt
          - name: VAULT_ADDR
          {{ if .Values.vault.config.listener.tcp.tls_disable }}
            value: http://127.0.0.1:{{ .Values.service.port }}
           {{ else }}
            value: https://127.0.0.1:{{ .Values.service.port }}
           {{ end }}
        envFrom:
        {{- range .Values.vault.customSecrets }}
        - secretRef:
            name: {{ .secretName }}
        {{- end }}
        volumeMounts:
        - name: vault-tls
          mountPath: /vault/tls
        resources:
{{ toYaml .Values.resources | indent 10 }}
      - name: vault-configurer
        image: "{{ .Values.unsealer.image.repository }}:{{ .Values.unsealer.image.tag }}"
        imagePullPolicy: {{ .Values.unsealer.image.pullPolicy }}
        command: ["bank-vaults", "configure"]
        args: {{ toJson .Values.unsealer.args }}
        env:
          - name: VAULT_CACERT
            value: /vault/tls/ca.crt
          - name: VAULT_ADDR
          {{ if .Values.vault.config.listener.tcp.tls_disable }}
            value: http://127.0.0.1:{{ .Values.service.port }}
           {{ else }}
            value: https://127.0.0.1:{{ .Values.service.port }}
           {{ end }}
        envFrom:
        {{- range .Values.vault.customSecrets }}
        - secretRef:
            name: {{ .secretName }}
        {{- end }}
        workingDir: /config
        volumeMounts:
        - name: vault-tls
          mountPath: /vault/tls
        - name: vault-config
          mountPath: /config/
        resources:
{{ toYaml .Values.resources | indent 10 }}
      - name: prometheus-statsd-exporter
        image: "prom/statsd-exporter:latest"
        imagePullPolicy: IfNotPresent
        args: ["-statsd.mapping-config=/tmp/statsd-mapping.conf"]
        ports:
        - containerPort: 9102
          name: prometheus
        volumeMounts:
        - name: statsd-mapping
          mountPath: /tmp/
        resources:
{{ toYaml .Values.resources | indent 10 }}
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
{'fraction_non_alphanumeric': 0.13537569861312357, 'fraction_numerical': 0.007865866280273236, 'mean_word_length': 1.6826762909494726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 6, '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': '2873391', 'n_tokens_mistral': 2932, 'n_tokens_neox': 2867, 'n_words': 568}