controllers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ReconcileWaitResult is the time to wait between reconciliation.
	ReconcileWaitResult = reconcile.Result{RequeueAfter: 30 * time.Second}
)

Functions

func ServiceInjector

func ServiceInjector(ctx context.Context, as *cloudshipv1alpha1.AppService, objs []types.Object) ([]types.Object, error)

ServiceInjector adds a Service object for the first Port on the first Container for the first Deployment observed in a workload translation.

func TranslateContainer

func TranslateContainer(ctx context.Context, as *cloudshipv1alpha1.AppService) ([]types.Object, error)

TranslateContainer transalate to kubernetes objects

Types

type AppResourceReconciler

type AppResourceReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

AppResourceReconciler reconciles a AppResource object

func (*AppResourceReconciler) Reconcile

func (r *AppResourceReconciler) 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 AppResource 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.7.0/pkg/reconcile

func (*AppResourceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type AppServiceReconciler

type AppServiceReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

AppServiceReconciler reconciles a AppService object

func (*AppServiceReconciler) Reconcile

func (r *AppServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile reconciles a AppService object +kubebuilder:rbac:groups=cloudship.toucansoft.io,resources=services,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=cloudship.toucansoft.io,resources=services/status,verbs=get;update;patch +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete

func (*AppServiceReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ApplicationReconciler

type ApplicationReconciler struct {
	client.Client
	Log                      logr.Logger
	Scheme                   *runtime.Scheme
	MemecachedManagerFactory release.ManagerFactory
	RedisManagerFactory      release.ManagerFactory

	EventRecorder record.EventRecorder
	GVK           schema.GroupVersionKind
}

ApplicationReconciler reconciles a Application object

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. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.0/pkg/reconcile

func (*ApplicationReconciler) SetupWithManager

func (r *ApplicationReconciler) 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