<commit_before>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "polyaxon.fullname" . }}-api
  annotations:
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    checksum/config: {{ include (print $.Template.BasePath "/cm.yaml") . | sha256sum }}
    checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
  labels:
    app: {{ template "polyaxon.fullname" . }}-api
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
    type: {{ .Values.types.core }}
    role: {{ .Values.roles.api }}
spec:
  replicas: {{ .Values.api.replicas }}
  template:
    metadata:
      annotations:
        chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
        checksum/config: {{ include (print $.Template.BasePath "/cm.yaml") . | sha256sum }}
        checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
      labels:
        app: {{ template "polyaxon.fullname" . }}-api
        release: "{{ .Release.Name }}"
        type: {{ .Values.types.core }}
        role: {{ .Values.roles.api }}
    spec:
      {{- if .Values.nodeSelectors.core }}
      nodeSelector:
{{ toYaml .Values.nodeSelectors.core | indent 8 }}
      {{- end }}
      {{- if .Values.affinity.core }}
      affinity:
{{ toYaml .Values.affinity.core | indent 8 }}
      {{- end }}
      {{- if .Values.tolerations.core }}
      tolerations:
{{ toYaml .Values.tolerations.core | indent 8 }}
      {{- end }}
      serviceAccountName: {{ template "polyaxon.fullname" . }}-serviceaccount
      containers:
      - name: {{ .Chart.Name }}-api
        image: "{{ .Values.api.image }}:{{ .Values.api.imageTag }}"
        imagePullPolicy: {{ .Values.api.imagePullPolicy }}
        ports:
        - containerPort: {{ .Values.api.service.internalPort }}
        envFrom:
        - configMapRef:
            name: {{ template "polyaxon.fullname" . }}-config
        - secretRef:
            name: {{ template "polyaxon.fullname" . }}-secret
        env:
{{ include "config.envs" . | indent 8 }}
{{ include "config.persistence.outputs" . | indent 8 }}
{{ include "config.persistence.data" . | indent 8 }}
{{ include "config.persistence.logs" . | indent 8 }}
{{ include "config.persistence.upload" . | indent 8 }}
{{ include "config.persistence.repos" . | indent 8 }}
{{ include "config.storesSecrets.outputs" . | indent 8 }}
        volumeMounts:
{{ include "volumes.volumeMounts.logs" . | indent 8}}
{{ include "volumes.volumeMounts.outputs" . | indent 8}}
{{ include "volumes.volumeMounts.repos" . | indent 8}}
{{ include "volumes.volumeMounts.upload" . | indent 8}}
{{ include "volumes.dirMounts" . | indent 8}}
        livenessProbe:
          failureThreshold: 10
          httpGet:
            path: /_health/
            port: {{ .Values.api.service.internalPort }}
            scheme: HTTP
          initialDelaySeconds: 100
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 2
        readinessProbe:
          failureThreshold: 30
          httpGet:
            path: /_health/
            port: {{ .Values.api.service.internalPort }}
            scheme: HTTP
          initialDelaySeconds: 150
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 2
        resources:
          requests:
{{ toYaml .Values.api.resources.requests | indent 12 }}
          {{- if .Values.limitResources }}
          limits:
{{ toYaml .Values.api.resources.limits | indent 12 }}
          {{- end }}
      - name: {{ .Chart.Name }}-streams
        image: "{{ .Values.streams.image }}:{{ .Values.streams.imageTag }}"
        imagePullPolicy: {{ .Values.streams.imagePullPolicy }}
        ports:
        - containerPort: {{ .Values.streams.service.internalPort }}
        envFrom:
        - configMapRef:
            name: {{ template "polyaxon.fullname" . }}-config
        - secretRef:
            name: {{ template "polyaxon.fullname" . }}-secret
        env:
{{ include "config.envs" . | indent 8 }}
        livenessProbe:
          failureThreshold: 10
          httpGet:
            path: /_health/
            port: {{ .Values.streams.service.internalPort }}
            scheme: HTTP
          initialDelaySeconds: 100
          periodSeconds: 30<commit_msg>Add host header for case when using whitelisted hosts<commit_after>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "polyaxon.fullname" . }}-api
  annotations:
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    checksum/config: {{ include (print $.Template.BasePath "/cm.yaml") . | sha256sum }}
    checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
  labels:
    app: {{ template "polyaxon.fullname" . }}-api
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
    type: {{ .Values.types.core }}
    role: {{ .Values.roles.api }}
