controller

package
v0.0.0-...-5b4d277 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2024 License: GPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePod

func DeletePod(ctx context.Context, cli client.Client, namespace string, podName string) error

DeletePod deletes a pod by name in the specified namespace.

func GetMatchingPods

func GetMatchingPods(ctx context.Context, cli client.Client, namespace, runnerScaleSetName string) ([]corev1.Pod, error)

Types

type PipelineInfo

type PipelineInfo struct {
	Token string `json:"token"`
	URL   string `json:"url"`
}

type RegistrationTokenResponse

type RegistrationTokenResponse struct {
	Token string `json:"token"`
}

type RunnerScaleSetReconciler

type RunnerScaleSetReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Log    logr.Logger
}

RunnerScaleSetReconciler reconciles a RunnerScaleSet object

func (*RunnerScaleSetReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the RunnerScaleSet object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.17.3/pkg/reconcile

func (*RunnerScaleSetReconciler) SetupWithManager

func (r *RunnerScaleSetReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ScaleSetList

type ScaleSetList struct {
	Count int64            `json:"count"`
	Value []ScaleSetStatus `json:"value"`
}

type ScaleSetStatus

type ScaleSetStatus struct {
	AcquireJobsURL       string `json:"acquireJobsUrl"`
	CreateSessionURL     string `json:"createSessionUrl"`
	CreatedOn            string `json:"createdOn"`
	Enabled              bool   `json:"enabled"`
	GetAcquirableJobsURL string `json:"getAcquirableJobsUrl"`
	ID                   int64  `json:"id"`
	Labels               []struct {
		ID   int64  `json:"id"`
		Name string `json:"name"`
		Type string `json:"type"`
	} `json:"labels"`
	Name               string `json:"name"`
	QueueName          string `json:"queueName"`
	RunnerGroupID      int64  `json:"runnerGroupId"`
	RunnerGroupName    string `json:"runnerGroupName"`
	RunnerJitConfigURL string `json:"runnerJitConfigUrl"`
	RunnerSetting      struct {
		DisableUpdate bool        `json:"disableUpdate"`
		Ephemeral     bool        `json:"ephemeral"`
		ID            int64       `json:"id"`
		Name          interface{} `json:"name"`
		RunnerGroupID interface{} `json:"runnerGroupId"`
		Status        int64       `json:"status"`
		Version       interface{} `json:"version"`
	} `json:"runnerSetting"`
	Statistics struct {
		TotalAcquiredJobs      int64 `json:"totalAcquiredJobs"`
		TotalAssignedJobs      int64 `json:"totalAssignedJobs"`
		TotalAvailableJobs     int64 `json:"totalAvailableJobs"`
		TotalBusyRunners       int64 `json:"totalBusyRunners"`
		TotalIdleRunners       int64 `json:"totalIdleRunners"`
		TotalRegisteredRunners int64 `json:"totalRegisteredRunners"`
		TotalRunningJobs       int64 `json:"totalRunningJobs"`
	} `json:"statistics"`
	Status string `json:"status"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL