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 {
13
13
}
14
14
15
15
const (
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"
18
19
)
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ apiVersion: source.fluxcd.io/v1alpha1
2
2
kind : GitRepository
3
3
metadata :
4
4
name : gitrepository-sample
5
- annotations :
6
- source.fluxcd.io/syncAt : " 2020-04-06T15:39:52+03:00"
7
5
spec :
8
6
interval : 1m
9
7
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 {
45
45
}
46
46
47
47
// 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 {
50
50
if val != valOld {
51
51
return true
52
52
}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ type Source interface {
19
19
}
20
20
````
21
21
22
- ### Source synchronization
22
+ ### Source reconciliation
23
23
24
24
Source objects should contain a ` spec.interval ` field that tells the controller at which interval to check for updates:
25
25
@@ -37,15 +37,16 @@ The controller can be told to check for updates right away by setting an annotat
37
37
38
38
``` go
39
39
const (
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"
42
43
)
43
44
```
44
45
45
- Trigger source sync example:
46
+ Trigger source reconciliation example:
46
47
47
48
``` bash
48
- kubectl annotate --overwrite gitrepository/podinfo source. fluxcd.io/syncAt =" $( date +%s) "
49
+ kubectl annotate --overwrite gitrepository/podinfo fluxcd.io/reconcileAt =" $( date +%s) "
49
50
```
50
51
51
52
### Source status
Original file line number Diff line number Diff line change @@ -73,10 +73,6 @@ apiVersion: source.fluxcd.io/v1alpha1
73
73
kind : HelmChart
74
74
metadata :
75
75
name : redis
76
- namespace : default
77
- annotations :
78
- # force sync trigger
79
- source.fluxcd.io/syncAt : " 2020-04-06T15:39:52+03:00"
80
76
spec :
81
77
name : redis
82
78
version : 10.5.7
@@ -92,7 +88,6 @@ apiVersion: source.fluxcd.io/v1alpha1
92
88
kind : HelmChart
93
89
metadata :
94
90
name : redis
95
- namespace : default
96
91
spec :
97
92
name : redis
98
93
version : ^10.0.0
Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ apiVersion: source.fluxcd.io/v1alpha1
71
71
kind : HelmRepository
72
72
metadata :
73
73
name : stable
74
- namespace : default
75
74
spec :
76
75
url : https://kubernetes-charts.storage.googleapis.com/
77
76
interval : 10m
@@ -84,7 +83,6 @@ apiVersion: source.fluxcd.io/v1alpha1
84
83
kind : HelmRepository
85
84
metadata :
86
85
name : private
87
- namespace : default
88
86
spec :
89
87
url : https://charts.example.com
90
88
secretRef :
You can’t perform that action at this time.
0 commit comments