Documentation ¶
Index ¶
- Constants
- func MapComponentToApplication() func(object client.Object) []reconcile.Request
- func MapToBindingByBoundObjectName(cl client.Client, objectType, label string) func(object client.Object) []reconcile.Request
- func SetupTestEnv() (client.Client, *envtest.Environment, context.Context, context.CancelFunc)
- type ApplicationReconciler
- func (r *ApplicationReconciler) AddFinalizer(ctx context.Context, application *appstudiov1alpha1.Application) error
- func (r *ApplicationReconciler) Finalize(ctx context.Context, application *appstudiov1alpha1.Application, ...) error
- func (r *ApplicationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ApplicationReconciler) SetCreateConditionAndUpdateCR(ctx context.Context, req ctrl.Request, ...)
- func (r *ApplicationReconciler) SetUpdateConditionAndUpdateCR(ctx context.Context, req ctrl.Request, ...)
- func (r *ApplicationReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type ComponentDetectionQueryReconciler
- func (r *ComponentDetectionQueryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ComponentDetectionQueryReconciler) SetCompleteConditionAndUpdateCR(ctx context.Context, req ctrl.Request, ...)
- func (r *ComponentDetectionQueryReconciler) SetDetectingConditionAndUpdateCR(ctx context.Context, req ctrl.Request, ...)
- func (r *ComponentDetectionQueryReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type ComponentReconciler
- func (r *ComponentReconciler) AddFinalizer(ctx context.Context, component *appstudiov1alpha1.Component) error
- func (r *ComponentReconciler) Finalize(ctx context.Context, component *appstudiov1alpha1.Component, ...) error
- func (r *ComponentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ComponentReconciler) SetCreateConditionAndUpdateCR(ctx context.Context, req ctrl.Request, component *appstudiov1alpha1.Component, ...) error
- func (r *ComponentReconciler) SetGitOpsGeneratedConditionAndUpdateCR(ctx context.Context, req ctrl.Request, component *appstudiov1alpha1.Component, ...) error
- func (r *ComponentReconciler) SetUpdateConditionAndUpdateCR(ctx context.Context, req ctrl.Request, component *appstudiov1alpha1.Component, ...) error
- func (r *ComponentReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type GitOpsCommitIdError
- type GitOpsParseRepoError
- type NotSupported
- type SnapshotEnvironmentBindingReconciler
- func (r *SnapshotEnvironmentBindingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *SnapshotEnvironmentBindingReconciler) SetConditionAndUpdateCR(ctx context.Context, req ctrl.Request, ...)
- func (r *SnapshotEnvironmentBindingReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
Constants ¶
const CDQReconcileTimeout = 5 * time.Minute
CDQReconcileTimeout is the default timeout, 5 mins, for the context of cdq reconcile
Variables ¶
This section is empty.
Functions ¶
func MapComponentToApplication ¶
MapComponentToApplication returns an event handler that will convert events on a Component CR to events on its parent Application
func MapToBindingByBoundObjectName ¶
func MapToBindingByBoundObjectName(cl client.Client, objectType, label string) func(object client.Object) []reconcile.Request
MapToBindingByBoundObjectName maps the bound object (Environment) to the associated Bindings. The correct Bindings are listed using the given label whose value should equal to the object's name. Adapted from https://github.com/codeready-toolchain/host-operator/blob/master/controllers/spacebindingcleanup/mapper.go#L17
func SetupTestEnv ¶
func SetupTestEnv() (client.Client, *envtest.Environment, context.Context, context.CancelFunc)
Types ¶
type ApplicationReconciler ¶
type ApplicationReconciler struct { client.Client Scheme *runtime.Scheme Log logr.Logger GitHubTokenClient github.GitHubToken GitHubOrg string }
ApplicationReconciler reconciles a Application object
func (*ApplicationReconciler) AddFinalizer ¶
func (r *ApplicationReconciler) AddFinalizer(ctx context.Context, application *appstudiov1alpha1.Application) error
AddFinalizer adds the finalizer to the Application CR and initiates the finalize count on the annotation
func (*ApplicationReconciler) Finalize ¶
func (r *ApplicationReconciler) Finalize(ctx context.Context, application *appstudiov1alpha1.Application, ghClient *github.GitHubClient) error
Finalize deletes the corresponding GitOps repo for the given Application CR.
func (*ApplicationReconciler) Reconcile ¶
func (r *ApplicationReconciler) 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 Application 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.9.2/pkg/reconcile
func (*ApplicationReconciler) SetCreateConditionAndUpdateCR ¶
func (r *ApplicationReconciler) SetCreateConditionAndUpdateCR(ctx context.Context, req ctrl.Request, application *appstudiov1alpha1.Application, createError error)
func (*ApplicationReconciler) SetUpdateConditionAndUpdateCR ¶
func (r *ApplicationReconciler) SetUpdateConditionAndUpdateCR(ctx context.Context, req ctrl.Request, application *appstudiov1alpha1.Application, updateError error)
func (*ApplicationReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type ComponentDetectionQueryReconciler ¶
type ComponentDetectionQueryReconciler struct { client.Client Scheme *runtime.Scheme Log logr.Logger GitHubTokenClient github.GitHubToken DevfileRegistryURL string AppFS afero.Afero RunKubernetesJob bool Config *rest.Config CdqAnalysisImage string CDQUtil cdqanalysis.CDQUtil }
ComponentDetectionQueryReconciler reconciles a ComponentDetectionQuery object
func (*ComponentDetectionQueryReconciler) Reconcile ¶
func (r *ComponentDetectionQueryReconciler) 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 ComponentDetectionQuery 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.9.2/pkg/reconcile
func (*ComponentDetectionQueryReconciler) SetCompleteConditionAndUpdateCR ¶
func (r *ComponentDetectionQueryReconciler) SetCompleteConditionAndUpdateCR(ctx context.Context, req ctrl.Request, componentDetectionQuery *appstudiov1alpha1.ComponentDetectionQuery, originalCDQ *appstudiov1alpha1.ComponentDetectionQuery, completeError error)
func (*ComponentDetectionQueryReconciler) SetDetectingConditionAndUpdateCR ¶
func (r *ComponentDetectionQueryReconciler) SetDetectingConditionAndUpdateCR(ctx context.Context, req ctrl.Request, componentDetectionQuery *appstudiov1alpha1.ComponentDetectionQuery)
func (*ComponentDetectionQueryReconciler) SetupWithManager ¶
func (r *ComponentDetectionQueryReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ComponentReconciler ¶
type ComponentReconciler struct { client.Client Scheme *runtime.Scheme Log logr.Logger GitHubOrg string Generator gitopsgen.Generator AppFS afero.Afero SPIClient spi.SPI GitHubTokenClient github.GitHubToken DevfileUtilsClient devfileParserUtil.DevfileUtils }
ComponentReconciler reconciles a Component object
func (*ComponentReconciler) AddFinalizer ¶
func (r *ComponentReconciler) AddFinalizer(ctx context.Context, component *appstudiov1alpha1.Component) error
AddFinalizer adds the finalizer to the Component CR
func (*ComponentReconciler) Finalize ¶
func (r *ComponentReconciler) Finalize(ctx context.Context, component *appstudiov1alpha1.Component, application *appstudiov1alpha1.Application, ghClient *github.GitHubClient, token string) error
Finalize deletes the corresponding devfile project or the devfile attribute entry from the Application CR and also deletes the corresponding GitOps repo's Component dir & updates the parent kustomize for the given Component CR.
func (*ComponentReconciler) Reconcile ¶
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 Component 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.9.2/pkg/reconcile
func (*ComponentReconciler) SetCreateConditionAndUpdateCR ¶
func (r *ComponentReconciler) SetCreateConditionAndUpdateCR(ctx context.Context, req ctrl.Request, component *appstudiov1alpha1.Component, createError error) error
func (*ComponentReconciler) SetGitOpsGeneratedConditionAndUpdateCR ¶
func (r *ComponentReconciler) SetGitOpsGeneratedConditionAndUpdateCR(ctx context.Context, req ctrl.Request, component *appstudiov1alpha1.Component, generateError error) error
func (*ComponentReconciler) SetUpdateConditionAndUpdateCR ¶
func (r *ComponentReconciler) SetUpdateConditionAndUpdateCR(ctx context.Context, req ctrl.Request, component *appstudiov1alpha1.Component, updateError error) error
func (*ComponentReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type GitOpsCommitIdError ¶
type GitOpsCommitIdError struct {
// contains filtered or unexported fields
}
func (*GitOpsCommitIdError) Error ¶
func (e *GitOpsCommitIdError) Error() string
type GitOpsParseRepoError ¶
type GitOpsParseRepoError struct {
// contains filtered or unexported fields
}
func (*GitOpsParseRepoError) Error ¶
func (e *GitOpsParseRepoError) Error() string
type NotSupported ¶
type NotSupported struct {
// contains filtered or unexported fields
}
func (*NotSupported) Error ¶
func (e *NotSupported) Error() string
type SnapshotEnvironmentBindingReconciler ¶
type SnapshotEnvironmentBindingReconciler struct { client.Client Scheme *runtime.Scheme Log logr.Logger AppFS afero.Afero Generator gitopsgen.Generator GitHubTokenClient github.GitHubToken }
SnapshotEnvironmentBindingReconciler reconciles a SnapshotEnvironmentBinding object
func (*SnapshotEnvironmentBindingReconciler) Reconcile ¶
func (r *SnapshotEnvironmentBindingReconciler) 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 SnapshotEnvironmentBinding 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.9.2/pkg/reconcile
func (*SnapshotEnvironmentBindingReconciler) SetConditionAndUpdateCR ¶
func (r *SnapshotEnvironmentBindingReconciler) SetConditionAndUpdateCR(ctx context.Context, req ctrl.Request, appSnapshotEnvBinding *appstudiov1alpha1.SnapshotEnvironmentBinding, createError error)
func (*SnapshotEnvironmentBindingReconciler) SetupWithManager ¶
func (r *SnapshotEnvironmentBindingReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files ¶
- application_controller.go
- application_controller_conditions.go
- application_controller_finalizer.go
- applicationsnapshotenvironmentbinding_controller.go
- applicationsnapshotenvironmentbinding_controller_conditions.go
- component_controller.go
- component_controller_conditions.go
- component_controller_finalizer.go
- componentdetectionquery_controller.go
- componentdetectionquery_controller_conditions.go
- errors.go
- mapper.go
- start_test_env.go
- update.go