Documentation ¶
Index ¶
- func RequestReconciliation(ctx context.Context, k client.Client, name client.ObjectKey, ...) error
- func WaitForSync(ctx context.Context, c client.Client, key client.ObjectKey, obj Reconcilable) error
- type Automation
- type BucketAdapter
- func (obj BucketAdapter) AsClientObject() client.Object
- func (obj BucketAdapter) DeepCopyClientObject() client.Object
- func (obj BucketAdapter) GetLastHandledReconcileRequest() string
- func (obj BucketAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj BucketAdapter) SetSuspended(suspend bool) error
- type GitRepositoryAdapter
- func (obj GitRepositoryAdapter) AsClientObject() client.Object
- func (obj GitRepositoryAdapter) DeepCopyClientObject() client.Object
- func (obj GitRepositoryAdapter) GetLastHandledReconcileRequest() string
- func (obj GitRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj GitRepositoryAdapter) SetSuspended(suspend bool) error
- type HelmChartAdapter
- func (obj HelmChartAdapter) AsClientObject() client.Object
- func (obj HelmChartAdapter) DeepCopyClientObject() client.Object
- func (obj HelmChartAdapter) GetLastHandledReconcileRequest() string
- func (obj HelmChartAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj HelmChartAdapter) SetSuspended(suspend bool) error
- type HelmReleaseAdapter
- func (obj HelmReleaseAdapter) AsClientObject() client.Object
- func (obj HelmReleaseAdapter) DeepCopyClientObject() client.Object
- func (obj HelmReleaseAdapter) GetLastHandledReconcileRequest() string
- func (obj HelmReleaseAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj HelmReleaseAdapter) SetSuspended(suspend bool) error
- func (obj HelmReleaseAdapter) SourceRef() SourceRef
- type HelmRepositoryAdapter
- func (obj HelmRepositoryAdapter) AsClientObject() client.Object
- func (obj HelmRepositoryAdapter) DeepCopyClientObject() client.Object
- func (obj HelmRepositoryAdapter) GetLastHandledReconcileRequest() string
- func (obj HelmRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj HelmRepositoryAdapter) SetSuspended(suspend bool) error
- type ImageRepositoryAdapter
- func (obj ImageRepositoryAdapter) AsClientObject() client.Object
- func (obj ImageRepositoryAdapter) DeepCopyClientObject() client.Object
- func (obj ImageRepositoryAdapter) GetLastHandledReconcileRequest() string
- func (obj ImageRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj ImageRepositoryAdapter) SetSuspended(suspend bool) error
- type ImageUpdateAutomationAdapter
- func (obj ImageUpdateAutomationAdapter) AsClientObject() client.Object
- func (obj ImageUpdateAutomationAdapter) DeepCopyClientObject() client.Object
- func (obj ImageUpdateAutomationAdapter) GetLastHandledReconcileRequest() string
- func (obj ImageUpdateAutomationAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj ImageUpdateAutomationAdapter) SetSuspended(suspend bool) error
- type KustomizationAdapter
- func (obj KustomizationAdapter) AsClientObject() client.Object
- func (obj KustomizationAdapter) DeepCopyClientObject() client.Object
- func (obj KustomizationAdapter) GetLastHandledReconcileRequest() string
- func (obj KustomizationAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj KustomizationAdapter) SetSuspended(suspend bool) error
- func (obj KustomizationAdapter) SourceRef() SourceRef
- type OCIRepositoryAdapter
- func (obj OCIRepositoryAdapter) AsClientObject() client.Object
- func (obj OCIRepositoryAdapter) DeepCopyClientObject() client.Object
- func (obj OCIRepositoryAdapter) GetLastHandledReconcileRequest() string
- func (obj OCIRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind
- func (obj OCIRepositoryAdapter) SetSuspended(suspend bool) error
- type Reconcilable
- type SourceRef
- type UnstructuredAdapter
- func (obj UnstructuredAdapter) AsClientObject() client.Object
- func (obj UnstructuredAdapter) DeepCopyClientObject() client.Object
- func (obj UnstructuredAdapter) GetConditions() []metav1.Condition
- func (obj UnstructuredAdapter) GetLastHandledReconcileRequest() string
- func (obj UnstructuredAdapter) SetSuspended(suspend bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestReconciliation ¶
func RequestReconciliation(ctx context.Context, k client.Client, name client.ObjectKey, gvk schema.GroupVersionKind) error
RequestReconciliation sets the annotations of an object so that the flux controller(s) will force a reconciliation. Take straight from the flux CLI source: https://github.com/fluxcd/flux2/blob/cb53243fc11de81de3a34616d14322d66573aa65/cmd/flux/reconcile.go#L155
func WaitForSync ¶
func WaitForSync(ctx context.Context, c client.Client, key client.ObjectKey, obj Reconcilable) error
WaitForSync polls the k8s API until the resources is sync'd, and times out eventually.
Types ¶
type Automation ¶
type Automation interface { Reconcilable SourceRef() SourceRef }
Automation objects are Kustomizations and HelmReleases. These are the only object types that can be triggered to be reconciled with their source.
type BucketAdapter ¶
type BucketAdapter struct {
*sourcev1b2.Bucket
}
func (BucketAdapter) AsClientObject ¶
func (obj BucketAdapter) AsClientObject() client.Object
func (BucketAdapter) DeepCopyClientObject ¶
func (obj BucketAdapter) DeepCopyClientObject() client.Object
func (BucketAdapter) GetLastHandledReconcileRequest ¶
func (obj BucketAdapter) GetLastHandledReconcileRequest() string
func (BucketAdapter) GroupVersionKind ¶
func (obj BucketAdapter) GroupVersionKind() schema.GroupVersionKind
func (BucketAdapter) SetSuspended ¶
func (obj BucketAdapter) SetSuspended(suspend bool) error
type GitRepositoryAdapter ¶
type GitRepositoryAdapter struct {
*sourcev1.GitRepository
}
func (GitRepositoryAdapter) AsClientObject ¶
func (obj GitRepositoryAdapter) AsClientObject() client.Object
func (GitRepositoryAdapter) DeepCopyClientObject ¶
func (obj GitRepositoryAdapter) DeepCopyClientObject() client.Object
func (GitRepositoryAdapter) GetLastHandledReconcileRequest ¶
func (obj GitRepositoryAdapter) GetLastHandledReconcileRequest() string
func (GitRepositoryAdapter) GroupVersionKind ¶
func (obj GitRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind
func (GitRepositoryAdapter) SetSuspended ¶
func (obj GitRepositoryAdapter) SetSuspended(suspend bool) error
type HelmChartAdapter ¶
type HelmChartAdapter struct {
*sourcev1b2.HelmChart
}
func (HelmChartAdapter) AsClientObject ¶
func (obj HelmChartAdapter) AsClientObject() client.Object
func (HelmChartAdapter) DeepCopyClientObject ¶
func (obj HelmChartAdapter) DeepCopyClientObject() client.Object
func (HelmChartAdapter) GetLastHandledReconcileRequest ¶
func (obj HelmChartAdapter) GetLastHandledReconcileRequest() string
func (HelmChartAdapter) GroupVersionKind ¶
func (obj HelmChartAdapter) GroupVersionKind() schema.GroupVersionKind
func (HelmChartAdapter) SetSuspended ¶
func (obj HelmChartAdapter) SetSuspended(suspend bool) error
type HelmReleaseAdapter ¶
type HelmReleaseAdapter struct {
*helmv2.HelmRelease
}
func (HelmReleaseAdapter) AsClientObject ¶
func (obj HelmReleaseAdapter) AsClientObject() client.Object
func (HelmReleaseAdapter) DeepCopyClientObject ¶
func (obj HelmReleaseAdapter) DeepCopyClientObject() client.Object
func (HelmReleaseAdapter) GetLastHandledReconcileRequest ¶
func (obj HelmReleaseAdapter) GetLastHandledReconcileRequest() string
func (HelmReleaseAdapter) GroupVersionKind ¶
func (obj HelmReleaseAdapter) GroupVersionKind() schema.GroupVersionKind
func (HelmReleaseAdapter) SetSuspended ¶
func (obj HelmReleaseAdapter) SetSuspended(suspend bool) error
func (HelmReleaseAdapter) SourceRef ¶
func (obj HelmReleaseAdapter) SourceRef() SourceRef
type HelmRepositoryAdapter ¶
type HelmRepositoryAdapter struct {
*sourcev1b2.HelmRepository
}
func (HelmRepositoryAdapter) AsClientObject ¶
func (obj HelmRepositoryAdapter) AsClientObject() client.Object
func (HelmRepositoryAdapter) DeepCopyClientObject ¶
func (obj HelmRepositoryAdapter) DeepCopyClientObject() client.Object
func (HelmRepositoryAdapter) GetLastHandledReconcileRequest ¶
func (obj HelmRepositoryAdapter) GetLastHandledReconcileRequest() string
func (HelmRepositoryAdapter) GroupVersionKind ¶
func (obj HelmRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind
func (HelmRepositoryAdapter) SetSuspended ¶
func (obj HelmRepositoryAdapter) SetSuspended(suspend bool) error
type ImageRepositoryAdapter ¶ added in v0.29.0
type ImageRepositoryAdapter struct {
*reflectorv1.ImageRepository
}
func (ImageRepositoryAdapter) AsClientObject ¶ added in v0.29.0
func (obj ImageRepositoryAdapter) AsClientObject() client.Object
func (ImageRepositoryAdapter) DeepCopyClientObject ¶ added in v0.29.0
func (obj ImageRepositoryAdapter) DeepCopyClientObject() client.Object
func (ImageRepositoryAdapter) GetLastHandledReconcileRequest ¶ added in v0.29.0
func (obj ImageRepositoryAdapter) GetLastHandledReconcileRequest() string
func (ImageRepositoryAdapter) GroupVersionKind ¶ added in v0.29.0
func (obj ImageRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind
func (ImageRepositoryAdapter) SetSuspended ¶ added in v0.29.0
func (obj ImageRepositoryAdapter) SetSuspended(suspend bool) error
type ImageUpdateAutomationAdapter ¶ added in v0.29.0
type ImageUpdateAutomationAdapter struct {
*imgautomationv1.ImageUpdateAutomation
}
func (ImageUpdateAutomationAdapter) AsClientObject ¶ added in v0.29.0
func (obj ImageUpdateAutomationAdapter) AsClientObject() client.Object
func (ImageUpdateAutomationAdapter) DeepCopyClientObject ¶ added in v0.29.0
func (obj ImageUpdateAutomationAdapter) DeepCopyClientObject() client.Object
func (ImageUpdateAutomationAdapter) GetLastHandledReconcileRequest ¶ added in v0.29.0
func (obj ImageUpdateAutomationAdapter) GetLastHandledReconcileRequest() string
func (ImageUpdateAutomationAdapter) GroupVersionKind ¶ added in v0.29.0
func (obj ImageUpdateAutomationAdapter) GroupVersionKind() schema.GroupVersionKind
func (ImageUpdateAutomationAdapter) SetSuspended ¶ added in v0.29.0
func (obj ImageUpdateAutomationAdapter) SetSuspended(suspend bool) error
type KustomizationAdapter ¶
type KustomizationAdapter struct {
*kustomizev1.Kustomization
}
func (KustomizationAdapter) AsClientObject ¶
func (obj KustomizationAdapter) AsClientObject() client.Object
func (KustomizationAdapter) DeepCopyClientObject ¶
func (obj KustomizationAdapter) DeepCopyClientObject() client.Object
func (KustomizationAdapter) GetLastHandledReconcileRequest ¶
func (obj KustomizationAdapter) GetLastHandledReconcileRequest() string
func (KustomizationAdapter) GroupVersionKind ¶
func (obj KustomizationAdapter) GroupVersionKind() schema.GroupVersionKind
func (KustomizationAdapter) SetSuspended ¶
func (obj KustomizationAdapter) SetSuspended(suspend bool) error
func (KustomizationAdapter) SourceRef ¶
func (obj KustomizationAdapter) SourceRef() SourceRef
type OCIRepositoryAdapter ¶
type OCIRepositoryAdapter struct {
*sourcev1b2.OCIRepository
}
func (OCIRepositoryAdapter) AsClientObject ¶
func (obj OCIRepositoryAdapter) AsClientObject() client.Object
func (OCIRepositoryAdapter) DeepCopyClientObject ¶
func (obj OCIRepositoryAdapter) DeepCopyClientObject() client.Object
func (OCIRepositoryAdapter) GetLastHandledReconcileRequest ¶
func (obj OCIRepositoryAdapter) GetLastHandledReconcileRequest() string
func (OCIRepositoryAdapter) GroupVersionKind ¶
func (obj OCIRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind
func (OCIRepositoryAdapter) SetSuspended ¶
func (obj OCIRepositoryAdapter) SetSuspended(suspend bool) error
type Reconcilable ¶
type Reconcilable interface { client.Object meta.ObjectWithConditions GetAnnotations() map[string]string SetAnnotations(map[string]string) GetLastHandledReconcileRequest() string AsClientObject() client.Object GroupVersionKind() schema.GroupVersionKind SetSuspended(suspend bool) error DeepCopyClientObject() client.Object }
Reconcilable represents a Kubernetes object that Flux can reconcile
func ToReconcileable ¶
func ToReconcileable(gvk schema.GroupVersionKind) Reconcilable
ToReconcileable takes a GVK and returns a "Reconcilable" for it. The reconcilable can be passed to a controller-runtime client to fetch it from the cluster. Once fetched we can query it for the last sync time, whether its suspended etc, using the Reconcilable interface.
The generic unstructured case handles "flux like" objects that we don't explicitly know about, but which follow the same patterns for suspend/sync as a stadard flux object. E.g. `spec.suspend` and `status.lastHandledReconcileRequest` etc.
type UnstructuredAdapter ¶ added in v0.36.0
type UnstructuredAdapter struct {
*unstructured.Unstructured
}
UnstructuredAdapter implements the Reconcilable interface for unstructured resources. The underlying resource gvk should have the standard flux object sync/suspend fields
func (UnstructuredAdapter) AsClientObject ¶ added in v0.36.0
func (obj UnstructuredAdapter) AsClientObject() client.Object
func (UnstructuredAdapter) DeepCopyClientObject ¶ added in v0.36.0
func (obj UnstructuredAdapter) DeepCopyClientObject() client.Object
func (UnstructuredAdapter) GetConditions ¶ added in v0.36.0
func (obj UnstructuredAdapter) GetConditions() []metav1.Condition
func (UnstructuredAdapter) GetLastHandledReconcileRequest ¶ added in v0.36.0
func (obj UnstructuredAdapter) GetLastHandledReconcileRequest() string
func (UnstructuredAdapter) SetSuspended ¶ added in v0.36.0
func (obj UnstructuredAdapter) SetSuspended(suspend bool) error