spec:
  replicas: {{ .Values.api.replicas }}
  template:
    metadata:
      annotations:
        chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
        checksum/config: {{ include (print $.Template.BasePath "/cm.yaml") . | sha256sum }}
        checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
      labels:
        app: {{ template "polyaxon.fullname" . }}-api
        release: "{{ .Release.Name }}"
        type: {{ .Values.types.core }}
        role: {{ .Values.roles.api }}
    spec:
      {{- if .Values.nodeSelectors.core }}
      nodeSelector:
{{ toYaml .Values.nodeSelectors.core | indent 8 }}
      {{- end }}
      {{- if .Values.affinity.core }}
      affinity:
{{ toYaml .Values.affinity.core | indent 8 }}
      {{- end }}
      {{- if .Values.tolerations.core }}
      tolerations:
{{ toYaml .Values.tolerations.core | indent 8 }}
      {{- end }}
      serviceAccountName: {{ template "polyaxon.fullname" . }}-serviceaccount
      containers:
      - name: {{ .Chart.Name }}-api
        image: "{{ .Values.api.image }}:{{ .Values.api.imageTag }}"
        imagePullPolicy: {{ .Values.api.imagePullPolicy }}
        ports:
        - containerPort: {{ .Values.api.service.internalPort }}
        envFrom:
        - configMapRef:
            name: {{ template "polyaxon.fullname" . }}-config
        - secretRef:
            name: {{ template "polyaxon.fullname" . }}-secret
        env:
{{ include "config.envs" . | indent 8 }}
{{ include "config.persistence.outputs" . | indent 8 }}
{{ include "config.persistence.data" . | indent 8 }}
{{ include "config.persistence.logs" . | indent 8 }}
{{ include "config.persistence.upload" . | indent 8 }}
{{ include "config.persistence.repos" . | indent 8 }}
{{ include "config.storesSecrets.outputs" . | indent 8 }}
        volumeMounts:
{{ include "volumes.volumeMounts.logs" . | indent 8}}
{{ include "volumes.volumeMounts.outputs" . | indent 8}}
{{ include "volumes.volumeMounts.repos" . | indent 8}}
{{ include "volumes.volumeMounts.upload" . | indent 8}}
{{ include "volumes.dirMounts" . | indent 8}}
        livenessProbe:
          failureThreshold: 10
          httpGet:
            path: /_health/
            port: {{ .Values.api.service.internalPort }}
            scheme: HTTP
            {{- if .Values.allowedHosts }}
            httpHeaders:
              - name: Host
                value: {{ template "polyaxon.fullname" . }}-api
            {{- end }}
          initialDelaySeconds: 60
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 2
        readinessProbe:
          failureThreshold: 30
          httpGet:
            path: /_health/
            port: {{ .Values.api.service.internalPort }}
            scheme: HTTP
            {{- if .Values.allowedHosts }}
            httpHeaders:
                - name: Host
                  value: {{ template "polyaxon.fullname" . }}-api
            {{- end }}
          initialDelaySeconds: 60
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 2
        resources:
          requests:
{{ toYaml .Values.api.resources.requests | indent 12 }}
          {{- if .Values.limitResources }}
          limits:
{{ toYaml .Values.api.resources.limits | indent 12 }}
          {{- end }}
      - name: {{ .Chart.Name }}-streams
        image: "{{ .Values.streams.image }}:{{ .Values.streams.imageTag }}"
        imagePullPolicy: {{ .Values.streams.imagePullPolicy }}
        ports:
        - containerPort: {{ .Values.streams.service.internalPort }}
        envFrom:
        - configMapRef:
            name: {{ template "polyaxon.fullname" . }}-config
        - secretRef:
            name: {{ template "polyaxon.fullname" . }}-secret
        env:
{{ include "config.envs" . | indent 8 }}
        livenessProbe:
          failureThreshold: 10
          httpGet:
            path: /_health/
            port: {{ .Values.streams.service.internalPort }}
            scheme: HTTP
          initialDelaySeconds: 100
          periodSeconds: 30
{'fraction_non_alphanumeric': 0.15500327011118378, 'fraction_numerical': 0.01264442991061696, 'mean_word_length': 2.102806898884004, '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': '2750303', 'n_tokens_mistral': 2830, 'n_tokens_neox': 2690, 'n_words': 565}