Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager, namespace string) error
- func SetupWithManager(mgr ctrl.Manager, r reconcile.Reconciler, namespace string) error
- type GrafanaClient
- type GrafanaClientImpl
- type GrafanaDashboardFolderReconciler
- type GrafanaFolderPermissionsResponse
- type GrafanaFolderRequest
- type GrafanaFolderResponse
Constants ¶
const ( CreateOrUpdateFolderUrl = "%v/api/folders" FolderPermissionsUrl = "%v/api/folders/%v/permissions" )
const (
ControllerName = "controller_grafanadashboardfolder"
)
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new GrafanaDashboardFolder Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
Types ¶
type GrafanaClient ¶
type GrafanaClient interface { FindOrCreateFolder(folderName string) (GrafanaFolderResponse, error) ApplyFolderPermissions(folderName string, folderPermissions []*v1alpha1.GrafanaPermissionItem) (GrafanaFolderPermissionsResponse, error) }
func NewGrafanaClient ¶
type GrafanaClientImpl ¶
type GrafanaClientImpl struct {
// contains filtered or unexported fields
}
func (*GrafanaClientImpl) ApplyFolderPermissions ¶
func (r *GrafanaClientImpl) ApplyFolderPermissions(folderName string, folderPermissions []*v1alpha1.GrafanaPermissionItem) (GrafanaFolderPermissionsResponse, error)
func (*GrafanaClientImpl) FindOrCreateFolder ¶
func (r *GrafanaClientImpl) FindOrCreateFolder(folderName string) (GrafanaFolderResponse, error)
type GrafanaDashboardFolderReconciler ¶
type GrafanaDashboardFolderReconciler struct { Client client.Client Scheme *runtime.Scheme Log logr.Logger // contains filtered or unexported fields }
GrafanaDashboardFolderReconciler reconciles a GrafanaFolder object
func (*GrafanaDashboardFolderReconciler) Reconcile ¶
func (r *GrafanaDashboardFolderReconciler) Reconcile(ctx context.Context, request 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. the GrafanaDashboard 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 (*GrafanaDashboardFolderReconciler) SetupWithManager ¶
func (r *GrafanaDashboardFolderReconciler) SetupWithManager(mgr manager.Manager) error