This message was deleted.
# epinio
a
This message was deleted.
b
hey Paul, of course we do. We were planning to have a look at this today but you beat us to it! Thanks
we don't play a lot with GitJob, but it was something that was on the roadmap. I've never used Fleet (yet)
m
Oh, the PR isn’t related to the GitJob, still struggling with that one
So your help would still be greatly appreciated ❤️
b
awesome, I'll let you know if we find something interesting
ook, it was pretty long and "hard" debugging session but we have found the issues. There are a few errors or outdated informations in the GitJob spec, this is actually working:
Copy code
apiVersion: <http://gitjob.cattle.io/v1|gitjob.cattle.io/v1>
kind: GitJob
metadata:
  # The name of the GitJob, doesn't need to match the project.
  name: samplepush
spec:
  syncInterval: 15
  git:
    # The git repo and branch to track. 
    repo: <https://github.com/epinio/example-12factor>
    branch: main
  jobSpec:
    template:
      spec:
        # This should match what we created in the last step
        serviceAccountName: epinio-gitjob
        restartPolicy: "Never"
        containers:
        # This version should match your epinio deployment
        - image: "<http://ghcr.io/epinio/epinio-server:v1.8.1|ghcr.io/epinio/epinio-server:v1.8.1>"
          name: epinio-push
          volumeMounts:
          - name: settings
            mountPath: "/settings/"
            readOnly: true  
          - name: tmp
            mountPath: /tmp
            readOnly: false
          env:
          - name: EPINIO_SETTINGS
            value: "/settings/settings.yaml"
          command:
          - /epinio 
          args:
          - push
          - "--name"
          # This is the name of the app to push
          - test12factor
          workingDir: /workspace/source
        volumes:
        - name: settings
          secret:
            secretName: epinio-creds
        - name: tmp
          emptyDir: {}
m
Woah nice! Will test it soon (ish)
b
to highlight the problems: • the
EPINIO_CONFIG
env var should be
EPINIO_SETTINGS
• the args of the container were missing the
--name
flag:
Copy code
args:
          - push
          - "--name"
          # This is the name of the app to push
          - test12factor
• there is the need for a mounted
/tmp
volume, so also you need the
volumes
and
volumeMounts
:
Copy code
volumeMounts:
          - name: tmp
            mountPath: /tmp
            readOnly: false
        volumes:
        - name: tmp
          emptyDir: {}
and as you said the image is an old one, and should be
<http://ghcr.io/epinio/epinio-server:v1.8.1|ghcr.io/epinio/epinio-server:v1.8.1>
also we have seen that the serviceAccountName is wrong, it differs from the one in the steps above! So be aware of it
one extra point is about the default namespace that the settings are targeting. In our case for example we didn't have one, because we installed Epinio from the Rancher marketplace, so in that case you need to create it in advance
thanks to you, let me know if that "works", I think that we need some improvement on the Fleet/GitJob integration, so any feedback is welcome!
m
Thanks a lot! Having the confirmation that it works is probably enough for me, as I’ll figure it out how everything should go together.
🙌 1