controllers

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const KubeConfig = "kubeconfig"

KubeConfig is the key for the kubeconfig

Variables

This section is empty.

Functions

func CreateOrUpdateDiscardResult

func CreateOrUpdateDiscardResult(ctx context.Context, cs *ClientSet, obj runtime.Object, f controllerutil.MutateFn) error

func GenerateKubeconfigFromTokenSecret

func GenerateKubeconfigFromTokenSecret(clusterName string, contextNamespace string, apiServerHost string, secret *corev1.Secret) ([]byte, error)

GenerateKubeconfigFromTokenSecret generates a kubeconfig using the provided

func ValidateClientConfig

func ValidateClientConfig(config clientcmdapi.Config) error

ValidateClientConfig validates that the auth info of a given kubeconfig doesn't have unsupported fields.

func WaitUntilTokenAvailable

func WaitUntilTokenAvailable(ctx context.Context, cs *ClientSet, serviceAccount *corev1.ServiceAccount) (*corev1.Secret, error)

WaitUntilTokenAvailable waits until the secret that is referenced in the service account exists and returns it.

Types

type ClientSet

type ClientSet struct {
	*rest.Config
	client.Client
	Kubernetes kubernetes.Interface
}

func NewClientSet

func NewClientSet(config *rest.Config, client client.Client, kubernetes kubernetes.Interface) *ClientSet

func NewClientSetForConfig

func NewClientSetForConfig(config *rest.Config, opts client.Options) (*ClientSet, error)

NewClientSetForConfig returns a new controller ClientSet struct from a config.

func NewClientSetFromBytes

func NewClientSetFromBytes(kubeconfig []byte, opts client.Options) (*ClientSet, error)

NewClientSetFromBytes creates a new controller ClientSet struct for a given kubeconfig byte slice.

func NewClientSetFromClusterCredentials

func NewClientSetFromClusterCredentials(ctx context.Context, cs *ClientSet, credentials extensionsv1alpha1.ClusterCredentials) (*ClientSet, error)

func NewClientSetFromSecret

func NewClientSetFromSecret(config *rest.Config, secret *corev1.Secret, opts client.Options) (*ClientSet, error)

NewClientSetFromSecret creates a new controller ClientSet struct for a given secret. Client is created either from "kubeconfig" or "token" and "ca.crt" data keys

func NewClientSetFromSecretRef

func NewClientSetFromSecretRef(ctx context.Context, cs *ClientSet, ref *corev1.SecretReference) (*ClientSet, error)

func NewClientSetFromServiceAccountRef

func NewClientSetFromServiceAccountRef(ctx context.Context, cs *ClientSet, ref *corev1.ObjectReference) (*ClientSet, error)

type TerminalHeartbeatReconciler

type TerminalHeartbeatReconciler struct {
	client.Client
	Log      logr.Logger
	Recorder record.EventRecorder
	Config   *extensionsv1alpha1.ControllerManagerConfiguration
}

TerminalHeartbeatReconciler reconciles a TerminalHeartbeat object

func (*TerminalHeartbeatReconciler) Reconcile

func (*TerminalHeartbeatReconciler) SetupWithManager

type TerminalReconciler

type TerminalReconciler struct {
	Scheme *runtime.Scheme
	*ClientSet
	Recorder                    record.EventRecorder
	Log                         logr.Logger
	Config                      *extensionsv1alpha1.ControllerManagerConfiguration
	ReconcilerCountPerNamespace map[string]int
	// contains filtered or unexported fields
}

TerminalReconciler reconciles a Terminal object

func (*TerminalReconciler) Reconcile

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

func (*TerminalReconciler) SetupWithManager

Jump to

Keyboard shortcuts

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