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:
@@ -32,14 +32,16 @@ const (
|
||||
RunnerGroupScopeGlobal RunnerGroupScope = "global"
|
||||
// RunnerGroupScopeOrg means the runner group is scoped to an organization
|
||||
RunnerGroupScopeOrg RunnerGroupScope = "org"
|
||||
// RunnerGroupScopeUser means the runner group is scoped to a user
|
||||
RunnerGroupScopeUser RunnerGroupScope = "user"
|
||||
// RunnerGroupScopeRepo means the runner group is scoped to a repository
|
||||
RunnerGroupScopeRepo RunnerGroupScope = "repo"
|
||||
)
|
||||
|
||||
// RunnerGroupSpec defines the desired state of RunnerGroup.
|
||||
type RunnerGroupSpec struct {
|
||||
// Scope defines the scope of the runner (global, org, repo)
|
||||
// +kubebuilder:validation:Enum=global;org;repo
|
||||
// Scope defines the scope of the runner (global, org, user, repo)
|
||||
// +kubebuilder:validation:Enum=global;org;user;repo
|
||||
// +kubebuilder:validation:Required
|
||||
Scope RunnerGroupScope `json:"scope"`
|
||||
|
||||
@@ -47,6 +49,10 @@ type RunnerGroupSpec struct {
|
||||
// +optional
|
||||
Org string `json:"org,omitempty"`
|
||||
|
||||
// User is required if scope is 'user'
|
||||
// +optional
|
||||
User string `json:"user,omitempty"`
|
||||
|
||||
// Repo is required if scope is 'repo'
|
||||
// +optional
|
||||
Repo string `json:"repo,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user