controllers

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0, MIT Imports: 29 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"
)
View Source
const (

	// ErrTokenNotFound returns when token secret is not found
	ErrTokenNotFound runnerctl.CustomError = "token secret not found"
)

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) error
	List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) 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

	Scheme() *runtime.Scheme

	RESTMapper() meta.RESTMapper
}

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 (*MockClient) Create added in v1.8.0

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

Create provides a mock function with given fields: ctx, obj, opts

func (*MockClient) Delete added in v1.8.0

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

Delete provides a mock function with given fields: ctx, obj, opts

func (*MockClient) DeleteAllOf added in v1.8.0

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

DeleteAllOf provides a mock function with given fields: ctx, obj, opts

func (*MockClient) Get added in v1.8.0

Get provides a mock function with given fields: ctx, key, obj

func (*MockClient) List added in v1.8.0

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

List provides a mock function with given fields: ctx, list, opts

func (*MockClient) Patch added in v1.8.0

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

Patch provides a mock function with given fields: ctx, obj, patch, opts

func (*MockClient) RESTMapper added in v1.8.0

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

RESTMapper provides a mock function with given fields:

func (*MockClient) Scheme added in v1.8.0

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

Scheme provides a mock function with given fields:

func (*MockClient) Status added in v1.8.0

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

Status provides a mock function with given fields:

func (*MockClient) Update added in v1.8.0

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

Update provides a mock function with given fields: ctx, obj, opts

type RunnerReconciler

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

RunnerReconciler reconciles a Runner object

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

func (*RunnerReconciler) SetupWithManager

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

SetupWithManager configures the custom resource watched resources

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) 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) 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) 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