<commit_before>---
apiVersion: v1
kind: Service
metadata:
  name: prom-service
spec:
  type: ClusterIP
  selector:
    app: prom
  ports:
    - port: 9090

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: prom-deployment
  labels:
    app: prom
spec:
  replicas: 1
  selector:
    matchLabels:
      app: prom
  replicas: 1
  template:
    metadata:
      labels:
        app: prom
    spec:
      initContainers:
        - name: envsubst
          # Prepare own image?
          image: dibi/envsubst
          command:
            - sh
          args:
            - /configmap_files/prom_envsubst.sh
            - /configmap_files/prometheus.yml.envsubst
            - /configfile/prometheus.yml
          env:
            - name: NODE_EXPORTER_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: secret-files
                  key: node_exporter_password
            - name: NODE_EXPORTER_HOSTNAME
              value: prometheus-node-exporter.3ends.info
            - name: AM_SERVICE_NAME
              value: am
              # value: $(AM_SERVICE_NAME)
            - name: RULE_FILE
              value: /configmap_files/rules.yml
          volumeMounts:
            - name: configmap-files-volume
              mountPath: /configmap_files
            - name: configfile-volume
              mountPath: /configfile
      containers:
        - name: prom
          image: prom/prometheus:v2.8.0
          # user: "1000"
          args:
            - --config.file=/configfile/prometheus.yml
            - --storage.tsdb.path=/storage
            - --web.console.libraries=/etc/prometheus/console_libraries
            - --web.console.templates=/etc/prometheus/consoles
            - --web.external-url=https://pt.3ends.info/pt/
            - --web.route-prefix=/pt/
          volumeMounts:
            - name: storage
              mountPath: /storage
            # - name: configmap-files-volume
            #   mountPath: /configmap_files
            - name: configfile-volume
              mountPath: /configfile
      volumes:
        # - name: storage
        #   hostPath:
        #     path: /var/lib/data/kubernetes-hostpath/exposed.prom/prom/storage
        #     type: Directory
        - name: storage  # OK to remove on restart?
          emptyDir: {}
        - name: configmap-files-volume
          configMap:
            name: configmap-files
        - name: configfile-volume
          emptyDir: {}<commit_msg>Update volume name<commit_after>---
apiVersion: v1
kind: Service
metadata:
  name: prom-service
spec:
  type: ClusterIP
  selector:
    app: prom
  ports:
    - port: 9090

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: prom-deployment
  labels:
    app: prom
spec:
  replicas: 1
  selector:
    matchLabels:
      app: prom
  replicas: 1
  template:
    metadata:
      labels:
        app: prom
    spec:
      initContainers:
        - name: envsubst
          # Prepare own image?
          image: dibi/envsubst
          command:
            - sh
          args:
            - /configmap_files/prom_envsubst.sh
            - /configmap_files/prometheus.yml.envsubst
            - /configfile/prometheus.yml
          env:
            - name: NODE_EXPORTER_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: secret-files
                  key: node_exporter_password
            - name: NODE_EXPORTER_HOSTNAME
              value: prometheus-node-exporter.3ends.info
            - name: AM_SERVICE_NAME
              value: am
              # value: $(AM_SERVICE_NAME)
            - name: RULE_FILE
              value: /configmap_files/rules.yml
          volumeMounts:
            - name: configmap-files-volume
              mountPath: /configmap_files
            - name: configfile-volume
              mountPath: /configfile
      containers:
        - name: prom
          image: prom/prometheus:v2.8.0
          # user: "1000"
          args:
            - --config.file=/configfile/prometheus.yml
            - --storage.tsdb.path=/storage
            - --web.console.libraries=/etc/prometheus/console_libraries
            - --web.console.templates=/etc/prometheus/consoles
            - --web.external-url=https://pt.3ends.info/pt/
            - --web.route-prefix=/pt/
          volumeMounts:
            - name: storage-volume
              mountPath: /storage
            - name: configfile-volume
              mountPath: /configfile
      volumes:
        # - name: storage-volume
        #   hostPath:
        #     path: /var/lib/data/kubernetes-hostpath/exposed.prom/prom/storage
        #     type: Directory
        - name: storage-volume  # OK to remove on restart?
          emptyDir: {}
        - name: configmap-files-volume
          configMap:
            name: configmap-files
        - name: configfile-volume
          emptyDir: {}
{'fraction_non_alphanumeric': 0.09221018196687794, 'fraction_numerical': 0.006951543651604989, 'mean_word_length': 1.4181908057340584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6710857', 'n_tokens_mistral': 1461, 'n_tokens_neox': 1404, 'n_words': 276}