meta

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 2 Imported by: 161

Documentation

Overview

Package meta contains the generic metadata APIs for use by toolkit components.

Index

Constants

View Source
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"
)
View Source
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"
)
View Source
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

func ReconcileAnnotationValue(annotations map[string]string) (string, bool)

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

type ObjectWithStatusConditions interface {
	GetStatusConditions() *[]metav1.Condition
}

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)

Jump to

Keyboard shortcuts

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