controller

package
v0.0.0-...-8d146ef Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SemeruLabelNameSuffix                   = "-semeru-compiler"
	SemeruLabelName                         = "semeru-compiler"
	SemeruGenerationLabelNameSuffix         = "/semeru-compiler-generation"
	StatusReferenceSemeruGeneration         = "semeruGeneration"
	StatusReferenceSemeruInstancesCompleted = "semeruInstancesCompleted"
)
View Source
const (
	OperatorName      = "websphere-liberty-operator"
	OperatorShortName = "wlo"
)
View Source
const LTPA_CONFIG_1_RESOURCE_SHARING_FILE_NAME = "ltpa-config-1"
View Source
const LTPA_CONFIG_2_RESOURCE_SHARING_FILE_NAME = "ltpa-config-2"
View Source
const LTPA_CONFIG_RESOURCE_SHARING_FILE_NAME = "ltpa-config"
View Source
const LTPA_KEY_RESOURCE_SHARING_FILE_NAME = LTPA_RESOURCE_SHARING_FILE_NAME
View Source
const LTPA_RESOURCE_SHARING_FILE_NAME = "ltpa"
View Source
const PASSWORD_ENCRYPTION_RESOURCE_SHARING_FILE_NAME = "password-encryption"

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomMatcher

type CustomMatcher interface {
	Match(metav1.Object) ([]webspherelibertyv1.WebSphereLibertyApplication, error)
}

CustomMatcher is an interface for matching apps that satisfy a custom logic

type EnqueueRequestsForCustomIndexField

type EnqueueRequestsForCustomIndexField struct {
	handler.Funcs
	Matcher CustomMatcher
}

EnqueueRequestsForCustomIndexField enqueues reconcile Requests for WebSphereLiberty Applications if the app is relying on the modified resource

func (*EnqueueRequestsForCustomIndexField) Create

Create implements EventHandler

func (*EnqueueRequestsForCustomIndexField) Delete

Delete implements EventHandler

func (*EnqueueRequestsForCustomIndexField) Generic

Generic implements EventHandler

func (*EnqueueRequestsForCustomIndexField) Update

Update implements EventHandler

type ImageStreamMatcher

type ImageStreamMatcher struct {
	Klient          client.Client
	WatchNamespaces []string
}

ImageStreamMatcher implements CustomMatcher for Image Streams

func (*ImageStreamMatcher) Match

Match returns all applications using the input ImageStreamTag

type LTPAResource

type LTPAResource int
const (
	LTPAKey LTPAResource = iota
	LTPAConfig
)

type ReconcileWebSphereLiberty

type ReconcileWebSphereLiberty struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	oputils.ReconcilerBase
	Log logr.Logger
	// contains filtered or unexported fields
}

ReconcileWebSphereLiberty reconciles a WebSphereLibertyApplication object

func (*ReconcileWebSphereLiberty) GetLTPAConfigResources

func (r *ReconcileWebSphereLiberty) GetLTPAConfigResources(instance *wlv1.WebSphereLibertyApplication, treeMap map[string]interface{}, replaceMap map[string]map[string]string, latestOperandVersion string, assetsFolder *string, fileName string) (*unstructured.UnstructuredList, string, error)

Search the cluster namespace for existing LTPA password Secrets

func (*ReconcileWebSphereLiberty) GetLTPAKeyResources

func (r *ReconcileWebSphereLiberty) GetLTPAKeyResources(instance *wlv1.WebSphereLibertyApplication, treeMap map[string]interface{}, replaceMap map[string]map[string]string, latestOperandVersion string, assetsFolder *string) (*unstructured.UnstructuredList, string, error)

Search the cluster namespace for existing LTPA keys

func (*ReconcileWebSphereLiberty) GetPasswordEncryptionResources

func (r *ReconcileWebSphereLiberty) GetPasswordEncryptionResources(instance *wlv1.WebSphereLibertyApplication, treeMap map[string]interface{}, replaceMap map[string]map[string]string, latestOperandVersion string, assetsFolder *string) (*unstructured.UnstructuredList, string, error)

Tracks existing password encryption resources by populating a LeaderTracker array used to initialize the LeaderTracker

func (*ReconcileWebSphereLiberty) HasDefaultLTPAKeyCollision

func (r *ReconcileWebSphereLiberty) HasDefaultLTPAKeyCollision(ltpaResourceList *unstructured.UnstructuredList, treeMap map[string]interface{}, replaceMap map[string]map[string]string, ltpaResourceRootName string, latestOperandVersion string, defaultUpdatedPathIndex string) (bool, error)

func (*ReconcileWebSphereLiberty) Reconcile

func (r *ReconcileWebSphereLiberty) Reconcile(ctx context.Context, request 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.

func (*ReconcileWebSphereLiberty) RemoveLeader

func (r *ReconcileWebSphereLiberty) RemoveLeader(instance *wlv1.WebSphereLibertyApplication, leaderTracker *corev1.Secret, leaderTrackers *[]lutils.LeaderTracker) error

Removes the instance as leader if instance is the leader and if no leaders are being tracked then delete the leader tracking Secret

func (*ReconcileWebSphereLiberty) RemoveLeaderTrackerReference

func (r *ReconcileWebSphereLiberty) RemoveLeaderTrackerReference(instance *wlv1.WebSphereLibertyApplication, resourceSharingFileName string) error

func (*ReconcileWebSphereLiberty) SaveLeaderTracker

func (r *ReconcileWebSphereLiberty) SaveLeaderTracker(leaderTracker *corev1.Secret, trackerList *[]lutils.LeaderTracker) error

func (*ReconcileWebSphereLiberty) SetupWithManager

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

func (*ReconcileWebSphereLiberty) UpdateLeaderTrackersFromUnstructuredList

func (r *ReconcileWebSphereLiberty) UpdateLeaderTrackersFromUnstructuredList(leaderTrackers *[]lutils.LeaderTracker, resourceList *unstructured.UnstructuredList, treeMap map[string]interface{}, replaceMap map[string]map[string]string, latestOperandVersion string, resourceRootName string) error

type ReconcileWebSphereLibertyDump

type ReconcileWebSphereLibertyDump struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	Client     client.Client
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	RestConfig *rest.Config
	Log        logr.Logger
}

ReconcileWebSphereLibertyDump reconciles a WebSphereLibertyDump object

func (*ReconcileWebSphereLibertyDump) Reconcile

func (r *ReconcileWebSphereLibertyDump) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

func (*ReconcileWebSphereLibertyDump) SetupWithManager

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

type ReconcileWebSphereLibertyTrace

type ReconcileWebSphereLibertyTrace struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	Client     client.Client
	Scheme     *runtime.Scheme
	Recorder   record.EventRecorder
	RestConfig *rest.Config
	Log        logr.Logger
}

ReconcileWebSphereLibertyTrace reconciles a WebSphereLibertyTrace object

func (*ReconcileWebSphereLibertyTrace) Reconcile

func (*ReconcileWebSphereLibertyTrace) SetupWithManager

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

func (*ReconcileWebSphereLibertyTrace) UpdateStatus

UpdateStatus updates the status

Jump to

Keyboard shortcuts

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