<commit_before>apiVersion: v1
kind: Template
metadata: {}
parameters:
  - name: NAME_SUFFIX
    required: true
  - name: NAMESPACE
    required: true
  - name: S3_SERVICE
    displayName: the name of the OpenShift service in front of the s3/minio storage provider
    required: true
  - name: PVC_SIZE
    value: "15Gi"
  - name: DEST_PVC
    required: true
  - name: SECRETS
    displayName: "Secret object to reference"
    value: "gwells-minio-secrets"
  - name: VERSION
    value: v1.0.0
  - name: SCHEDULE
    value: "15 3 * * *"
    required: false
  - name: BUCKETS
    value: ""
    displayName: a space separated list of buckets to backup from the remote s3 service
objects:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      finalizers:
      - kubernetes.io/pvc-protection
      name: "gwells-documents-${NAME_SUFFIX}-backup-vol"
      labels:
        app: "gwells-${NAME_SUFFIX}"
        name: "gwells-${NAME_SUFFIX}-documents-backup"
        component: backups
        part-of: gwells
    spec:
      accessModes:
      - ReadWriteMany
      resources:
        requests:
          storage: ${PVC_SIZE}
      storageClassName: gluster-file
  - apiVersion: batch/v1beta1
    kind: CronJob
    metadata:
      name: gwells-documents-${NAME_SUFFIX}-backup
      namespace: "${NAMESPACE}"
    spec:
      concurrencyPolicy: Forbid
      failedJobsHistoryLimit: 3
      jobTemplate:
        metadata:
          labels:
            app: "gwells-${NAME_SUFFIX}"
            name: "gwells-${NAME_SUFFIX}-documents-backup"
            component: backups
            part-of: gwells
        spec:
          backoffLimit: 10
          template:
            spec:
              activeDeadlineSeconds: 3600
              containers:
              - image: docker-registry.default.svc:5000/${NAMESPACE}/gwells-documents-backup:${VERSION}
                args: "${{BUCKETS}}"
                imagePullPolicy: Always
                name: minio-backup
                env:
                - name: RCLONE_CONFIG_MINIO_ACCESS_KEY_ID
                  valueFrom:
                    secretKeyRef:
                      name: ${SECRETS}
                      key: MINIO_ACCESS_KEY
                - name: RCLONE_CONFIG_MINIO_SECRET_ACCESS_KEY
                  valueFrom:
                    secretKeyRef:
                      name: ${SECRETS}
                      key: MINIO_SECRET_KEY
                - name: RCLONE_CONFIG_MINIO_ENDPOINT
                  value: "${S3_SERVICE}"
                volumeMounts:
                - mountPath: /mnt/dest/
                  name: dest
                - mountPath: /backup
                  name: source
                  readOnly: true
              restartPolicy: OnFailure
              terminationGracePeriodSeconds: 30
              volumes:
              - name: dest
                persistentVolumeClaim:
                  claimName: "${DEST_PVC}"
              - name: source
                persistentVolumeClaim:
                  claimName: "gwells-documents-${NAME_SUFFIX}-backup-vol"
      schedule: ${SCHEDULE}
      successfulJobsHistoryLimit: 3<commit_msg>change attributes of intermediate backup pvc<commit_after>apiVersion: v1
kind: Template
metadata: {}
parameters:
  - name: NAME_SUFFIX
    required: true
  - name: NAMESPACE
    required: true
  - name: S3_SERVICE
    displayName: the name of the OpenShift service in front of the s3/minio storage provider
    required: true
  - name: PVC_SIZE
    value: "15Gi"
  - name: DEST_PVC
    required: true
  - name: SECRETS
    displayName: "Secret object to reference"
    value: "gwells-minio-secrets"
  - name: VERSION
    value: v1.0.0
  - name: SCHEDULE
    value: "15 3 * * *"
    required: false
  - name: BUCKETS
    value: ""
    displayName: a space separated list of buckets to backup from the remote s3 service
objects:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      finalizers:
      - kubernetes.io/pvc-protection
      name: "gwells-documents-${NAME_SUFFIX}-backup-vol"
      labels:
        app: "gwells-${NAME_SUFFIX}"
        name: "gwells-${NAME_SUFFIX}-documents-backup"
        component: backups
        part-of: gwells
    spec:
      accessModes:
      - ReadWriteMany
      resources:
        requests:
          storage: ${PVC_SIZE}
      storageClassName: gluster-file
  - apiVersion: batch/v1beta1
    kind: CronJob
    metadata:
      name: gwells-documents-${NAME_SUFFIX}-backup
      namespace: "${NAMESPACE}"
    spec:
      concurrencyPolicy: Forbid
      failedJobsHistoryLimit: 3
      jobTemplate:
        metadata:
          labels:
            app: "gwells-${NAME_SUFFIX}"
            name: "gwells-${NAME_SUFFIX}-documents-backup"
            component: backups
            part-of: gwells
        spec:
          backoffLimit: 10
          template:
            spec:
              activeDeadlineSeconds: 3600
              containers:
              - image: docker-registry.default.svc:5000/${NAMESPACE}/gwells-documents-backup:${VERSION}
                args: "${{BUCKETS}}"
                imagePullPolicy: Always
                name: minio-backup
                env:
                - name: RCLONE_CONFIG_MINIO_ACCESS_KEY_ID
                  valueFrom:
                    secretKeyRef:
                      name: ${SECRETS}
                      key: MINIO_ACCESS_KEY
                - name: RCLONE_CONFIG_MINIO_SECRET_ACCESS_KEY
                  valueFrom:
                    secretKeyRef:
                      name: ${SECRETS}
                      key: MINIO_SECRET_KEY
                - name: RCLONE_CONFIG_MINIO_ENDPOINT
                  value: "${S3_SERVICE}"
                volumeMounts:
                - mountPath: /mnt/dest/
                  name: dest
                - mountPath: /backup
                  name: pvcBackup
                  readOnly: false
              restartPolicy: OnFailure
              terminationGracePeriodSeconds: 30
              volumes:
              - name: dest
                persistentVolumeClaim:
                  claimName: "${DEST_PVC}"
              - name: pvcBackup
                persistentVolumeClaim:
                  claimName: "gwells-documents-${NAME_SUFFIX}-backup-vol"
      schedule: ${SCHEDULE}
      successfulJobsHistoryLimit: 3
{'fraction_non_alphanumeric': 0.08095238095238096, 'fraction_numerical': 0.009523809523809525, 'mean_word_length': 1.6058726220016544, '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': '3513942', 'n_tokens_mistral': 1881, 'n_tokens_neox': 1800, 'n_words': 398}