apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: ghss-importer
spec:
  schedule: "0 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
            - name: importer
              image: frigus02/ghss-importer
              env:
                - name: GH_APP_ID
                  value: "50487"
                - name: GH_PRIVATE_KEY
                  valueFrom:
                    secretKeyRef:
                      name: ghss-github
                      key: PRIVATE_KEY
                - name: STORE_URL
                  value: http://ghss-store:50051
                - name: OTEL_AGENT_ENDPOINT
                  value: ghss-otel-collector:6831
              resources:
                requests:
                  cpu: 50m
                  memory: 50Mi
                limits:
                  cpu: 50m
                  memory: 50Mi
              securityContext:
                runAsNonRoot: true
                runAsUser: 1000
          restartPolicy: OnFailure
