controller

package
v0.0.0-...-868c0a0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackstageFieldManager = "backstage-controller"

	// AutoSyncEnvVar: EXT_CONF_SYNC_backstage env variable which defines the value for rhdh.redhat.com/ext-config-sync annotation of external config object (ConfigMap|Secret)
	// True by default
	AutoSyncEnvVar = "EXT_CONF_SYNC_backstage"

	// WatchExtConfig: WATCH_EXT_CONF_backstage if false disables watching external config objects (ConfigMaps|Secrets)
	// True by default
	WatchExtConfig = "WATCH_EXT_CONF_backstage"
)

Variables

This section is empty.

Functions

func DetectPlatform

func DetectPlatform() (platform.Platform, error)

Types

type BackstageReconciler

type BackstageReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Platform platform.Platform
}

BackstageReconciler reconciles a Backstage object

func (*BackstageReconciler) Reconcile

func (r *BackstageReconciler) 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://pkgo.dev/sigs.k8s.io/[email protected]/pkg/reconcile

func (*BackstageReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type MockClient

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

Mock K8s go-client with very basic implementation of (some) methods to be able to simply test controller logic

func NewMockClient

func NewMockClient() MockClient

func (MockClient) Create

func (MockClient) Delete

func (MockClient) DeleteAllOf

func (MockClient) Get

func (MockClient) GroupVersionKindFor

func (m MockClient) GroupVersionKindFor(_ runtime.Object) (schema.GroupVersionKind, error)

func (MockClient) IsObjectNamespaced

func (m MockClient) IsObjectNamespaced(_ runtime.Object) (bool, error)

func (MockClient) List

func (MockClient) Patch

func (MockClient) RESTMapper

func (m MockClient) RESTMapper() meta.RESTMapper

func (MockClient) Scheme

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

func (MockClient) Status

func (m MockClient) Status() client.SubResourceWriter

func (MockClient) SubResource

func (m MockClient) SubResource(_ string) client.SubResourceClient

func (MockClient) Update

type NameKind

type NameKind struct {
	Name string
	Kind string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