Documentation ¶
Index ¶
- Variables
- func ServiceInjector(ctx context.Context, as *cloudshipv1alpha1.AppService, objs []types.Object) ([]types.Object, error)
- func TranslateContainer(ctx context.Context, as *cloudshipv1alpha1.AppService) ([]types.Object, error)
- type AppResourceReconciler
- type AppServiceReconciler
- type ApplicationReconciler
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
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.