feat(ci): add github self-hosted runners
This commit is contained in:
parent
e169db04c8
commit
c0abc5e152
4 changed files with 382 additions and 0 deletions
6
apps/github-actions-runners/base/kustomization.yaml
Normal file
6
apps/github-actions-runners/base/kustomization.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: github-actions
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- runners.yaml
|
||||||
4
apps/github-actions-runners/base/namespace.yaml
Normal file
4
apps/github-actions-runners/base/namespace.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: github-actions
|
||||||
371
apps/github-actions-runners/base/runners.yaml
Normal file
371
apps/github-actions-runners/base/runners.yaml
Normal file
|
|
@ -0,0 +1,371 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: github-runner-frontend
|
||||||
|
namespace: github-actions
|
||||||
|
labels:
|
||||||
|
app: github-runner-frontend
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: github-runner-frontend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: github-runner-frontend
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: DoesNotExist
|
||||||
|
- key: node-role.kubernetes.io/master
|
||||||
|
operator: DoesNotExist
|
||||||
|
containers:
|
||||||
|
- name: dind
|
||||||
|
image: docker:27-dind
|
||||||
|
args:
|
||||||
|
- --host=tcp://0.0.0.0:2375
|
||||||
|
- --tls=false
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
env:
|
||||||
|
- name: DOCKER_TLS_CERTDIR
|
||||||
|
value: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 2
|
||||||
|
memory: 4Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: dind-storage
|
||||||
|
mountPath: /var/lib/docker
|
||||||
|
- name: runner
|
||||||
|
image: docker.io/myoung34/github-runner:ubuntu-noble
|
||||||
|
env:
|
||||||
|
- name: ACCESS_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: github-runner-secrets
|
||||||
|
key: ACCESS_TOKEN
|
||||||
|
- name: RUNNER_SCOPE
|
||||||
|
value: repo
|
||||||
|
- name: REPO_URL
|
||||||
|
value: https://github.com/Traceworks2023/nxtgauge-frontend-solid
|
||||||
|
- name: RUNNER_NAME_PREFIX
|
||||||
|
value: frontend
|
||||||
|
- name: RANDOM_RUNNER_SUFFIX
|
||||||
|
value: "true"
|
||||||
|
- name: LABELS
|
||||||
|
value: ubuntu-latest,docker-ready
|
||||||
|
- name: RUNNER_WORKDIR
|
||||||
|
value: /tmp/runner/_work
|
||||||
|
- name: RUN_AS_ROOT
|
||||||
|
value: "true"
|
||||||
|
- name: DOCKER_HOST
|
||||||
|
value: tcp://127.0.0.1:2375
|
||||||
|
- name: DISABLE_AUTO_UPDATE
|
||||||
|
value: "true"
|
||||||
|
- name: UNSET_CONFIG_VARS
|
||||||
|
value: "true"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 2
|
||||||
|
memory: 4Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: runner-work
|
||||||
|
mountPath: /tmp/runner
|
||||||
|
volumes:
|
||||||
|
- name: dind-storage
|
||||||
|
emptyDir: {}
|
||||||
|
- name: runner-work
|
||||||
|
emptyDir: {}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: github-runner-admin
|
||||||
|
namespace: github-actions
|
||||||
|
labels:
|
||||||
|
app: github-runner-admin
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: github-runner-admin
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: github-runner-admin
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: DoesNotExist
|
||||||
|
- key: node-role.kubernetes.io/master
|
||||||
|
operator: DoesNotExist
|
||||||
|
containers:
|
||||||
|
- name: dind
|
||||||
|
image: docker:27-dind
|
||||||
|
args:
|
||||||
|
- --host=tcp://0.0.0.0:2375
|
||||||
|
- --tls=false
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
env:
|
||||||
|
- name: DOCKER_TLS_CERTDIR
|
||||||
|
value: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 2
|
||||||
|
memory: 4Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: dind-storage
|
||||||
|
mountPath: /var/lib/docker
|
||||||
|
- name: runner
|
||||||
|
image: docker.io/myoung34/github-runner:ubuntu-noble
|
||||||
|
env:
|
||||||
|
- name: ACCESS_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: github-runner-secrets
|
||||||
|
key: ACCESS_TOKEN
|
||||||
|
- name: RUNNER_SCOPE
|
||||||
|
value: repo
|
||||||
|
- name: REPO_URL
|
||||||
|
value: https://github.com/Traceworks2023/nxtgauge-admin-solid
|
||||||
|
- name: RUNNER_NAME_PREFIX
|
||||||
|
value: admin
|
||||||
|
- name: RANDOM_RUNNER_SUFFIX
|
||||||
|
value: "true"
|
||||||
|
- name: LABELS
|
||||||
|
value: ubuntu-latest,docker-ready
|
||||||
|
- name: RUNNER_WORKDIR
|
||||||
|
value: /tmp/runner/_work
|
||||||
|
- name: RUN_AS_ROOT
|
||||||
|
value: "true"
|
||||||
|
- name: DOCKER_HOST
|
||||||
|
value: tcp://127.0.0.1:2375
|
||||||
|
- name: DISABLE_AUTO_UPDATE
|
||||||
|
value: "true"
|
||||||
|
- name: UNSET_CONFIG_VARS
|
||||||
|
value: "true"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 2
|
||||||
|
memory: 4Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: runner-work
|
||||||
|
mountPath: /tmp/runner
|
||||||
|
volumes:
|
||||||
|
- name: dind-storage
|
||||||
|
emptyDir: {}
|
||||||
|
- name: runner-work
|
||||||
|
emptyDir: {}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: github-runner-ai-assistant
|
||||||
|
namespace: github-actions
|
||||||
|
labels:
|
||||||
|
app: github-runner-ai-assistant
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: github-runner-ai-assistant
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: github-runner-ai-assistant
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: DoesNotExist
|
||||||
|
- key: node-role.kubernetes.io/master
|
||||||
|
operator: DoesNotExist
|
||||||
|
containers:
|
||||||
|
- name: dind
|
||||||
|
image: docker:27-dind
|
||||||
|
args:
|
||||||
|
- --host=tcp://0.0.0.0:2375
|
||||||
|
- --tls=false
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
env:
|
||||||
|
- name: DOCKER_TLS_CERTDIR
|
||||||
|
value: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 2
|
||||||
|
memory: 4Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: dind-storage
|
||||||
|
mountPath: /var/lib/docker
|
||||||
|
- name: runner
|
||||||
|
image: docker.io/myoung34/github-runner:ubuntu-noble
|
||||||
|
env:
|
||||||
|
- name: ACCESS_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: github-runner-secrets
|
||||||
|
key: ACCESS_TOKEN
|
||||||
|
- name: RUNNER_SCOPE
|
||||||
|
value: repo
|
||||||
|
- name: REPO_URL
|
||||||
|
value: https://github.com/Traceworks2023/nxtgauge-ai-assistant
|
||||||
|
- name: RUNNER_NAME_PREFIX
|
||||||
|
value: ai-assistant
|
||||||
|
- name: RANDOM_RUNNER_SUFFIX
|
||||||
|
value: "true"
|
||||||
|
- name: LABELS
|
||||||
|
value: ubuntu-latest,docker-ready
|
||||||
|
- name: RUNNER_WORKDIR
|
||||||
|
value: /tmp/runner/_work
|
||||||
|
- name: RUN_AS_ROOT
|
||||||
|
value: "true"
|
||||||
|
- name: DOCKER_HOST
|
||||||
|
value: tcp://127.0.0.1:2375
|
||||||
|
- name: DISABLE_AUTO_UPDATE
|
||||||
|
value: "true"
|
||||||
|
- name: UNSET_CONFIG_VARS
|
||||||
|
value: "true"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 512Mi
|
||||||
|
limits:
|
||||||
|
cpu: 2
|
||||||
|
memory: 4Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: runner-work
|
||||||
|
mountPath: /tmp/runner
|
||||||
|
volumes:
|
||||||
|
- name: dind-storage
|
||||||
|
emptyDir: {}
|
||||||
|
- name: runner-work
|
||||||
|
emptyDir: {}
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: github-runner-backend
|
||||||
|
namespace: github-actions
|
||||||
|
labels:
|
||||||
|
app: github-runner-backend
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: github-runner-backend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: github-runner-backend
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: DoesNotExist
|
||||||
|
- key: node-role.kubernetes.io/master
|
||||||
|
operator: DoesNotExist
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: github-runner-backend
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
containers:
|
||||||
|
- name: dind
|
||||||
|
image: docker:27-dind
|
||||||
|
args:
|
||||||
|
- --host=tcp://0.0.0.0:2375
|
||||||
|
- --tls=false
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
env:
|
||||||
|
- name: DOCKER_TLS_CERTDIR
|
||||||
|
value: ""
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 1Gi
|
||||||
|
limits:
|
||||||
|
cpu: 2
|
||||||
|
memory: 4Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: dind-storage
|
||||||
|
mountPath: /var/lib/docker
|
||||||
|
- name: runner
|
||||||
|
image: docker.io/myoung34/github-runner:ubuntu-noble
|
||||||
|
env:
|
||||||
|
- name: ACCESS_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: github-runner-secrets
|
||||||
|
key: ACCESS_TOKEN
|
||||||
|
- name: RUNNER_SCOPE
|
||||||
|
value: repo
|
||||||
|
- name: REPO_URL
|
||||||
|
value: https://github.com/Traceworks2023/nxtgauge-backend-rust
|
||||||
|
- name: RUNNER_NAME_PREFIX
|
||||||
|
value: backend
|
||||||
|
- name: RANDOM_RUNNER_SUFFIX
|
||||||
|
value: "true"
|
||||||
|
- name: LABELS
|
||||||
|
value: ubuntu-latest,docker-ready
|
||||||
|
- name: RUNNER_WORKDIR
|
||||||
|
value: /tmp/runner/_work
|
||||||
|
- name: RUN_AS_ROOT
|
||||||
|
value: "true"
|
||||||
|
- name: DOCKER_HOST
|
||||||
|
value: tcp://127.0.0.1:2375
|
||||||
|
- name: DISABLE_AUTO_UPDATE
|
||||||
|
value: "true"
|
||||||
|
- name: UNSET_CONFIG_VARS
|
||||||
|
value: "true"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 1Gi
|
||||||
|
limits:
|
||||||
|
cpu: 4
|
||||||
|
memory: 8Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: runner-work
|
||||||
|
mountPath: /tmp/runner
|
||||||
|
volumes:
|
||||||
|
- name: dind-storage
|
||||||
|
emptyDir: {}
|
||||||
|
- name: runner-work
|
||||||
|
emptyDir: {}
|
||||||
|
|
@ -5,5 +5,6 @@ resources:
|
||||||
- ../../apps/nxtgauge-frontend-solid/overlays/prod
|
- ../../apps/nxtgauge-frontend-solid/overlays/prod
|
||||||
- ../../apps/nxtgauge-admin-solid/overlays/prod
|
- ../../apps/nxtgauge-admin-solid/overlays/prod
|
||||||
- ../../apps/nxtgauge-ai-assistant/overlays/prod
|
- ../../apps/nxtgauge-ai-assistant/overlays/prod
|
||||||
|
- ../../apps/github-actions-runners/base
|
||||||
- ../../apps/ollama/base
|
- ../../apps/ollama/base
|
||||||
- ../../ops/openobserve-alerts
|
- ../../ops/openobserve-alerts
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue