Rename syncAt annotation to reconcileAt

Use `fluxcd.io/reconcileAt` annotation across all controllers.
This commit is contained in:
stefanprodan 2020-07-13 17:14:57 +03:00
parent 47d239312a
commit f79ac6dd44
4 changed files with 13 additions and 13 deletions

View File

@ -78,7 +78,7 @@ kubectl -n gitops-system wait gitrepository/podinfo --for=condition=ready
The source controller will check for new commits in the master branch every minute. You can force a git sync with:
```bash
kubectl -n gitops-system nnotate --overwrite gitrepository/podinfo source.fluxcd.io/syncAt="$(date +%s)"
kubectl -n gitops-system nnotate --overwrite gitrepository/podinfo fluxcd.io/reconcileAt="$(date +%s)"
```
### Define a kustomization
@ -159,7 +159,7 @@ You can trigger a kustomization reconciliation any time with:
```bash
kubectl -n gitops-system annotate --overwrite kustomization/podinfo-dev \
kustomize.fluxcd.io/syncAt="$(date +%s)"
fluxcd.io/reconcileAt="$(date +%s)"
```
When the source controller pulls a new Git revision, the kustomize controller will detect that the

View File

@ -195,9 +195,9 @@ func (in *Kustomization) GetTimeout() time.Duration {
}
const (
// SyncAtAnnotation is the annotation used for triggering a
// sync outside of the specified schedule.
SyncAtAnnotation string = "kustomize.fluxcd.io/syncAt"
// ReconcileAtAnnotation is the annotation used for triggering a
// reconciliation outside of the defined schedule.
ReconcileAtAnnotation string = "fluxcd.io/reconcileAt"
// SourceIndexKey is the key used for indexing kustomizations
// based on their sources.

View File

@ -45,9 +45,9 @@ func (KustomizationSyncAtPredicate) Update(e event.UpdateEvent) bool {
return true
}
// handle syncAt annotation
if val, ok := e.MetaNew.GetAnnotations()[kustomizev1.SyncAtAnnotation]; ok {
if valOld, okOld := e.MetaOld.GetAnnotations()[kustomizev1.SyncAtAnnotation]; okOld {
// handle reconcileAt annotation
if val, ok := e.MetaNew.GetAnnotations()[kustomizev1.ReconcileAtAnnotation]; ok {
if valOld, okOld := e.MetaOld.GetAnnotations()[kustomizev1.ReconcileAtAnnotation]; okOld {
if val != valOld {
return true
}

View File

@ -164,21 +164,21 @@ The interval time units are `s`, `m` and `h` e.g. `interval: 5m`, the minimum va
The kustomization execution can be suspended by setting `spec.susped` to `true`.
The controller can be told to execute the kustomization outside of the specified interval
The controller can be told to reconcile the kustomization outside of the specified interval
by annotating the kustomization object with:
```go
const (
// SyncAtAnnotation is the annotation used for triggering a
// sync outside of the specified schedule.
SyncAtAnnotation string = "kustomize.fluxcd.io/syncAt"
// ReconcileAtAnnotation is the annotation used for triggering a
// reconciliation outside of the defined schedule.
ReconcileAtAnnotation string = "fluxcd.io/reconcileAt"
)
```
On-demand execution example:
```bash
kubectl annotate --overwrite kustomization/podinfo kustomize.fluxcd.io/syncAt="$(date +%s)"
kubectl annotate --overwrite kustomization/podinfo fluxcd.io/reconcileAt="$(date +%s)"
```
## Garbage collection