<commit_before>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "polyaxon.fullname" . }}-http-backend
  namespace: {{ .Values.namespace }}
  labels:
    app: {{ template "polyaxon.fullname" . }}-http-backend
    type: {{ .Values.types.core }}
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: {{ template "polyaxon.fullname" . }}-http-backend
        type: {{ .Values.types.core }}
    spec:
      terminationGracePeriodSeconds: 60
      {{- if .Values.nodeSelectors }}
      nodeSelector:
{{ toYaml .Values.nodeSelectors | indent 8 }}
      {{- end }}
      affinity:
        podAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 100
            podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: type
                  operator: In
                  values:
                  - system
              topologyKey: "kubernetes.io/hostname"
      containers:
      - name: default-http-backend
        # Any image is permissable as long as:
        # 1. It serves a 404 page at /
        # 2. It serves 200 on a /healthz endpoint
        image: gcr.io/google_containers/defaultbackend:1.0
        resources:
          requests:
            cpu: "50m"
            memory: "64Mi"
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 30
          timeoutSeconds: 5
        ports:
        - containerPort: 8080
        resources:
          limits:
            cpu: 10m
            memory: 20Mi
          requests:
            cpu: 10m
            memory: 20Mi
---
apiVersion: v1
kind: Service
metadata:
  name: {{ template "polyaxon.fullname" . }}-http-backend
  namespace: {{ .Values.namespace }}
  labels:
    app: {{ template "polyaxon.fullname" . }}-http-backend
    type: {{ .Values.types.core }}
spec:
  ports:
  - port: 80
    targetPort: 8080
  selector:
    app: {{ template "polyaxon.fullname" . }}-http-backend
    type: {{ .Values.types.core }}<commit_msg>Disable http backend when ingress is disabled<commit_after>{{- if .Values.ingress.enabled -}}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "polyaxon.fullname" . }}-http-backend
  namespace: {{ .Values.namespace }}
  labels:
    app: {{ template "polyaxon.fullname" . }}-http-backend
    type: {{ .Values.types.core }}
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: {{ template "polyaxon.fullname" . }}-http-backend
        type: {{ .Values.types.core }}
    spec:
      terminationGracePeriodSeconds: 60
      {{- if .Values.nodeSelectors }}
      nodeSelector:
{{ toYaml .Values.nodeSelectors | indent 8 }}
      {{- end }}
      affinity:
        podAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 100
            podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: type
                  operator: In
                  values:
                  - system
              topologyKey: "kubernetes.io/hostname"
      containers:
      - name: default-http-backend
        # Any image is permissable as long as:
        # 1. It serves a 404 page at /
        # 2. It serves 200 on a /healthz endpoint
        image: gcr.io/google_containers/defaultbackend:1.0
        resources:
          requests:
            cpu: "50m"
            memory: "64Mi"
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 30
          timeoutSeconds: 5
        ports:
        - containerPort: 8080
        resources:
          limits:
            cpu: 10m
            memory: 20Mi
          requests:
            cpu: 10m
            memory: 20Mi
---
apiVersion: v1
kind: Service
metadata:
  name: {{ template "polyaxon.fullname" . }}-http-backend
  namespace: {{ .Values.namespace }}
  labels:
    app: {{ template "polyaxon.fullname" . }}-http-backend
    type: {{ .Values.types.core }}
spec:
  ports:
  - port: 80
    targetPort: 8080
  selector:
    app: {{ template "polyaxon.fullname" . }}-http-backend
    type: {{ .Values.types.core }}
{{- end }}
{'fraction_non_alphanumeric': 0.10757717492984098, 'fraction_numerical': 0.022918615528531337, 'mean_word_length': 1.7311621966794382, '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': '6195174', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1214, 'n_words': 304}