reconcile

package
v0.3.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

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

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

func ServiceMonitor

func ServiceMonitor(ctx context.Context, reqLogger logr.Logger, c client.Client, sm *promv1.ServiceMonitor) error

ServiceMonitor reconciles a ServiceMonitor with the cluster.

func VDIRole

func VDIRole(ctx context.Context, reqLogger logr.Logger, c client.Client, role *rbacv1.VDIRole) error

VDIRole reconciles a VDIRole with the cluster.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL