зеркало из
1
0
Форкнуть 0
azure-service-operator/controllers/azuresqluser_controller.go

32 строки
1014 B
Go

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
package controllers
import (
"context"
ctrl "sigs.k8s.io/controller-runtime"
azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
)
// AzureSQLUserReconciler reconciles a AzureSQLUser object
type AzureSQLUserReconciler struct {
Reconciler *AsyncReconciler
}
// +kubebuilder:rbac:groups=azure.microsoft.com,resources=azuresqlusers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=azure.microsoft.com,resources={azuresqlusers/status,azuresqlusers/finalizers},verbs=get;update;patch
func (r *AzureSQLUserReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
return r.Reconciler.Reconcile(ctx, req, &azurev1alpha1.AzureSQLUser{})
}
// SetupWithManager runs reconcile loop with manager
func (r *AzureSQLUserReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&azurev1alpha1.AzureSQLUser{}).
Complete(r)
}