Documentation ¶
Index ¶
- Constants
- type Client
- type CompassManagerReconciler
- func (cm *CompassManagerReconciler) CreateFunc(obj runtime.Object) bool
- func (cm *CompassManagerReconciler) DeleteFunc(obj runtime.Object) bool
- func (cm *CompassManagerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (cm *CompassManagerReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (cm *CompassManagerReconciler) UpdateFunc(oldObj, newObj runtime.Object) bool
- type CompassRegistrator
- func (r *CompassRegistrator) DeregisterFromCompass(compassID, globalAccount string) error
- func (r *CompassRegistrator) RefreshCompassToken(compassID, globalAccount string) (graphql.OneTimeTokenForRuntimeExt, error)
- func (r *CompassRegistrator) RegisterInCompass(compassRuntimeLabels map[string]interface{}) (string, error)
- type Configurator
- type ControlPlaneInterface
- func (c *ControlPlaneInterface) CreateCompassMapping(name types.NamespacedName) error
- func (c *ControlPlaneInterface) DeleteCompassMapping(name types.NamespacedName) error
- func (c *ControlPlaneInterface) GetCompassMapping(name types.NamespacedName) (v1beta1.CompassManagerMapping, error)
- func (c *ControlPlaneInterface) GetCompassRuntimeID(name types.NamespacedName) (string, error)
- func (c *ControlPlaneInterface) GetKubeconfig(name types.NamespacedName) ([]byte, error)
- func (c *ControlPlaneInterface) GetKyma(name types.NamespacedName) (kyma.Kyma, error)
- func (c *ControlPlaneInterface) RemoveCMFinalizer(name types.NamespacedName) error
- func (c *ControlPlaneInterface) SetCompassMappingStatus(name types.NamespacedName, status s.Status) error
- func (c *ControlPlaneInterface) UpsertCompassMapping(name types.NamespacedName, compassRuntimeID string) error
- type DirectorError
- type DryRunner
- type Registrator
- type RuntimeAgentConfigurator
Constants ¶
View Source
const ( ManagedBy = "compass-manager" Finalizer = "kyma-project.io/cm-protection" LabelBrokerInstanceID = "kyma-project.io/instance-id" LabelBrokerPlanID = "kyma-project.io/broker-plan-id" LabelBrokerPlanName = "kyma-project.io/broker-plan-name" LabelCompassID = "kyma-project.io/compass-runtime-id" LabelGlobalAccountID = "kyma-project.io/global-account-id" LabelKymaName = "operator.kyma-project.io/kyma-name" LabelManagedBy = "operator.kyma-project.io/managed-by" LabelShootName = "kyma-project.io/shoot-name" LabelSubaccountID = "kyma-project.io/subaccount-id" LabelDryRun = "kyma-project.io/cm-dry-run" ApplicationConnectorModuleName = "application-connector" // KubeconfigKey is the name of the key in the secret storing cluster credentials. // The secret is created by KEB: https://github.com/kyma-project/control-plane/blob/main/components/kyma-environment-broker/internal/process/steps/lifecycle_manager_kubeconfig.go KubeconfigKey = "config" )
View Source
const (
AgentConfigurationSecretName = "compass-agent-configuration"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error List(ctx context.Context, obj client.ObjectList, opts ...client.ListOption) error Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error Status() client.SubResourceWriter }
type CompassManagerReconciler ¶
type CompassManagerReconciler struct { Client Client Scheme *runtime.Scheme Log *log.Logger Configurator Configurator Registrator Registrator // contains filtered or unexported fields }
CompassManagerReconciler reconciles a CompassManager object
func NewCompassManagerReconciler ¶
func NewCompassManagerReconciler( mgr manager.Manager, log *log.Logger, c Configurator, r Registrator, requeueTime time.Duration, requeueTimeForKubeconfig time.Duration, enabledRegistration bool, dryRun bool, metrics metrics.Metrics, ) *CompassManagerReconciler
func (*CompassManagerReconciler) CreateFunc ¶
func (cm *CompassManagerReconciler) CreateFunc(obj runtime.Object) bool
func (*CompassManagerReconciler) DeleteFunc ¶
func (cm *CompassManagerReconciler) DeleteFunc(obj runtime.Object) bool
func (*CompassManagerReconciler) SetupWithManager ¶
func (cm *CompassManagerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*CompassManagerReconciler) UpdateFunc ¶
func (cm *CompassManagerReconciler) UpdateFunc(oldObj, newObj runtime.Object) bool
type CompassRegistrator ¶
func NewCompassRegistrator ¶
func NewCompassRegistrator(directorClient director.Client, log *logrus.Logger) *CompassRegistrator
func (*CompassRegistrator) DeregisterFromCompass ¶
func (r *CompassRegistrator) DeregisterFromCompass(compassID, globalAccount string) error
func (*CompassRegistrator) RefreshCompassToken ¶
func (r *CompassRegistrator) RefreshCompassToken(compassID, globalAccount string) (graphql.OneTimeTokenForRuntimeExt, error)
func (*CompassRegistrator) RegisterInCompass ¶
func (r *CompassRegistrator) RegisterInCompass(compassRuntimeLabels map[string]interface{}) (string, error)
type Configurator ¶
type ControlPlaneInterface ¶
type ControlPlaneInterface struct {
// contains filtered or unexported fields
}
func NewControlPlaneInterface ¶
func NewControlPlaneInterface(kubectl Client, log *log.Logger, dryRun bool) *ControlPlaneInterface
func (*ControlPlaneInterface) CreateCompassMapping ¶
func (c *ControlPlaneInterface) CreateCompassMapping(name types.NamespacedName) error
func (*ControlPlaneInterface) DeleteCompassMapping ¶
func (c *ControlPlaneInterface) DeleteCompassMapping(name types.NamespacedName) error
func (*ControlPlaneInterface) GetCompassMapping ¶
func (c *ControlPlaneInterface) GetCompassMapping(name types.NamespacedName) (v1beta1.CompassManagerMapping, error)
func (*ControlPlaneInterface) GetCompassRuntimeID ¶
func (c *ControlPlaneInterface) GetCompassRuntimeID(name types.NamespacedName) (string, error)
GetCompassRuntimeID returns `errNotFound` if the mapping exists, but doesn't have the label
func (*ControlPlaneInterface) GetKubeconfig ¶
func (c *ControlPlaneInterface) GetKubeconfig(name types.NamespacedName) ([]byte, error)
func (*ControlPlaneInterface) GetKyma ¶
func (c *ControlPlaneInterface) GetKyma(name types.NamespacedName) (kyma.Kyma, error)
func (*ControlPlaneInterface) RemoveCMFinalizer ¶
func (c *ControlPlaneInterface) RemoveCMFinalizer(name types.NamespacedName) error
func (*ControlPlaneInterface) SetCompassMappingStatus ¶
func (c *ControlPlaneInterface) SetCompassMappingStatus(name types.NamespacedName, status s.Status) error
SetCompassMappingStatus sets the registered and configured on an existing CompassManagerMapping If error occurs - logs it and returns
func (*ControlPlaneInterface) UpsertCompassMapping ¶
func (c *ControlPlaneInterface) UpsertCompassMapping(name types.NamespacedName, compassRuntimeID string) error
type DirectorError ¶
type DirectorError struct {
// contains filtered or unexported fields
}
func (*DirectorError) Error ¶
func (e *DirectorError) Error() string
type DryRunner ¶
type DryRunner struct {
// contains filtered or unexported fields
}
func NewDryRunner ¶
func (DryRunner) ConfigureCompassRuntimeAgent ¶
func (DryRunner) DeregisterFromCompass ¶
type Registrator ¶
type Registrator interface { // RegisterInCompass creates Runtime in the Compass system. It must be idempotent. RegisterInCompass(compassRuntimeLabels map[string]interface{}) (string, error) // DeregisterFromCompass deletes Runtime from Compass system DeregisterFromCompass(compassID, globalAccount string) error }
type RuntimeAgentConfigurator ¶
func NewRuntimeAgentConfigurator ¶
func NewRuntimeAgentConfigurator(directorClient director.Client, log *logrus.Logger) *RuntimeAgentConfigurator
func (*RuntimeAgentConfigurator) ConfigureCompassRuntimeAgent ¶
func (r *RuntimeAgentConfigurator) ConfigureCompassRuntimeAgent(kubeconfig []byte, compassRuntimeID, globalAccount string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.