mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-15 06:26:57 +00:00
Compare commits
11 Commits
actions-ru
...
actions-ru
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5fdfd63db | ||
|
|
23a45eaf87 | ||
|
|
dee997b44e | ||
|
|
2929a739e3 | ||
|
|
3cccca8d09 | ||
|
|
7a7086e7aa | ||
|
|
565b14a148 | ||
|
|
ecc441de3f | ||
|
|
25335bb3c3 | ||
|
|
9b871567b1 | ||
|
|
264cf494e3 |
@@ -292,7 +292,7 @@ A `RunnerDeployment` can scale the number of runners between `minReplicas` and `
|
|||||||
|
|
||||||
**TotalNumberOfQueuedAndInProgressWorkflowRuns**
|
**TotalNumberOfQueuedAndInProgressWorkflowRuns**
|
||||||
|
|
||||||
In the below example, `actions-runner` will pole GitHub for all pending workflows with the pole period defined by the sync period configuration. It will then scale to e.g. 3 if there're 3 pending jobs at sync time.
|
In the below example, `actions-runner` will poll GitHub for all pending workflows with the poll period defined by the sync period configuration. It will then scale to e.g. 3 if there're 3 pending jobs at sync time.
|
||||||
With this scaling metric we are required to define a list of repositories within our metric.
|
With this scaling metric we are required to define a list of repositories within our metric.
|
||||||
|
|
||||||
The scale out performance is controlled via the manager containers startup `--sync-period` argument. The default value is set to 10 minutes to prevent default deployments rate limiting themselves from the GitHub API.
|
The scale out performance is controlled via the manager containers startup `--sync-period` argument. The default value is set to 10 minutes to prevent default deployments rate limiting themselves from the GitHub API.
|
||||||
@@ -349,7 +349,7 @@ spec:
|
|||||||
|
|
||||||
**PercentageRunnersBusy**
|
**PercentageRunnersBusy**
|
||||||
|
|
||||||
The `HorizontalRunnerAutoscaler` will pole GitHub based on the configuration sync period for the number of busy runners which live in the RunnerDeployment's namespace and scale based on the settings
|
The `HorizontalRunnerAutoscaler` will poll GitHub based on the configuration sync period for the number of busy runners which live in the RunnerDeployment's namespace and scale based on the settings
|
||||||
|
|
||||||
**Kustomize Config :** The period can be customised in the `config/default/manager_auth_proxy_patch.yaml` patch<br />
|
**Kustomize Config :** The period can be customised in the `config/default/manager_auth_proxy_patch.yaml` patch<br />
|
||||||
**Helm Config :** `syncPeriod`
|
**Helm Config :** `syncPeriod`
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ type HorizontalRunnerAutoscalerStatus struct {
|
|||||||
DesiredReplicas *int `json:"desiredReplicas,omitempty"`
|
DesiredReplicas *int `json:"desiredReplicas,omitempty"`
|
||||||
|
|
||||||
// +optional
|
// +optional
|
||||||
|
// +nullable
|
||||||
LastSuccessfulScaleOutTime *metav1.Time `json:"lastSuccessfulScaleOutTime,omitempty"`
|
LastSuccessfulScaleOutTime *metav1.Time `json:"lastSuccessfulScaleOutTime,omitempty"`
|
||||||
|
|
||||||
// +optional
|
// +optional
|
||||||
|
|||||||
@@ -121,13 +121,16 @@ func (rs *RunnerSpec) ValidateRepository() error {
|
|||||||
|
|
||||||
// RunnerStatus defines the observed state of Runner
|
// RunnerStatus defines the observed state of Runner
|
||||||
type RunnerStatus struct {
|
type RunnerStatus struct {
|
||||||
|
// +optional
|
||||||
Registration RunnerStatusRegistration `json:"registration"`
|
Registration RunnerStatusRegistration `json:"registration"`
|
||||||
Phase string `json:"phase"`
|
// +optional
|
||||||
Reason string `json:"reason"`
|
Phase string `json:"phase,omitempty"`
|
||||||
Message string `json:"message"`
|
// +optional
|
||||||
|
Reason string `json:"reason,omitempty"`
|
||||||
//+optional
|
// +optional
|
||||||
LastRegistrationCheckTime *metav1.Time `json:"lastRegistrationCheckTime"`
|
Message string `json:"message,omitempty"`
|
||||||
|
// +optional
|
||||||
|
LastRegistrationCheckTime *metav1.Time `json:"lastRegistrationCheckTime,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RunnerStatusRegistration contains runner registration status
|
// RunnerStatusRegistration contains runner registration status
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ type: application
|
|||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.10.0
|
version: 0.10.3
|
||||||
|
|
||||||
home: https://github.com/summerwind/actions-runner-controller
|
home: https://github.com/summerwind/actions-runner-controller
|
||||||
|
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ spec:
|
|||||||
type: integer
|
type: integer
|
||||||
lastSuccessfulScaleOutTime:
|
lastSuccessfulScaleOutTime:
|
||||||
format: date-time
|
format: date-time
|
||||||
|
nullable: true
|
||||||
type: string
|
type: string
|
||||||
observedGeneration:
|
observedGeneration:
|
||||||
description: ObservedGeneration is the most recent generation observed
|
description: ObservedGeneration is the most recent generation observed
|
||||||
|
|||||||
@@ -1572,11 +1572,6 @@ spec:
|
|||||||
- expiresAt
|
- expiresAt
|
||||||
- token
|
- token
|
||||||
type: object
|
type: object
|
||||||
required:
|
|
||||||
- message
|
|
||||||
- phase
|
|
||||||
- reason
|
|
||||||
- registration
|
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
version: v1alpha1
|
version: v1alpha1
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ apiVersion: cert-manager.io/v1
|
|||||||
kind: Issuer
|
kind: Issuer
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "actions-runner-controller.selfsignedIssuerName" . }}
|
name: {{ include "actions-runner-controller.selfsignedIssuerName" . }}
|
||||||
namespace: {{ .Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
spec:
|
spec:
|
||||||
selfSigned: {}
|
selfSigned: {}
|
||||||
---
|
---
|
||||||
@@ -13,7 +13,7 @@ apiVersion: cert-manager.io/v1
|
|||||||
kind: Certificate
|
kind: Certificate
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "actions-runner-controller.servingCertName" . }}
|
name: {{ include "actions-runner-controller.servingCertName" . }}
|
||||||
namespace: {{ .Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
spec:
|
spec:
|
||||||
dnsNames:
|
dnsNames:
|
||||||
- {{ include "actions-runner-controller.webhookServiceName" . }}.{{ .Release.Namespace }}.svc
|
- {{ include "actions-runner-controller.webhookServiceName" . }}.{{ .Release.Namespace }}.svc
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ spec:
|
|||||||
type: integer
|
type: integer
|
||||||
lastSuccessfulScaleOutTime:
|
lastSuccessfulScaleOutTime:
|
||||||
format: date-time
|
format: date-time
|
||||||
|
nullable: true
|
||||||
type: string
|
type: string
|
||||||
observedGeneration:
|
observedGeneration:
|
||||||
description: ObservedGeneration is the most recent generation observed
|
description: ObservedGeneration is the most recent generation observed
|
||||||
|
|||||||
@@ -1572,11 +1572,6 @@ spec:
|
|||||||
- expiresAt
|
- expiresAt
|
||||||
- token
|
- token
|
||||||
type: object
|
type: object
|
||||||
required:
|
|
||||||
- message
|
|
||||||
- phase
|
|
||||||
- reason
|
|
||||||
- registration
|
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
version: v1alpha1
|
version: v1alpha1
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ func (r *RunnerReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
|
|||||||
updated.Status.LastRegistrationCheckTime = &metav1.Time{Time: time.Now()}
|
updated.Status.LastRegistrationCheckTime = &metav1.Time{Time: time.Now()}
|
||||||
|
|
||||||
if err := r.Status().Patch(ctx, updated, client.MergeFrom(&runner)); err != nil {
|
if err := r.Status().Patch(ctx, updated, client.MergeFrom(&runner)); err != nil {
|
||||||
log.Error(err, "Failed to update runner status")
|
log.Error(err, "Failed to update runner status for LastRegistrationCheckTime")
|
||||||
return ctrl.Result{}, err
|
return ctrl.Result{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -391,7 +391,7 @@ func (r *RunnerReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
|
|||||||
updated.Status.Message = pod.Status.Message
|
updated.Status.Message = pod.Status.Message
|
||||||
|
|
||||||
if err := r.Status().Patch(ctx, updated, client.MergeFrom(&runner)); err != nil {
|
if err := r.Status().Patch(ctx, updated, client.MergeFrom(&runner)); err != nil {
|
||||||
log.Error(err, "Failed to update runner status")
|
log.Error(err, "Failed to update runner status for Phase/Reason/Message")
|
||||||
return ctrl.Result{}, err
|
return ctrl.Result{}, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -463,8 +463,8 @@ func (r *RunnerReconciler) updateRegistrationToken(ctx context.Context, runner v
|
|||||||
ExpiresAt: metav1.NewTime(rt.GetExpiresAt().Time),
|
ExpiresAt: metav1.NewTime(rt.GetExpiresAt().Time),
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := r.Status().Update(ctx, updated); err != nil {
|
if err := r.Status().Patch(ctx, updated, client.MergeFrom(&runner)); err != nil {
|
||||||
log.Error(err, "Failed to update runner status")
|
log.Error(err, "Failed to update runner status for Registration")
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ func Match(pat string, s string) bool {
|
|||||||
|
|
||||||
s = subs[1]
|
s = subs[1]
|
||||||
|
|
||||||
wildcardInHead = false
|
wildcardInHead = wildcardInTail
|
||||||
}
|
}
|
||||||
|
|
||||||
r := s == ""
|
r := s == ""
|
||||||
|
|||||||
@@ -195,4 +195,20 @@ func TestMatch(t *testing.T) {
|
|||||||
Want: false,
|
Want: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
t.Run("actions-*-metrics == actions-workflow-metrics", func(t *testing.T) {
|
||||||
|
run(t, testcase{
|
||||||
|
Pattern: "actions-*-metrics",
|
||||||
|
Target: "actions-workflow-metrics",
|
||||||
|
Want: true,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
t.Run("!actions-*-metrics == actions-workflow-metrics", func(t *testing.T) {
|
||||||
|
run(t, testcase{
|
||||||
|
Pattern: "!actions-*-metrics",
|
||||||
|
Target: "actions-workflow-metrics",
|
||||||
|
Want: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user