Compare commits
2 Commits
11f881c24b
...
101be3512a
| Author | SHA1 | Date | |
|---|---|---|---|
|
101be3512a
|
|||
|
893f10a45c
|
10
attic/bucket.yaml
Normal file
10
attic/bucket.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: objectbucket.io/v1alpha1
|
||||||
|
kind: ObjectBucketClaim
|
||||||
|
metadata:
|
||||||
|
name: attic-bucket
|
||||||
|
namespace: attic
|
||||||
|
spec:
|
||||||
|
additionalConfig:
|
||||||
|
maxSize: 100Gi
|
||||||
|
bucketName: attic-bucket
|
||||||
|
storageClassName: weyma-s3-bucket
|
||||||
36
attic/config.yaml
Normal file
36
attic/config.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: attic-config
|
||||||
|
data:
|
||||||
|
server.toml: |
|
||||||
|
listen = "[::]:8080"
|
||||||
|
allowed-hosts = []
|
||||||
|
|
||||||
|
#api-endpoint = "https://nix-cache.dubyatp.xyz/"
|
||||||
|
|
||||||
|
[database]
|
||||||
|
url = "sqlite:///var/empty/.local/share/attic/server.db"
|
||||||
|
|
||||||
|
[storage]
|
||||||
|
path = "/data/.local/share/attic/storage"
|
||||||
|
type = "local"
|
||||||
|
#region = "us-east-1"
|
||||||
|
#bucket = "attic-bucket"
|
||||||
|
#endpoint = "https://weyma-s3.infra.dubyatp.xyz"
|
||||||
|
|
||||||
|
[chunking]
|
||||||
|
nar-size-threshold = 65536
|
||||||
|
min-size = 16384
|
||||||
|
avg-size = 65536
|
||||||
|
max-size = 262144
|
||||||
|
|
||||||
|
[compression]
|
||||||
|
type = "zstd"
|
||||||
|
|
||||||
|
[garbage-collection]
|
||||||
|
interval = "12 hours"
|
||||||
|
|
||||||
|
[jwt]
|
||||||
|
|
||||||
|
[jwt.signing]
|
||||||
@@ -3,6 +3,7 @@ kind: Deployment
|
|||||||
metadata:
|
metadata:
|
||||||
name: attic
|
name: attic
|
||||||
spec:
|
spec:
|
||||||
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: attic
|
app: attic
|
||||||
@@ -17,13 +18,20 @@ spec:
|
|||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: attic-secret
|
name: attic-secret
|
||||||
|
- secretRef:
|
||||||
|
name: attic-bucket
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: attic-pvc
|
- name: attic-pvc
|
||||||
mountPath: /var/empty
|
mountPath: /var/empty/
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: "2Gi"
|
memory: "2Gi"
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
|
- name: multitool
|
||||||
|
image: wbitt/network-multitool
|
||||||
|
volumeMounts:
|
||||||
|
- name: attic-pvc
|
||||||
|
mountPath: /var/empty/
|
||||||
volumes:
|
volumes:
|
||||||
- name: attic-pvc
|
- name: attic-pvc
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ data:
|
|||||||
log:
|
log:
|
||||||
level: info
|
level: info
|
||||||
runner:
|
runner:
|
||||||
file: .runner
|
file: /data/.runner
|
||||||
capacity: 1
|
capacity: 1
|
||||||
env_file: .env
|
env_file: .env
|
||||||
timeout: 3h
|
timeout: 3h
|
||||||
|
|||||||
@@ -16,24 +16,35 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: act-runner
|
app: act-runner
|
||||||
spec:
|
spec:
|
||||||
containers:
|
initContainers:
|
||||||
- name: runner
|
- name: sysctl
|
||||||
|
image: busybox
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- while ! nc -z localhost 2376 </dev/null; do echo 'waiting for docker daemon...';
|
- echo 28633 > /proc/sys/user/max_user_namespaces
|
||||||
sleep 5; done; /sbin/tini -- run.sh
|
- name: chown-data
|
||||||
image: gitea/act_runner:nightly
|
image: busybox
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- chown -R 1000:1000 /data
|
||||||
|
volumeMounts:
|
||||||
|
- name: runner-data
|
||||||
|
mountPath: /data
|
||||||
|
containers:
|
||||||
|
- name: runner
|
||||||
|
image: gitea/act_runner:nightly-dind-rootless
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
env:
|
env:
|
||||||
- name: CONFIG_FILE
|
- name: CONFIG_FILE
|
||||||
value: /config/config.yaml
|
value: /config/config.yaml
|
||||||
- name: DOCKER_HOST
|
- name: DOCKER_HOST
|
||||||
value: tcp://localhost:2376
|
value: unix:///run/user/1000/docker.sock
|
||||||
- name: DOCKER_CERT_PATH
|
|
||||||
value: /certs/client
|
|
||||||
- name: DOCKER_TLS_VERIFY
|
|
||||||
value: "1"
|
|
||||||
- name: GITEA_INSTANCE_URL
|
- name: GITEA_INSTANCE_URL
|
||||||
value: https://git.dubyatp.xyz
|
value: https://git.dubyatp.xyz
|
||||||
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||||
@@ -41,34 +52,20 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
key: registration-token
|
key: registration-token
|
||||||
name: gitea-runner-token
|
name: gitea-runner-token
|
||||||
terminationMessagePath: /dev/termination-log
|
|
||||||
terminationMessagePolicy: File
|
|
||||||
volumeMounts:
|
|
||||||
- name: runner-config
|
|
||||||
mountPath: /config
|
|
||||||
- name: docker-certs
|
|
||||||
mountPath: /certs
|
|
||||||
- name: runner-data
|
|
||||||
mountPath: /data
|
|
||||||
- name: daemon
|
|
||||||
env:
|
|
||||||
- name: DOCKER_TLS_CERTDIR
|
|
||||||
value: /certs
|
|
||||||
image: docker:23.0.6-dind
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
terminationMessagePath: /dev/termination-log
|
terminationMessagePath: /dev/termination-log
|
||||||
terminationMessagePolicy: File
|
terminationMessagePolicy: File
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /certs
|
- name: runner-config
|
||||||
name: docker-certs
|
mountPath: /config
|
||||||
|
- name: runner-data
|
||||||
|
mountPath: /data
|
||||||
dnsPolicy: ClusterFirst
|
dnsPolicy: ClusterFirst
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
schedulerName: default-scheduler
|
schedulerName: default-scheduler
|
||||||
terminationGracePeriodSeconds: 30
|
terminationGracePeriodSeconds: 30
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker-certs
|
|
||||||
- name: runner-config
|
- name: runner-config
|
||||||
configMap:
|
configMap:
|
||||||
name: runner-config
|
name: runner-config
|
||||||
|
|||||||
Reference in New Issue
Block a user