<commit_before>apiVersion: apps/v1
kind: Deployment
metadata:
  name: stubbornjava-deployment
  labels:
    app: sj-web
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1        # how many pods we can add at a time
      maxUnavailable: 0  # maxUnavailable define how many pods can be unavailable
                         # during the rolling update
  selector:
    matchLabels:
      app: sj-web
  template:
    metadata:
      labels:
        app: sj-web
    spec:
      containers:
        - name: sj-web
          image: containers.pkg.github.com/stubbornjava/stubbornjava-webapp:prod
          imagePullPolicy: Always
          resources:
            limits:
              cpu: "0.5"
              memory: "250M"
            requests:
              cpu: "0.5"
              memory: "250M"
          livenessProbe:
            httpGet:
              path: /ping
              port: 8080
            initialDelaySeconds: 1
            periodSeconds: 2
          # Right now this is all we need. Make this more sophisticated once we add a database.
          readinessProbe:
            httpGet:
              path: /ping
              port: 8080
            initialDelaySeconds: 1
            periodSeconds: 2
          ports:
            - containerPort: 8080
          env:
            - name: ENV
              value: "prod"
            - name: github.clientId
              valueFrom:
                secretKeyRef:
                  name: githubcreds
                  key: github.client_id
            - name: github.clientSecret
              valueFrom:
                secretKeyRef:
                  name: githubcreds
                  key: github.client_secret<commit_msg>Lower resource requests so deploys don't hang (#179)<commit_after>apiVersion: apps/v1
kind: Deployment
metadata:
  name: stubbornjava-deployment
  labels:
    app: sj-web
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1        # how many pods we can add at a time
      maxUnavailable: 0  # maxUnavailable define how many pods can be unavailable
                         # during the rolling update
  selector:
    matchLabels:
      app: sj-web
  template:
    metadata:
      labels:
        app: sj-web
    spec:
      containers:
        - name: sj-web
          # Be careful with this now. Auto deploy will always leave this out of sync.
          image: containers.pkg.github.com/stubbornjava/stubbornjava-webapp:f008633e
          resources:
            limits:
              cpu: "0.5"
              memory: "250M"
            requests:
              cpu: "0.25"
              memory: "150M"
          livenessProbe:
            httpGet:
              path: /ping
              port: 8080
            initialDelaySeconds: 1
            periodSeconds: 2
          # Right now this is all we need. Make this more sophisticated once we add a database.
          readinessProbe:
            httpGet:
              path: /ping
              port: 8080
            initialDelaySeconds: 1
            periodSeconds: 2
          ports:
            - containerPort: 8080
          env:
            - name: ENV
              value: "prod"
            - name: github.clientId
              valueFrom:
                secretKeyRef:
                  name: githubcreds
                  key: github.client_id
            - name: github.clientSecret
              valueFrom:
                secretKeyRef:
                  name: githubcreds
                  key: github.client_secret
{'fraction_non_alphanumeric': 0.06031567080045096, 'fraction_numerical': 0.019729425028184894, 'mean_word_length': 1.2941176470588236, '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': '880837', 'n_tokens_mistral': 988, 'n_tokens_neox': 908, 'n_words': 278}