Documentation ¶
Overview ¶
Package reconcile contains functions for reconciling Kubernetes resources.
The functions in this package are intended to be idempotent. They should create resources that don't exist, and when they do exist, they should be checked for equality with the desired state and updated and/or requeued appropriately.
Index ¶
- func ClusterRole(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func ClusterRoleBinding(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func ConfigMap(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func Deployment(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func PersistentVolumeClaim(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func Pod(ctx context.Context, reqLogger logr.Logger, c client.Client, pod *corev1.Pod) (bool, error)
- func Prometheus(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func Service(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func ServiceAccount(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func ServiceMonitor(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
- func VDIRole(ctx context.Context, reqLogger logr.Logger, c client.Client, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterRole ¶
func ClusterRole(ctx context.Context, reqLogger logr.Logger, c client.Client, role *krbacv1.ClusterRole) error
ClusterRole will ensure a ClusterRole with the cluster.
func ClusterRoleBinding ¶
func ClusterRoleBinding(ctx context.Context, reqLogger logr.Logger, c client.Client, roleBinding *krbacv1.ClusterRoleBinding) error
ClusterRoleBinding will ensure a cluster role binding.
func ConfigMap ¶
func ConfigMap(ctx context.Context, reqLogger logr.Logger, c client.Client, cm *corev1.ConfigMap) error
ConfigMap reconciles a provided configmap with the cluster.
func Deployment ¶
func Deployment(ctx context.Context, reqLogger logr.Logger, c client.Client, deployment *appsv1.Deployment, wait bool) error
Deployment reconciles a deployment with the cluster and opionally returns a requeue error if it isn't fully running yet.
func PersistentVolumeClaim ¶
func PersistentVolumeClaim(ctx context.Context, reqLogger logr.Logger, c client.Client, pvc *corev1.PersistentVolumeClaim) error
PersistentVolumeClaim will reconcile a persistent volume with the kubernetes cluster. If it exists, we do nothing for now.
func Pod ¶
func Pod(ctx context.Context, reqLogger logr.Logger, c client.Client, pod *corev1.Pod) (bool, error)
Pod will reconcile a given pod definition with the cluster. If a pod with the same name exists but has a different configuration, the pod will be deleted and requeued. If the found pod has a deletion timestamp (e.g. it is still terminating) then the request will also be requued.
func Prometheus ¶
func Prometheus(ctx context.Context, reqLogger logr.Logger, c client.Client, prom *promv1.Prometheus) error
Prometheus reconciles a Prometheus CR with the cluster.
func Service ¶
func Service(ctx context.Context, reqLogger logr.Logger, c client.Client, svc *corev1.Service) error
Service will reconcile a provided service spec with the cluster.
func ServiceAccount ¶
func ServiceAccount(ctx context.Context, reqLogger logr.Logger, c client.Client, acct *corev1.ServiceAccount) error
ServiceAccount will ensure a service account in the cluster
Types ¶
This section is empty.