controllers

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const OIDC_USER_PREFIX = "sap.ids:"

Variables

View Source
var (
	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: v1alpha1.GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	DefaultTwuniUser = "user"
	DefaultTwuniPass = "pass"
)

Functions

func DeepUpdate

func DeepUpdate(m1, m2 map[string]any)

This will update map m1 with the values of map m2 doing deep update. The purpose is to prepare HELM values from different YML sources

func TemplateRateLimiter

func TemplateRateLimiter(failureBaseDelay time.Duration, failureMaxDelay time.Duration,
	frequency int, burst int,
) ratelimiter.RateLimiter

TemplateRateLimiter implements a rate limiter for a client-go.workqueue. It has both an overall (token bucket) and per-item (exponential) rate limiting.

Types

type CFAPIReconciler

type CFAPIReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	*rest.Config
	// EventRecorder for creating k8s events
	record.EventRecorder
	FinalState         v1alpha1.State
	FinalDeletionState v1alpha1.State
}

CFAPIReconciler reconciles a Sample object.

func (*CFAPIReconciler) HandleDeletingState

func (r *CFAPIReconciler) HandleDeletingState(ctx context.Context, objectInstance *v1alpha1.CFAPI) error

HandleDeletingState processed the deletion on the reconciled resource. Once the deletion if processed the relevant finalizers (if applied) are removed.

func (*CFAPIReconciler) HandleErrorState

func (r *CFAPIReconciler) HandleErrorState(ctx context.Context, objectInstance *v1alpha1.CFAPI) error

HandleErrorState handles error recovery for the reconciled resource.

func (*CFAPIReconciler) HandleInitialState

func (r *CFAPIReconciler) HandleInitialState(ctx context.Context, objectInstance *v1alpha1.CFAPI) error

HandleInitialState bootstraps state handling for the reconciled resource.

func (*CFAPIReconciler) HandleProcessingState

func (r *CFAPIReconciler) HandleProcessingState(ctx context.Context, objectInstance *v1alpha1.CFAPI) error

HandleProcessingState processes the reconciled resource by processing the underlying resources. Based on the processing either a success or failure state is set on the reconciled resource.

func (*CFAPIReconciler) HandleReadyState

func (r *CFAPIReconciler) HandleReadyState(ctx context.Context, objectInstance *v1alpha1.CFAPI) error

HandleReadyState checks for the consistency of reconciled resource, by verifying the underlying resources.

func (*CFAPIReconciler) Reconcile

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

Reconcile is the entry point from the controller-runtime framework. It performs a reconciliation based on the passed ctrl.Request object.

func (*CFAPIReconciler) SetupWithManager

func (r *CFAPIReconciler) SetupWithManager(mgr ctrl.Manager, rateLimiter RateLimiter) error

SetupWithManager sets up the controller with the Manager.

type ContainerRegistry

type ContainerRegistry struct {
	Server string
	User   string
	Pass   string
}

type DockerRegistryAuth

type DockerRegistryAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type DockerRegistryConfig

type DockerRegistryConfig struct {
	Auths map[string]DockerRegistryAuth `json:"auths"`
}

type ManifestResources

type ManifestResources struct {
	Items []*unstructured.Unstructured
	Blobs [][]byte
}

type RateLimiter

type RateLimiter struct {
	Burst           int
	Frequency       int
	BaseDelay       time.Duration
	FailureMaxDelay time.Duration
}

Jump to

Keyboard shortcuts

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