File tree Expand file tree Collapse file tree 6 files changed +11
-18
lines changed
Expand file tree Collapse file tree 6 files changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ type Source interface {
1313}
1414
1515const (
16- // SyncAtAnnotation is the timestamp corresponding to an on-demand source sync.
17- SyncAtAnnotation string = "source.fluxcd.io/syncAt"
16+ // ReconcileAtAnnotation is the annotation used for triggering a
17+ // reconciliation outside of the defined schedule.
18+ ReconcileAtAnnotation string = "fluxcd.io/reconcileAt"
1819)
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ apiVersion: source.fluxcd.io/v1alpha1
22kind : GitRepository
33metadata :
44 name : gitrepository-sample
5- annotations :
6- source.fluxcd.io/syncAt : " 2020-04-06T15:39:52+03:00"
75spec :
86 interval : 1m
97 url : https://github.com/stefanprodan/podinfo
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ func (SourceChangePredicate) Update(e event.UpdateEvent) bool {
4545 }
4646
4747 // handle force sync
48- if val , ok := e .MetaNew .GetAnnotations ()[sourcev1 .SyncAtAnnotation ]; ok {
49- if valOld , okOld := e .MetaOld .GetAnnotations ()[sourcev1 .SyncAtAnnotation ]; okOld {
48+ if val , ok := e .MetaNew .GetAnnotations ()[sourcev1 .ReconcileAtAnnotation ]; ok {
49+ if valOld , okOld := e .MetaOld .GetAnnotations ()[sourcev1 .ReconcileAtAnnotation ]; okOld {
5050 if val != valOld {
5151 return true
5252 }
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ type Source interface {
1919}
2020````
2121
22- ### Source synchronization
22+ ### Source reconciliation
2323
2424Source objects should contain a ` spec.interval ` field that tells the controller at which interval to check for updates:
2525
@@ -37,15 +37,16 @@ The controller can be told to check for updates right away by setting an annotat
3737
3838``` go
3939const (
40- // SyncAtAnnotation is the timestamp corresponding to an on-demand source sync.
41- SyncAtAnnotation string = " source.fluxcd.io/syncAt"
40+ // ReconcileAtAnnotation is the annotation used for triggering a
41+ // reconciliation outside of the defined schedule.
42+ ReconcileAtAnnotation string = " fluxcd.io/reconcileAt"
4243)
4344```
4445
45- Trigger source sync example:
46+ Trigger source reconciliation example:
4647
4748``` bash
48- kubectl annotate --overwrite gitrepository/podinfo source. fluxcd.io/syncAt =" $( date +%s) "
49+ kubectl annotate --overwrite gitrepository/podinfo fluxcd.io/reconcileAt =" $( date +%s) "
4950```
5051
5152### Source status
Original file line number Diff line number Diff line change @@ -73,10 +73,6 @@ apiVersion: source.fluxcd.io/v1alpha1
7373kind : HelmChart
7474metadata :
7575 name : redis
76- namespace : default
77- annotations :
78- # force sync trigger
79- source.fluxcd.io/syncAt : " 2020-04-06T15:39:52+03:00"
8076spec :
8177 name : redis
8278 version : 10.5.7
@@ -92,7 +88,6 @@ apiVersion: source.fluxcd.io/v1alpha1
9288kind : HelmChart
9389metadata :
9490 name : redis
95- namespace : default
9691spec :
9792 name : redis
9893 version : ^10.0.0
Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ apiVersion: source.fluxcd.io/v1alpha1
7171kind : HelmRepository
7272metadata :
7373 name : stable
74- namespace : default
7574spec :
7675 url : https://kubernetes-charts.storage.googleapis.com/
7776 interval : 10m
@@ -84,7 +83,6 @@ apiVersion: source.fluxcd.io/v1alpha1
8483kind : HelmRepository
8584metadata :
8685 name : private
87- namespace : default
8886spec :
8987 url : https://charts.example.com
9088 secretRef :
You can’t perform that action at this time.
0 commit comments