97 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			97 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
# Source: gitea-actions/templates/statefulset.yaml
 | 
						|
apiVersion: apps/v1
 | 
						|
kind: StatefulSet
 | 
						|
metadata:
 | 
						|
  labels:
 | 
						|
    app: gitea-actions-act-runner
 | 
						|
    app.kubernetes.io/name: gitea-actions-act-runner
 | 
						|
    app.kubernetes.io/instance: gitea-actions
 | 
						|
    app.kubernetes.io/version: "1.24.2-rootless"
 | 
						|
    version: "1.24.2-rootless"
 | 
						|
  annotations:
 | 
						|
  name: gitea-actions-act-runner
 | 
						|
  namespace: gitea
 | 
						|
spec:
 | 
						|
  selector:
 | 
						|
    matchLabels:
 | 
						|
      app.kubernetes.io/name: gitea-actions-act-runner
 | 
						|
      app.kubernetes.io/instance: gitea-actions
 | 
						|
  template:
 | 
						|
    metadata:
 | 
						|
      annotations:
 | 
						|
        checksum/config: ad47af25f4f7946653b7371987b3a1aeda98d837c5c0c36a47c133c0fe0503c0
 | 
						|
      labels:
 | 
						|
        app: gitea-actions-act-runner
 | 
						|
        app.kubernetes.io/name: gitea-actions-act-runner
 | 
						|
        app.kubernetes.io/instance: gitea-actions
 | 
						|
        app.kubernetes.io/version: "1.24.2-rootless"
 | 
						|
        version: "1.24.2-rootless"
 | 
						|
    spec:
 | 
						|
      initContainers:
 | 
						|
        - name: init-gitea
 | 
						|
          image: "busybox:1.37.0"
 | 
						|
          command:
 | 
						|
            - sh
 | 
						|
            - -c
 | 
						|
            - |
 | 
						|
              while ! nc -z code.spamasaurus.com 443; do
 | 
						|
                sleep 5
 | 
						|
              done
 | 
						|
      containers:
 | 
						|
        - name: act-runner
 | 
						|
          image: "gitea/act_runner:0.2.12"
 | 
						|
          imagePullPolicy: IfNotPresent
 | 
						|
          command: ["sh", "-c", "while ! nc -z 127.0.0.1 2375 </dev/null; do echo 'waiting for docker daemon...'; sleep 5; done; /sbin/tini -- run.sh"]
 | 
						|
          workingDir: /data
 | 
						|
          env:
 | 
						|
            - name: DOCKER_HOST
 | 
						|
              value: tcp://127.0.0.1:2375
 | 
						|
            - name: DOCKER_TLS_VERIFY
 | 
						|
              value: ""
 | 
						|
            - name: GITEA_RUNNER_REGISTRATION_TOKEN
 | 
						|
              valueFrom:
 | 
						|
                secretKeyRef:
 | 
						|
                  name: "gitea-actions-registration-token"
 | 
						|
                  key: "token"
 | 
						|
            - name: GITEA_INSTANCE_URL
 | 
						|
              value: https://code.spamasaurus.com
 | 
						|
            - name: CONFIG_FILE
 | 
						|
              value: /actrunner/config.yaml
 | 
						|
          resources:
 | 
						|
            {}
 | 
						|
          securityContext:
 | 
						|
            privileged: true
 | 
						|
          volumeMounts:
 | 
						|
            - mountPath: /dev/kvm
 | 
						|
              name: dev-kvm
 | 
						|
            - mountPath: /actrunner/config.yaml
 | 
						|
              name: act-runner-config
 | 
						|
              subPath: config.yaml
 | 
						|
            - mountPath: /data
 | 
						|
              name: data-act-runner
 | 
						|
        - name: dind
 | 
						|
          image: "docker:28.3.2-dind"
 | 
						|
          imagePullPolicy: IfNotPresent
 | 
						|
          args:
 | 
						|
            - dockerd
 | 
						|
            - --host=tcp://127.0.0.1:2375
 | 
						|
            - --host=unix:///var/run/docker.sock
 | 
						|
          env:
 | 
						|
            - name: DOCKER_TLS_VERIFY
 | 
						|
              value: ""
 | 
						|
          securityContext:
 | 
						|
            privileged: true
 | 
						|
          resources:
 | 
						|
            {}
 | 
						|
      volumes:
 | 
						|
        - name: dev-kvm
 | 
						|
          hostPath:
 | 
						|
            path: /dev/kvm
 | 
						|
            type: CharDevice
 | 
						|
        - name: act-runner-config
 | 
						|
          configMap:
 | 
						|
            name: gitea-actions-act-runner-config
 | 
						|
        - name: data-act-runner
 | 
						|
          persistentVolumeClaim:
 | 
						|
            claimName: csismb-gitea-act
 |