Documentation ¶
Overview ¶
Package meta contains the generic metadata APIs for use by toolkit components.
Index ¶
- Constants
- func ReconcileAnnotationValue(annotations map[string]string) (string, bool)
- func SetResourceCondition(obj ObjectWithStatusConditions, condition string, ...)
- type LocalObjectReference
- type NamespacedObjectKindReference
- type NamespacedObjectReference
- type ObjectWithStatusConditions
- type ReconcileRequestStatus
Constants ¶
const ( // ReconcileAtAnnotation is the annotation used for triggering a reconciliation // outside of the defined schedule. Despite the name, the value is not // interpreted as a timestamp, and any change in value shall trigger a // reconciliation. // DEPRECATED: has been replaced by ReconcileRequestAnnotation. ReconcileAtAnnotation string = "fluxcd.io/reconcileAt" // ReconcileRequestAnnotation is the new ReconcileAtAnnotation, // with a better name. For backward-compatibility, use // ReconcileAnnotationValue, which will account for both // annotations. ReconcileRequestAnnotation string = "reconcile.fluxcd.io/requestedAt" )
const ( // ReconciliationSucceededReason represents the fact that the reconciliation of // a toolkit resource has succeeded. ReconciliationSucceededReason string = "ReconciliationSucceeded" // ReconciliationFailedReason represents the fact that the reconciliation of a // toolkit resource has failed. ReconciliationFailedReason string = "ReconciliationFailed" // ProgressingReason represents the fact that the reconciliation of a toolkit // resource is underway. ProgressingReason string = "Progressing" // DependencyNotReadyReason represents the fact that one of the toolkit resource // dependencies is not ready. DependencyNotReadyReason string = "DependencyNotReady" // SuspendedReason represents the fact that the reconciliation of a toolkit // resource is suspended. SuspendedReason string = "Suspended" )
const ( // ReadyCondition is the name of the Ready condition implemented by all toolkit // resources. ReadyCondition string = "Ready" )
Variables ¶
This section is empty.
Functions ¶
func ReconcileAnnotationValue ¶ added in v0.1.0
ReconcileAnnotationValue returns a value for the reconciliation request annotations, which can be used to detect changes; and, a boolean indicating whether either annotation was set.
func SetResourceCondition ¶ added in v0.4.0
func SetResourceCondition(obj ObjectWithStatusConditions, condition string, status metav1.ConditionStatus, reason, message string)
SetResourceCondition sets the given condition with the given status, reason and message on a resource.
Types ¶
type LocalObjectReference ¶ added in v0.7.0
type LocalObjectReference struct { // Name of the referent // +required Name string `json:"name"` }
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace
type NamespacedObjectKindReference ¶ added in v0.7.0
type NamespacedObjectKindReference struct { // API version of the referent, // if not specified the Kubernetes preferred version will be used // +optional APIVersion string `json:"apiVersion,omitempty"` // Kind of the referent // +required Kind string `json:"kind"` // Name of the referent // +required Name string `json:"name"` // Namespace of the referent, // when not specified it acts as LocalObjectReference // +optional Namespace string `json:"namespace,omitempty"` }
NamespacedObjectKindReference contains enough information to let you locate the typed referenced object in any namespace
type NamespacedObjectReference ¶ added in v0.7.0
type NamespacedObjectReference struct { // Name of the referent // +required Name string `json:"name"` // Namespace of the referent, // when not specified it acts as LocalObjectReference // +optional Namespace string `json:"namespace,omitempty"` }
NamespacedObjectReference contains enough information to let you locate the referenced object in any namespace
type ObjectWithStatusConditions ¶ added in v0.4.0
ObjectWithStatusConditions is an interface that describes kubernetes resource type structs with Status Conditions
type ReconcileRequestStatus ¶ added in v0.1.0
type ReconcileRequestStatus struct { // LastHandledReconcileAt holds the value of the most recent // reconcile request value, so a change can be detected. // +optional LastHandledReconcileAt string `json:"lastHandledReconcileAt,omitempty"` }
ReconcileRequestStatus is a struct to embed in the status type, so that all types using the mechanism have the same field. Use it like this:
```
type WhateverStatus struct { meta.ReconcileRequestStatus `json:",inline"` // other status fields... }
```
func (ReconcileRequestStatus) GetLastHandledReconcileRequest ¶ added in v0.1.0
func (rs ReconcileRequestStatus) GetLastHandledReconcileRequest() string
func (*ReconcileRequestStatus) SetLastHandledReconcileRequest ¶ added in v0.1.0
func (rs *ReconcileRequestStatus) SetLastHandledReconcileRequest(token string)