mirror of
https://github.com/bapung/gitea-runner-operator.git
synced 2026-06-21 23:48:43 +00:00
feat: implement working reconciliation logic and documentation
initial commit for working reconciliation logic, no automated test only manually tested for now
This commit is contained in:
@@ -107,12 +107,17 @@ spec:
|
||||
description: Repo is required if scope is 'repo'
|
||||
type: string
|
||||
scope:
|
||||
description: Scope defines the scope of the runner (global, org, repo)
|
||||
description: Scope defines the scope of the runner (global, org, user,
|
||||
repo)
|
||||
enum:
|
||||
- global
|
||||
- org
|
||||
- user
|
||||
- repo
|
||||
type: string
|
||||
user:
|
||||
description: User is required if scope is 'user'
|
||||
type: string
|
||||
required:
|
||||
- authToken
|
||||
- giteaURL
|
||||
|
||||
10
config/manager/image_pull_secret_patch.yaml
Normal file
10
config/manager/image_pull_secret_patch.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: ghcr-secret
|
||||
@@ -1,2 +1,11 @@
|
||||
resources:
|
||||
- manager.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
images:
|
||||
- name: controller
|
||||
newName: ghcr.io/bapung/gitea-runner-operator
|
||||
newTag: sha-b33c78b
|
||||
|
||||
patchesStrategicMerge:
|
||||
- image_pull_secret_patch.yaml
|
||||
|
||||
@@ -10,6 +10,6 @@ roleRef:
|
||||
kind: ClusterRole
|
||||
name: manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
- kind: ServiceAccount
|
||||
name: controller-manager
|
||||
namespace: gitea-runner-operator-system
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: gitea-credentials
|
||||
labels:
|
||||
app.kubernetes.io/name: gitea-runner-operator
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
stringData:
|
||||
# The Gitea API Token (for the Operator to poll for jobs)
|
||||
auth-token: "MMUCFRXCbofYn2L0aT2OP2aug7JhChNJlULKNLgg"
|
||||
# The Runner Registration Token (for the Runner to register itself)
|
||||
registration-token: "5r4lpLA9rKCZZEHyUyKHeA187DoaElcTBySITRRi"
|
||||
---
|
||||
apiVersion: gitea.bpg.pw/v1alpha1
|
||||
kind: RunnerGroup
|
||||
metadata:
|
||||
@@ -6,4 +19,29 @@ metadata:
|
||||
app.kubernetes.io/managed-by: kustomize
|
||||
name: runnergroup-sample
|
||||
spec:
|
||||
# TODO(user): Add fields here
|
||||
# The base URL of your Gitea instance
|
||||
giteaURL: "https://gitea.bpg.pw"
|
||||
|
||||
# Scope of the runners (global, org, or repo)
|
||||
scope: "org"
|
||||
#org: "bapungorg" # Required if scope is 'org' or 'repo'; cannot be used with user
|
||||
user: "bapung" # Required if scope is 'user' or 'repo'; cannot be used with org
|
||||
#repo: "dummy-service-workflow" # Required if scope is 'repo'
|
||||
|
||||
# Labels to identify this runner group
|
||||
labels:
|
||||
- "linux"
|
||||
- "amd64"
|
||||
|
||||
# Maximum number of runners to spawn concurrently
|
||||
maxActiveRunners: 5
|
||||
|
||||
# Reference to the Secret containing the API token
|
||||
authToken:
|
||||
name: gitea-credentials
|
||||
key: auth-token
|
||||
|
||||
# Reference to the Secret containing the Registration token
|
||||
registrationToken:
|
||||
name: gitea-credentials
|
||||
key: registration-token
|
||||
|
||||
Reference in New Issue
Block a user