controllers

package
v0.0.0-...-6dac9e7 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObjectKey

func ObjectKey(object metav1.Object) client.ObjectKey

ObjectKey returns client.ObjectKey for the object.

Types

type EventData

type EventData struct {
	Revision, Severity, Message string
	Metadata                    map[string]string
}

type KonfigurationHealthCheck

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

func NewHealthCheck

func NewHealthCheck(konfiguration *konfigurationv1.Konfiguration, statusPoller *polling.StatusPoller) *KonfigurationHealthCheck

func (*KonfigurationHealthCheck) Assess

func (hc *KonfigurationHealthCheck) Assess(pollInterval time.Duration) error

type KonfigurationImpersonation

type KonfigurationImpersonation struct {
	client.Client
	// contains filtered or unexported fields
}

func NewKonfigurationImpersonation

func NewKonfigurationImpersonation(
	konfiguration *konfigurationv1.Konfiguration,
	kubeClient client.Client,
	statusPoller *polling.StatusPoller,
	workdir string) *KonfigurationImpersonation

func (*KonfigurationImpersonation) GetClient

GetClient creates a controller-runtime client for talking to a Kubernetes API server. If KubeConfig is set, will use the kubeconfig bytes from the Kubernetes secret. If ServiceAccountName is set, will use the cluster provided kubeconfig impersonating the SA. If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running in cluster and use the cluster provided kubeconfig.

func (*KonfigurationImpersonation) GetKubecfgArgs

func (ki *KonfigurationImpersonation) GetKubecfgArgs(ctx context.Context) ([]string, error)

GetKubecfgArgs will retrieve/write any necessary assets and return a slice of arguments to pass to kubecfg invocations.

func (*KonfigurationImpersonation) GetServiceAccountToken

func (ki *KonfigurationImpersonation) GetServiceAccountToken(ctx context.Context) (string, error)

func (*KonfigurationImpersonation) WriteKubeConfig

func (ki *KonfigurationImpersonation) WriteKubeConfig(ctx context.Context) (string, error)

type KonfigurationReconciler

type KonfigurationReconciler struct {
	client.Client
	Scheme                *runtime.Scheme
	EventRecorder         kuberecorder.EventRecorder
	ExternalEventRecorder *events.Recorder
	MetricsRecorder       *metrics.Recorder
	StatusPoller          *polling.StatusPoller
	// contains filtered or unexported fields
}

KonfigurationReconciler reconciles a Konfiguration object

func (*KonfigurationReconciler) Reconcile

func (r *KonfigurationReconciler) 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.8.3/pkg/reconcile

func (*KonfigurationReconciler) SetupWithManager

func (r *KonfigurationReconciler) SetupWithManager(log logr.Logger, mgr ctrl.Manager, opts *ReconcilerOptions) error

SetupWithManager sets up the controller with the Manager.

type ReconcilerOptions

type ReconcilerOptions struct {
	MaxConcurrentReconciles   int
	HTTPRetryMax              int
	DependencyRequeueInterval time.Duration
	JsonnetCacheDirectory     string
}

type SourceRevisionChangePredicate

type SourceRevisionChangePredicate struct {
	predicate.Funcs
}

func (SourceRevisionChangePredicate) Update

Jump to

Keyboard shortcuts

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