Documentation
¶
Index ¶
Constants ¶
const ( LabelKeyRunnerTemplateHash = "runner-template-hash" LabelKeyPodTemplateHash = "pod-template-hash" )
const ( EnvVarRunnerJITConfig = "ACTIONS_RUNNER_INPUT_JITCONFIG" EnvVarRunnerExtraUserAgent = "GITHUB_ACTIONS_RUNNER_EXTRA_USER_AGENT" )
const ( EnvVarHTTPProxy = "http_proxy" EnvVarHTTPSProxy = "https_proxy" EnvVarNoProxy = "no_proxy" )
Environment variable names used to set proxy variables for containers
const ( // Kubernetes labels LabelKeyKubernetesPartOf = "app.kubernetes.io/part-of" LabelKeyKubernetesComponent = "app.kubernetes.io/component" LabelKeyKubernetesVersion = "app.kubernetes.io/version" // Github labels LabelKeyGitHubScaleSetName = "actions.github.com/scale-set-name" LabelKeyGitHubScaleSetNamespace = "actions.github.com/scale-set-namespace" LabelKeyGitHubEnterprise = "actions.github.com/enterprise" LabelKeyGitHubOrganization = "actions.github.com/organization" LabelKeyGitHubRepository = "actions.github.com/repository" )
Labels applied to resources
const AnnotationKeyGitHubRunnerGroupName = "actions.github.com/runner-group-name"
const ( // EphemeralRunnerContainerName is the name of the runner container. // It represents the name of the container running the self-hosted runner image. EphemeralRunnerContainerName = "runner" )
const (
LabelKeyRunnerSpecHash = "runner-spec-hash"
)
Variables ¶
This section is empty.
Functions ¶
func RandStringRunes ¶
Types ¶
type AutoscalingListenerReconciler ¶
type AutoscalingListenerReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
AutoscalingListenerReconciler reconciles a AutoscalingListener object
func (*AutoscalingListenerReconciler) Reconcile ¶
func (r *AutoscalingListenerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile a AutoscalingListener resource to meet its desired spec.
func (*AutoscalingListenerReconciler) SetupWithManager ¶
func (r *AutoscalingListenerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type AutoscalingRunnerSetReconciler ¶
type AutoscalingRunnerSetReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
ControllerNamespace string
DefaultRunnerScaleSetListenerImage string
DefaultRunnerScaleSetListenerImagePullSecrets []string
ActionsClient actions.MultiClient
// contains filtered or unexported fields
}
AutoscalingRunnerSetReconciler reconciles a AutoscalingRunnerSet object
func (*AutoscalingRunnerSetReconciler) Reconcile ¶
func (r *AutoscalingRunnerSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile a AutoscalingRunnerSet resource to meet its desired spec.
func (*AutoscalingRunnerSetReconciler) SetupWithManager ¶
func (r *AutoscalingRunnerSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type EphemeralRunnerReconciler ¶
type EphemeralRunnerReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
ActionsClient actions.MultiClient
// contains filtered or unexported fields
}
EphemeralRunnerReconciler reconciles a EphemeralRunner object
func (*EphemeralRunnerReconciler) Reconcile ¶
func (r *EphemeralRunnerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.6.4/pkg/reconcile
func (*EphemeralRunnerReconciler) SetupWithManager ¶
func (r *EphemeralRunnerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type EphemeralRunnerSetReconciler ¶
type EphemeralRunnerSetReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
ActionsClient actions.MultiClient
// contains filtered or unexported fields
}
EphemeralRunnerSetReconciler reconciles a EphemeralRunnerSet object
func (*EphemeralRunnerSetReconciler) Reconcile ¶
func (r *EphemeralRunnerSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
The responsibility of this controller is to bring the state to the desired one, but it should avoid patching itself, because of the frequent patches that the listener is doing. The safe point where we can patch the resource is when we are reacting on finalizer. Then, the listener should be deleted first, to allow controller clean up resources without interruptions
The resource should be created with finalizer. To leave it to this controller to add it, we would risk the same issue of patching the status. Responsibility of this controller should only be to bring the count of EphemeralRunners to the desired one, not to patch this resource until it is safe to do so
func (*EphemeralRunnerSetReconciler) SetupWithManager ¶
func (r *EphemeralRunnerSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type EphemeralRunnerSets ¶
type EphemeralRunnerSets struct {
// contains filtered or unexported fields
}
NOTE: if this is logic should be used for other resources, consider using generics