controllers

package
v0.4.12 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelKeyRunnerTemplateHash = "runner-template-hash"
)

Variables

This section is empty.

Functions

func CloneAndAddLabel

func CloneAndAddLabel(labels map[string]string, labelKey, labelValue string) map[string]string

Clones the given map and returns a new map with the given key and value added. Returns the given map, if labelKey is empty.

Proudly copied from k8s.io/kubernetes/pkg/util/labels.CloneAndAddLabel

func ComputeHash

func ComputeHash(template interface{}) string

ComputeHash returns a hash value calculated from pod template and a collisionCount to avoid hash collision. The hash will be safe encoded to avoid bad words.

Proudly modified and adopted from k8s.io/kubernetes/pkg/util/hash.DeepHashObject and k8s.io/kubernetes/pkg/controller.ComputeHash.

Types

type RunnerDeploymentReconciler

type RunnerDeploymentReconciler struct {
	client.Client
	Log      logr.Logger
	Recorder record.EventRecorder
	Scheme   *runtime.Scheme
}

RunnerDeploymentReconciler reconciles a Runner object

func (*RunnerDeploymentReconciler) Reconcile

func (r *RunnerDeploymentReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*RunnerDeploymentReconciler) SetupWithManager

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

type RunnerReconciler

type RunnerReconciler struct {
	client.Client
	Log          logr.Logger
	Recorder     record.EventRecorder
	Scheme       *runtime.Scheme
	GitHubClient *github.Client
	RunnerImage  string
	DockerImage  string
}

RunnerReconciler reconciles a Runner object

func (*RunnerReconciler) Reconcile

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

func (*RunnerReconciler) SetupWithManager

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

type RunnerReplicaSetReconciler

type RunnerReplicaSetReconciler struct {
	client.Client
	Log      logr.Logger
	Recorder record.EventRecorder
	Scheme   *runtime.Scheme
}

RunnerReplicaSetReconciler reconciles a Runner object

func (*RunnerReplicaSetReconciler) Reconcile

func (r *RunnerReplicaSetReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*RunnerReplicaSetReconciler) SetupWithManager

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

Jump to

Keyboard shortcuts

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