controllers

package
v1.47.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0, MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RunnerRunning indicates GitLab Runner
	// is Running
	RunnerRunning string = "Running"
	// RunnerPending indicates initiliazing
	RunnerPending string = "Pending"
	// RunnerFailed indicates error
	RunnerFailed string = "Failed"
	// RunnerWaiting indicates waiting for secret
	RunnerWaiting string = "Waiting"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.8.0

type Client interface {
	Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error
	List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

	Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) error
	Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
	Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
	Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
	Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
	DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

	Status() client.StatusWriter

	SubResource(subResource string) client.SubResourceClient

	Scheme() *runtime.Scheme

	RESTMapper() meta.RESTMapper

	GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)

	IsObjectNamespaced(obj runtime.Object) (bool, error)
}

Client is a proxy interface, so we can generate mocks for it and use it in tests

type MockClient added in v1.8.0

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient added in v1.15.0

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) Apply added in v1.47.0

func (_mock *MockClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) error

Apply provides a mock function for the type MockClient

func (*MockClient) Create added in v1.8.0

func (_mock *MockClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

Create provides a mock function for the type MockClient

func (*MockClient) Delete added in v1.8.0

func (_mock *MockClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

Delete provides a mock function for the type MockClient

func (*MockClient) DeleteAllOf added in v1.8.0

func (_mock *MockClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error

DeleteAllOf provides a mock function for the type MockClient

func (*MockClient) EXPECT added in v1.47.0

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) Get added in v1.8.0

func (_mock *MockClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error

Get provides a mock function for the type MockClient

func (*MockClient) GroupVersionKindFor added in v1.47.0

func (_mock *MockClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)

GroupVersionKindFor provides a mock function for the type MockClient

func (*MockClient) IsObjectNamespaced added in v1.47.0

func (_mock *MockClient) IsObjectNamespaced(obj runtime.Object) (bool, error)

IsObjectNamespaced provides a mock function for the type MockClient

func (*MockClient) List added in v1.8.0

func (_mock *MockClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

List provides a mock function for the type MockClient

func (*MockClient) Patch added in v1.8.0

func (_mock *MockClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error

Patch provides a mock function for the type MockClient

func (*MockClient) RESTMapper added in v1.8.0

func (_mock *MockClient) RESTMapper() meta.RESTMapper

RESTMapper provides a mock function for the type MockClient

func (*MockClient) Scheme added in v1.8.0

func (_mock *MockClient) Scheme() *runtime.Scheme

Scheme provides a mock function for the type MockClient

func (*MockClient) Status added in v1.8.0

func (_mock *MockClient) Status() client.StatusWriter

Status provides a mock function for the type MockClient

func (*MockClient) SubResource added in v1.47.0

func (_mock *MockClient) SubResource(subResource string) client.SubResourceClient

SubResource provides a mock function for the type MockClient

func (*MockClient) Update added in v1.8.0

func (_mock *MockClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

Update provides a mock function for the type MockClient

type MockClient_Apply_Call added in v1.47.0

type MockClient_Apply_Call struct {
	*mock.Call
}

MockClient_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'

func (*MockClient_Apply_Call) Return added in v1.47.0

func (*MockClient_Apply_Call) Run added in v1.47.0

func (*MockClient_Apply_Call) RunAndReturn added in v1.47.0

type MockClient_Create_Call added in v1.47.0

type MockClient_Create_Call struct {
	*mock.Call
}

MockClient_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'

func (*MockClient_Create_Call) Return added in v1.47.0

func (*MockClient_Create_Call) Run added in v1.47.0

func (*MockClient_Create_Call) RunAndReturn added in v1.47.0

func (_c *MockClient_Create_Call) RunAndReturn(run func(ctx context.Context, obj client.Object, opts ...client.CreateOption) error) *MockClient_Create_Call

type MockClient_DeleteAllOf_Call added in v1.47.0

type MockClient_DeleteAllOf_Call struct {
	*mock.Call
}

MockClient_DeleteAllOf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAllOf'

func (*MockClient_DeleteAllOf_Call) Return added in v1.47.0

func (*MockClient_DeleteAllOf_Call) Run added in v1.47.0

func (*MockClient_DeleteAllOf_Call) RunAndReturn added in v1.47.0

type MockClient_Delete_Call added in v1.47.0

type MockClient_Delete_Call struct {
	*mock.Call
}

MockClient_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*MockClient_Delete_Call) Return added in v1.47.0

func (*MockClient_Delete_Call) Run added in v1.47.0

func (*MockClient_Delete_Call) RunAndReturn added in v1.47.0

func (_c *MockClient_Delete_Call) RunAndReturn(run func(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error) *MockClient_Delete_Call

type MockClient_Expecter added in v1.47.0

type MockClient_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockClient_Expecter) Apply added in v1.47.0

func (_e *MockClient_Expecter) Apply(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_Apply_Call

Apply is a helper method to define mock.On call

  • ctx context.Context
  • obj runtime.ApplyConfiguration
  • opts ...client.ApplyOption

func (*MockClient_Expecter) Create added in v1.47.0

func (_e *MockClient_Expecter) Create(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_Create_Call

Create is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.CreateOption

func (*MockClient_Expecter) Delete added in v1.47.0

func (_e *MockClient_Expecter) Delete(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.DeleteOption

func (*MockClient_Expecter) DeleteAllOf added in v1.47.0

func (_e *MockClient_Expecter) DeleteAllOf(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_DeleteAllOf_Call

DeleteAllOf is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.DeleteAllOfOption

func (*MockClient_Expecter) Get added in v1.47.0

func (_e *MockClient_Expecter) Get(ctx interface{}, key interface{}, obj interface{}, opts ...interface{}) *MockClient_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key client.ObjectKey
  • obj client.Object
  • opts ...client.GetOption

func (*MockClient_Expecter) GroupVersionKindFor added in v1.47.0

func (_e *MockClient_Expecter) GroupVersionKindFor(obj interface{}) *MockClient_GroupVersionKindFor_Call

GroupVersionKindFor is a helper method to define mock.On call

  • obj runtime.Object

func (*MockClient_Expecter) IsObjectNamespaced added in v1.47.0

func (_e *MockClient_Expecter) IsObjectNamespaced(obj interface{}) *MockClient_IsObjectNamespaced_Call

IsObjectNamespaced is a helper method to define mock.On call

  • obj runtime.Object

func (*MockClient_Expecter) List added in v1.47.0

func (_e *MockClient_Expecter) List(ctx interface{}, list interface{}, opts ...interface{}) *MockClient_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • list client.ObjectList
  • opts ...client.ListOption

func (*MockClient_Expecter) Patch added in v1.47.0

func (_e *MockClient_Expecter) Patch(ctx interface{}, obj interface{}, patch interface{}, opts ...interface{}) *MockClient_Patch_Call

Patch is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • patch client.Patch
  • opts ...client.PatchOption

func (*MockClient_Expecter) RESTMapper added in v1.47.0

RESTMapper is a helper method to define mock.On call

func (*MockClient_Expecter) Scheme added in v1.47.0

Scheme is a helper method to define mock.On call

func (*MockClient_Expecter) Status added in v1.47.0

Status is a helper method to define mock.On call

func (*MockClient_Expecter) SubResource added in v1.47.0

func (_e *MockClient_Expecter) SubResource(subResource interface{}) *MockClient_SubResource_Call

SubResource is a helper method to define mock.On call

  • subResource string

func (*MockClient_Expecter) Update added in v1.47.0

func (_e *MockClient_Expecter) Update(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_Update_Call

Update is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.UpdateOption

type MockClient_Get_Call added in v1.47.0

type MockClient_Get_Call struct {
	*mock.Call
}

MockClient_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*MockClient_Get_Call) Return added in v1.47.0

func (*MockClient_Get_Call) Run added in v1.47.0

func (*MockClient_Get_Call) RunAndReturn added in v1.47.0

func (_c *MockClient_Get_Call) RunAndReturn(run func(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error) *MockClient_Get_Call

type MockClient_GroupVersionKindFor_Call added in v1.47.0

type MockClient_GroupVersionKindFor_Call struct {
	*mock.Call
}

MockClient_GroupVersionKindFor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GroupVersionKindFor'

func (*MockClient_GroupVersionKindFor_Call) Return added in v1.47.0

func (*MockClient_GroupVersionKindFor_Call) Run added in v1.47.0

func (*MockClient_GroupVersionKindFor_Call) RunAndReturn added in v1.47.0

type MockClient_IsObjectNamespaced_Call added in v1.47.0

type MockClient_IsObjectNamespaced_Call struct {
	*mock.Call
}

MockClient_IsObjectNamespaced_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsObjectNamespaced'

func (*MockClient_IsObjectNamespaced_Call) Return added in v1.47.0

func (*MockClient_IsObjectNamespaced_Call) Run added in v1.47.0

func (*MockClient_IsObjectNamespaced_Call) RunAndReturn added in v1.47.0

type MockClient_List_Call added in v1.47.0

type MockClient_List_Call struct {
	*mock.Call
}

MockClient_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'

func (*MockClient_List_Call) Return added in v1.47.0

func (*MockClient_List_Call) Run added in v1.47.0

func (*MockClient_List_Call) RunAndReturn added in v1.47.0

func (_c *MockClient_List_Call) RunAndReturn(run func(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error) *MockClient_List_Call

type MockClient_Patch_Call added in v1.47.0

type MockClient_Patch_Call struct {
	*mock.Call
}

MockClient_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch'

func (*MockClient_Patch_Call) Return added in v1.47.0

func (*MockClient_Patch_Call) Run added in v1.47.0

func (*MockClient_Patch_Call) RunAndReturn added in v1.47.0

func (_c *MockClient_Patch_Call) RunAndReturn(run func(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error) *MockClient_Patch_Call

type MockClient_RESTMapper_Call added in v1.47.0

type MockClient_RESTMapper_Call struct {
	*mock.Call
}

MockClient_RESTMapper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RESTMapper'

func (*MockClient_RESTMapper_Call) Return added in v1.47.0

func (*MockClient_RESTMapper_Call) Run added in v1.47.0

func (*MockClient_RESTMapper_Call) RunAndReturn added in v1.47.0

type MockClient_Scheme_Call added in v1.47.0

type MockClient_Scheme_Call struct {
	*mock.Call
}

MockClient_Scheme_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Scheme'

func (*MockClient_Scheme_Call) Return added in v1.47.0

func (*MockClient_Scheme_Call) Run added in v1.47.0

func (_c *MockClient_Scheme_Call) Run(run func()) *MockClient_Scheme_Call

func (*MockClient_Scheme_Call) RunAndReturn added in v1.47.0

func (_c *MockClient_Scheme_Call) RunAndReturn(run func() *runtime.Scheme) *MockClient_Scheme_Call

type MockClient_Status_Call added in v1.47.0

type MockClient_Status_Call struct {
	*mock.Call
}

MockClient_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status'

func (*MockClient_Status_Call) Return added in v1.47.0

func (*MockClient_Status_Call) Run added in v1.47.0

func (_c *MockClient_Status_Call) Run(run func()) *MockClient_Status_Call

func (*MockClient_Status_Call) RunAndReturn added in v1.47.0

func (_c *MockClient_Status_Call) RunAndReturn(run func() client.StatusWriter) *MockClient_Status_Call

type MockClient_SubResource_Call added in v1.47.0

type MockClient_SubResource_Call struct {
	*mock.Call
}

MockClient_SubResource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubResource'

func (*MockClient_SubResource_Call) Return added in v1.47.0

func (*MockClient_SubResource_Call) Run added in v1.47.0

func (_c *MockClient_SubResource_Call) Run(run func(subResource string)) *MockClient_SubResource_Call

func (*MockClient_SubResource_Call) RunAndReturn added in v1.47.0

type MockClient_Update_Call added in v1.47.0

type MockClient_Update_Call struct {
	*mock.Call
}

MockClient_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'

func (*MockClient_Update_Call) Return added in v1.47.0

func (*MockClient_Update_Call) Run added in v1.47.0

func (*MockClient_Update_Call) RunAndReturn added in v1.47.0

func (_c *MockClient_Update_Call) RunAndReturn(run func(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error) *MockClient_Update_Call

type RunnerReconciler

type RunnerReconciler struct {
	Client

	// DEPRECATED: Should be removed when the `registration-token` is deprecated
	IsAuthToken bool
	// contains filtered or unexported fields
}

RunnerReconciler reconciles a Runner object

func New added in v1.27.0

func New(mgr ctrl.Manager, version string) (*RunnerReconciler, error)

New creates a new RunnerReconciler from a ctrl.Manager

func (*RunnerReconciler) Reconcile

func (r *RunnerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile triggers when an event occurs on the watched resource

type RunnerReconcilerClient added in v1.8.0

type RunnerReconcilerClient struct {
	// contains filtered or unexported fields
}

RunnerReconcilerClient is a proxy struct that wraps the native Client method calls

func NewRunnerReconcilerClient added in v1.8.0

func NewRunnerReconcilerClient(inner client.Client) *RunnerReconcilerClient

NewRunnerReconcilerClient creates a RunnerReconcilerClient from an already existing client.Client

func (*RunnerReconcilerClient) Apply added in v1.47.0

Apply applies the given apply configuration to the Kubernetes cluster.

func (*RunnerReconcilerClient) Create added in v1.8.0

Create saves the object obj in the Kubernetes cluster.

func (*RunnerReconcilerClient) Delete added in v1.8.0

Delete deletes the given obj from Kubernetes cluster.

func (*RunnerReconcilerClient) DeleteAllOf added in v1.8.0

DeleteAllOf deletes all objects of the given type matching the given options.

func (*RunnerReconcilerClient) Get added in v1.8.0

Get retrieves an obj for the given object key from the Kubernetes Cluster. obj must be a struct pointer so that obj can be updated with the response returned by the Server.

func (*RunnerReconcilerClient) GroupVersionKindFor added in v1.47.0

func (r *RunnerReconcilerClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)

GroupVersionKindFor returns the GroupVersionKind for the given object.

func (*RunnerReconcilerClient) IsObjectNamespaced added in v1.47.0

func (r *RunnerReconcilerClient) IsObjectNamespaced(obj runtime.Object) (bool, error)

IsObjectNamespaced returns true if the GroupVersionKind of the object is namespaced.

func (*RunnerReconcilerClient) List added in v1.8.0

List retrieves list of objects for a given namespace and list options. On a successful call, Items field in the list will be populated with the result returned from the server.

func (*RunnerReconcilerClient) Patch added in v1.8.0

Patch patches the given obj in the Kubernetes cluster. obj must be a struct pointer so that obj can be updated with the content returned by the Server.

func (*RunnerReconcilerClient) RESTMapper added in v1.8.0

func (r *RunnerReconcilerClient) RESTMapper() meta.RESTMapper

RESTMapper returns the rest this client is using.

func (*RunnerReconcilerClient) Scheme added in v1.8.0

func (r *RunnerReconcilerClient) Scheme() *runtime.Scheme

Scheme returns the scheme this client is using.

func (*RunnerReconcilerClient) Status added in v1.8.0

Status knows how to create a client which can update status subresource for kubernetes objects.

func (*RunnerReconcilerClient) SubResource added in v1.47.0

func (r *RunnerReconcilerClient) SubResource(subResource string) client.SubResourceClient

SubResource returns a subresource client for the named subResource.

func (*RunnerReconcilerClient) Update added in v1.8.0

Update updates the given obj in the Kubernetes cluster. obj must be a struct pointer so that obj can be updated with the content returned by the Server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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