<commit_before>apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "estafette-ci-api.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
{{ include "estafette-ci-api.labels" . | indent 4 }}
spec:
  {{- if not .Values.hpa.enabled }}
  replicas: {{ .Values.replicaCount }}
  {{- end }}
  selector:
    matchLabels:
{{ include "estafette-ci-api.selectorLabels" . | indent 6 }}
  template:
    metadata:
      labels:
{{ include "estafette-ci-api.selectorLabels" . | indent 8 }}
        {{- if .Chart.AppVersion }}
        app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
        {{- end }}
        {{- range $key, $value := .Values.extraPodLabels }}
        {{ $key }}: {{ $value }}
        {{- end }}
      annotations:
        {{- if .Values.metrics.enabled }}
        prometheus.io/scrape: {{ .Values.metrics.enabled | quote }}
        prometheus.io/path: {{ .Values.metrics.path | quote }}
        prometheus.io/port: {{ .Values.metrics.port | quote }}
        prometheus.io/scheme: {{ .Values.metrics.scheme | quote }}
        {{- end }}
        {{- with .Values.podAnnotations }}
        {{- toYaml . | nindent 8 }}
        {{- end }}
    spec:
    {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
    {{- end }}
      serviceAccountName: {{ template "estafette-ci-api.serviceAccountName" . }}
      securityContext:
        {{- toYaml .Values.podSecurityContext | nindent 8 }}
      containers:
        - name: {{ .Chart.Name }}
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          {{- with .Values.extraArgs }}
          args:
            {{- toYaml . | nindent 12 }}
          {{- end }}
          ports:
            - containerPort: 5000
              name: web
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /liveness
              port: web
              scheme: HTTP
          {{- if not .Values.openresty.enabled }}
          readinessProbe:
            httpGet:
              path: /readiness
              port: web
              scheme: HTTP
          {{- end }}
          env:
            - name: ESTAFETTE_LOG_FORMAT
              value: {{ .Values.logFormat }}
            - name: "SECRET_DECRYPTION_KEY_BASE64"
              valueFrom:
                secretKeyRef:
                  name: {{ include "estafette-ci-api.fullname" . }}
                  key: decryptionKey
            {{- if .Values.jaeger.enabled }}
            - name: JAEGER_AGENT_HOST
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: status.hostIP
            - name: JAEGER_SAMPLER_MANAGER_HOST_PORT
              value: http://$(JAEGER_AGENT_HOST):5778/sampling
            - name: JAEGER_SAMPLER_TYPE
              value: {{.Values.jaeger.samplerType}}
            - name: JAEGER_SAMPLER_PARAM
              value: "{{.Values.jaeger.samplerParam}}"
            - name: JAEGER_SERVICE_NAME
              value: {{ include "estafette-ci-api.fullname" . }}
            {{- else }}
            - name: JAEGER_DISABLED
              value: 'true'
            {{- end }}
            {{- range $key, $value := .Values.extraEnv }}
            - name: {{ $key }}
              value: {{ $value }}
            {{- end }}
          lifecycle:
            preStop:
              exec:
                command:
                - /bin/sleep
                - 15s
          resources:
          {{- toYaml .Values.resources | nindent 12 }}
          volumeMounts:
          - name: configs
            mountPath: /configs
        {{- if .Values.openresty.enabled }}
        - name: {{ .Chart.Name }}-openresty
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: "{{ .Values.openresty.image.repository }}{{ if .Values.openresty.image.tagIsSha256 }}@sha256{{ end }}:{{.Values.openresty.image.tag}}"
          imagePullPolicy: {{ .Values.openresty.image.pullPolicy }}
          env:
            - name: OFFLOAD_TO_HOST
              value: 127.0.0.1
            - name: OFFLOAD_TO_PORT
              value: "5000"
            - name: SERVICE_NAME
              value: {{ include "estafette-ci-api.fullname" . }}
            - name: NAMESPACE
              value: {{ .Release.Namespace }}
            - name: HEALT_CHECK_PATH
              value: /readiness
            - name: CLIENT_BODY_BUFFER_SIZE
              value: {{.Values.openresty.clientBodyBufferSize | quote }}
            - name: CLIENT_BODY_TIMEOUT
              value: {{.Values.openresty.clientBodyTimeout | quote }}
            - name: CLIENT_HEADER_TIMEOUT
              value: {{.Values.openresty.clientHeaderTimeout | quote }}
            - name: CLIENT_MAX_BODY_SIZE
              value: {{.Values.openresty.clientMaxBodySize | quote }}
            - name: GRACEFUL_SHUTDOWN_DELAY_SECONDS
              value: {{.Values.openresty.gracefulShutdownDelaySeconds | quote }}
            - name: PROXY_BUFFERS_NUMBER
              value: {{.Values.openresty.proxyBuffersNumber | quote }}
            - name: PROXY_BUFFERS_SIZE
              value: {{.Values.openresty.proxyBuffersSize | quote }}
            - name: PROXY_BUFFER_SIZE
              value: {{.Values.openresty.proxyBufferSize | quote }}
            - name: PROXY_CONNECT_TIMEOUT
              value: {{.Values.openresty.proxyConnectTimeout | quote }}
            - name: PROXY_READ_TIMEOUT
              value: {{.Values.openresty.proxyReadTimeout | quote }}
            - name: PROXY_SEND_TIMEOUT
              value: {{.Values.openresty.proxySendTimeout | quote }}
            - name: SEND_TIMEOUT
              value: {{.Values.openresty.sendTimeout | quote }}
            {{- if .Values.jaeger.enabled }}
            - name: JAEGER_AGENT_HOST
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: status.hostIP
            - name: JAEGER_SAMPLER_MANAGER_HOST_PORT
              value: http://$(JAEGER_AGENT_HOST):5778/sampling
            - name: JAEGER_SAMPLER_TYPE
              value: {{.Values.jaeger.samplerType}}
            - name: JAEGER_SAMPLER_PARAM
              value: "{{.Values.jaeger.samplerParam}}"
            - name: JAEGER_SERVICE_NAME
              value: {{ include "estafette-ci-api.fullname" . }}
            {{- else }}
            - name: JAEGER_DISABLED
              value: 'true'
            {{- end }}
          ports:
            - containerPort: 80
              name: http
              protocol: TCP
            - containerPort: 443
              name: https
              protocol: TCP
            - containerPort: 82
              name: openresty-liveness
              protocol: TCP
            - containerPort: 81
              name: openresty-readiness
              protocol: TCP
            - containerPort: 9101
              name: openresty-metrics
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /liveness
              port: openresty-liveness
              scheme: HTTP
          readinessProbe:
            httpGet:
              path: /readiness
              port: https
              scheme: HTTPS
          resources:
            {{- toYaml .Values.openresty.resources | nindent 12 }}
          volumeMounts:
          - name: certificate
            mountPath: /etc/ssl/private
      {{- end }}
      {{- with .Values.extraContainers }}
      {{ tpl . $ | nindent 8 }}
      {{- end }}
      terminationGracePeriodSeconds: 300
      volumes:
      - name: configs
        configMap:
          name: {{ include "estafette-ci-api.fullname" . }}
      {{- if .Values.openresty.enabled }}
      - name: certificate
        secret:
          defaultMode: 420
          secretName: {{ include "estafette-ci-api.fullname" . }}-letsencrypt-certificate
      {{- end }}
      {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.affinity }}
      affinity:
        {{- tpl . $ | nindent 8 }}
      {{- end }}
      {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
      {{- end }}
<commit_msg>rename openresty ports to fit 15 characters<commit_after>apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "estafette-ci-api.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
{{ include "estafette-ci-api.labels" . | indent 4 }}
spec:
  {{- if not .Values.hpa.enabled }}
  replicas: {{ .Values.replicaCount }}
  {{- end }}
  selector:
    matchLabels:
{{ include "estafette-ci-api.selectorLabels" . | indent 6 }}
  template:
    metadata:
      labels:
{{ include "estafette-ci-api.selectorLabels" . | indent 8 }}
        {{- if .Chart.AppVersion }}
        app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
        {{- end }}
        {{- range $key, $value := .Values.extraPodLabels }}
        {{ $key }}: {{ $value }}
        {{- end }}
      annotations:
        {{- if .Values.metrics.enabled }}
        prometheus.io/scrape: {{ .Values.metrics.enabled | quote }}
        prometheus.io/path: {{ .Values.metrics.path | quote }}
        prometheus.io/port: {{ .Values.metrics.port | quote }}
        prometheus.io/scheme: {{ .Values.metrics.scheme | quote }}
        {{- end }}
        {{- with .Values.podAnnotations }}
        {{- toYaml . | nindent 8 }}
        {{- end }}
    spec:
    {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
    {{- end }}
      serviceAccountName: {{ template "estafette-ci-api.serviceAccountName" . }}
      securityContext:
        {{- toYaml .Values.podSecurityContext | nindent 8 }}
      containers:
        - name: {{ .Chart.Name }}
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          {{- with .Values.extraArgs }}
          args:
            {{- toYaml . | nindent 12 }}
          {{- end }}
          ports:
            - containerPort: 5000
              name: web
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /liveness
              port: web
              scheme: HTTP
          {{- if not .Values.openresty.enabled }}
          readinessProbe:
            httpGet:
              path: /readiness
              port: web
              scheme: HTTP
          {{- end }}
          env:
            - name: ESTAFETTE_LOG_FORMAT
              value: {{ .Values.logFormat }}
            - name: "SECRET_DECRYPTION_KEY_BASE64"
              valueFrom:
                secretKeyRef:
                  name: {{ include "estafette-ci-api.fullname" . }}
                  key: decryptionKey
            {{- if .Values.jaeger.enabled }}
            - name: JAEGER_AGENT_HOST
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: status.hostIP
            - name: JAEGER_SAMPLER_MANAGER_HOST_PORT
              value: http://$(JAEGER_AGENT_HOST):5778/sampling
            - name: JAEGER_SAMPLER_TYPE
              value: {{.Values.jaeger.samplerType}}
            - name: JAEGER_SAMPLER_PARAM
              value: "{{.Values.jaeger.samplerParam}}"
            - name: JAEGER_SERVICE_NAME
              value: {{ include "estafette-ci-api.fullname" . }}
            {{- else }}
            - name: JAEGER_DISABLED
              value: 'true'
            {{- end }}
            {{- range $key, $value := .Values.extraEnv }}
            - name: {{ $key }}
              value: {{ $value }}
            {{- end }}
          lifecycle:
            preStop:
              exec:
                command:
                - /bin/sleep
                - 15s
          resources:
          {{- toYaml .Values.resources | nindent 12 }}
          volumeMounts:
          - name: configs
            mountPath: /configs
        {{- if .Values.openresty.enabled }}
        - name: {{ .Chart.Name }}-openresty
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: "{{ .Values.openresty.image.repository }}{{ if .Values.openresty.image.tagIsSha256 }}@sha256{{ end }}:{{.Values.openresty.image.tag}}"
          imagePullPolicy: {{ .Values.openresty.image.pullPolicy }}
          env:
            - name: OFFLOAD_TO_HOST
              value: 127.0.0.1
            - name: OFFLOAD_TO_PORT
              value: "5000"
            - name: SERVICE_NAME
              value: {{ include "estafette-ci-api.fullname" . }}
            - name: NAMESPACE
              value: {{ .Release.Namespace }}
            - name: HEALT_CHECK_PATH
              value: /readiness
            - name: CLIENT_BODY_BUFFER_SIZE
              value: {{.Values.openresty.clientBodyBufferSize | quote }}
            - name: CLIENT_BODY_TIMEOUT
              value: {{.Values.openresty.clientBodyTimeout | quote }}
            - name: CLIENT_HEADER_TIMEOUT
              value: {{.Values.openresty.clientHeaderTimeout | quote }}
            - name: CLIENT_MAX_BODY_SIZE
              value: {{.Values.openresty.clientMaxBodySize | quote }}
            - name: GRACEFUL_SHUTDOWN_DELAY_SECONDS
              value: {{.Values.openresty.gracefulShutdownDelaySeconds | quote }}
            - name: PROXY_BUFFERS_NUMBER
              value: {{.Values.openresty.proxyBuffersNumber | quote }}
            - name: PROXY_BUFFERS_SIZE
              value: {{.Values.openresty.proxyBuffersSize | quote }}
            - name: PROXY_BUFFER_SIZE
              value: {{.Values.openresty.proxyBufferSize | quote }}
            - name: PROXY_CONNECT_TIMEOUT
              value: {{.Values.openresty.proxyConnectTimeout | quote }}
            - name: PROXY_READ_TIMEOUT
              value: {{.Values.openresty.proxyReadTimeout | quote }}
            - name: PROXY_SEND_TIMEOUT
              value: {{.Values.openresty.proxySendTimeout | quote }}
            - name: SEND_TIMEOUT
              value: {{.Values.openresty.sendTimeout | quote }}
            {{- if .Values.jaeger.enabled }}
            - name: JAEGER_AGENT_HOST
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: status.hostIP
            - name: JAEGER_SAMPLER_MANAGER_HOST_PORT
              value: http://$(JAEGER_AGENT_HOST):5778/sampling
            - name: JAEGER_SAMPLER_TYPE
              value: {{.Values.jaeger.samplerType}}
            - name: JAEGER_SAMPLER_PARAM
              value: "{{.Values.jaeger.samplerParam}}"
            - name: JAEGER_SERVICE_NAME
              value: {{ include "estafette-ci-api.fullname" . }}
            {{- else }}
            - name: JAEGER_DISABLED
              value: 'true'
            {{- end }}
          ports:
            - containerPort: 80
              name: http
              protocol: TCP
            - containerPort: 443
              name: https
              protocol: TCP
            - containerPort: 82
              name: or-liveness
              protocol: TCP
            - containerPort: 81
              name: or-readiness
              protocol: TCP
            - containerPort: 9101
              name: or-metrics
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /liveness
              port: or-liveness
              scheme: HTTP
          readinessProbe:
            httpGet:
              path: /readiness
              port: https
              scheme: HTTPS
          resources:
            {{- toYaml .Values.openresty.resources | nindent 12 }}
          volumeMounts:
          - name: certificate
            mountPath: /etc/ssl/private
      {{- end }}
      {{- with .Values.extraContainers }}
      {{ tpl . $ | nindent 8 }}
      {{- end }}
      terminationGracePeriodSeconds: 300
      volumes:
      - name: configs
        configMap:
          name: {{ include "estafette-ci-api.fullname" . }}
      {{- if .Values.openresty.enabled }}
      - name: certificate
        secret:
          defaultMode: 420
          secretName: {{ include "estafette-ci-api.fullname" . }}-letsencrypt-certificate
      {{- end }}
      {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.affinity }}
      affinity:
        {{- tpl . $ | nindent 8 }}
      {{- end }}
      {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
      {{- end }}

{'fraction_non_alphanumeric': 0.11950582086006177, 'fraction_numerical': 0.008909479686386316, 'mean_word_length': 1.4554469884789267, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4196', 'n_tokens_mistral': 4965, 'n_tokens_neox': 4799, 'n_words': 900}