Documentation
¶
Index ¶
- func CheckIfSecretContainsData(secret *corev1.Secret) error
- func CheckIfSecretContainsDataOfKind(secret *corev1.Secret, kind string) bool
- func FetchAndFilter(ctx context.Context, Client client.Client, objectList *ObjectList, ...) error
- func IsInArray(arr []string, target string) bool
- func IsItHoliday(schedule SleepSchedule) (bool, time.Duration)
- func IsTimeToSleep(schedule SleepSchedule, kronosapp *v1alpha1.KronosApp) (bool, bool, time.Duration, error)
- func SaveObjectsData(ctx context.Context, Client client.Client, secret *corev1.Secret, kind string, ...) error
- func ValidateIncludedObjects(includedObjects []v1alpha1.IncludedObject) (map[int][]bool, error)
- func WakeUpResources(ctx context.Context, Client client.Client, secret *corev1.Secret) error
- func WriteChanges(ctx context.Context, Client client.Client, secret *corev1.Secret, ...) error
- type APIVersionKindMap
- type KronosAppReconciler
- type Metrics
- type ObjectList
- type Set
- type SleepSchedule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchAndFilter ¶
func IsItHoliday ¶
func IsItHoliday(schedule SleepSchedule) (bool, time.Duration)
func IsTimeToSleep ¶
func SaveObjectsData ¶
func ValidateIncludedObjects ¶
func ValidateIncludedObjects(includedObjects []v1alpha1.IncludedObject) (map[int][]bool, error)
func WakeUpResources ¶
Types ¶
type APIVersionKindMap ¶
func NewAPIVersionKindMap ¶
func NewAPIVersionKindMap(input map[string][]string) *APIVersionKindMap
func NewEmptyAPIVersionKindMap ¶
func NewEmptyAPIVersionKindMap() *APIVersionKindMap
func (*APIVersionKindMap) Add ¶
func (m *APIVersionKindMap) Add(apiVersion, kind string)
func (*APIVersionKindMap) GetAPIVersion ¶
func (m *APIVersionKindMap) GetAPIVersion(kind string) string
func (*APIVersionKindMap) GetKind ¶
func (m *APIVersionKindMap) GetKind(apiVersion string) []string
func (*APIVersionKindMap) KindExists ¶
func (m *APIVersionKindMap) KindExists(kind string) bool
type KronosAppReconciler ¶
KronosAppReconciler reconciles a KronosApp object
func (*KronosAppReconciler) 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 KronosApp 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/[email protected]/pkg/reconcile
func (*KronosAppReconciler) SetupWithManager ¶
func (r *KronosAppReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type Metrics ¶
type Metrics struct {
ScheduleInfo *prometheus.GaugeVec
InDepthScheduleInfo *prometheus.GaugeVec
}
func RegisterMetrics ¶
func RegisterMetrics() Metrics
func (Metrics) MustRegister ¶
func (additionalMetrics Metrics) MustRegister(registry metrics.RegistererGatherer) Metrics
type ObjectList ¶
type ObjectList struct {
Deployments *appsv1.DeploymentList
StatefulSets *appsv1.StatefulSetList
ReplicaSets *appsv1.ReplicaSetList
CronJobs *batchv1.CronJobList
}
func FetchIncludedObjects ¶
func FetchIncludedObjects(ctx context.Context, Client client.Client, includedObjects []v1alpha1.IncludedObject, inclusive map[int][]bool) (ObjectList, error)
func (*ObjectList) GetObjectsCount ¶
func (objectList *ObjectList) GetObjectsCount() map[string]int
func (*ObjectList) GetObjectsNames ¶
func (objectList *ObjectList) GetObjectsNames() map[string][]string
func (*ObjectList) GetObjectsTotalCount ¶
func (objectList *ObjectList) GetObjectsTotalCount() int
Source Files
¶
Click to show internal directories.
Click to hide internal directories.