controllers

package
v0.0.0-...-27a102d Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package controllers ...

Index

Constants

View Source
const (
	// DefaultEventSubscriptionName is the event subscription name for bmc operator event listener
	DefaultEventSubscriptionName = "BmcOperatorSubscription"
	// DefaultEventSubscriptionContext is the context of event subscription for bmc operator event listener
	DefaultEventSubscriptionContext = "Default Bmc-Operator EventSubscription"
)

Variables

This section is empty.

Functions

func CreateEventSubscription

func CreateEventSubscription(ctx context.Context, restClient restclient.RestClientInterface, destination string) error

CreateEventSubscription creates event subscription for server operator event listener

func GetEventSubscriptionPayload

func GetEventSubscriptionPayload(destination string) []byte

GetEventSubscriptionPayload return the payload of event subscription for bmc operator event listener

Types

type EventSubscriptionPayload

type EventSubscriptionPayload struct {
	Name                 string   `json:"Name"`
	Destination          string   `json:"Destination"`
	EventTypes           []string `json:"EventTypes"`
	MessageIds           []string `json:"MessageIds"`
	ResourceTypes        []string `json:"ResourceTypes"`
	Context              string   `json:"Context"`
	Protocol             string   `json:"Protocol"`
	SubscriptionType     string   `json:"SubscriptionType"`
	EventFormatType      string   `json:"EventFormatType"`
	SubordinateResources bool     `json:"SubordinateResources"`
	DeliveryRetryPolicy  string   `json:"DeliveryRetryPolicy"`
	OriginResources      []Link   `json:"OriginResources"`
}

EventSubscriptionPayload is the payload of event subscription for server operator event listener

type Link struct {
	Oid string `json:"@odata.id"`
}

Link is struct defined for OriginResources in EventSubscriptionPayload

type OdimReconciler

type OdimReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

OdimReconciler reconciles a Odim object

func (*OdimReconciler) Reconcile

func (r *OdimReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the Odim object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile

func (*OdimReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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