Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
| pipedKeyData | string | Base64 encoded string of Piped key. Either pipedKeyFile or pipedKeyData must be set. | Yes |
| apiAddress | string | The address used to connect to the control-plane's API. | Yes |
| syncInterval | duration | How often to check whether an application should be synced. Default is `1m`. | No |
<!-- TODO: Add doc for appConfigSyncInterval -->
| git | [Git](/docs/operator-manual/piped/configuration-reference/#git) | Git configuration needed for Git commands. | No |
| repositories | [][Repository](/docs/operator-manual/piped/configuration-reference/#gitrepository) | List of Git repositories this piped will handle. | No |
| chartRepositories | [][ChartRepository](/docs/operator-manual/piped/configuration-reference/#chartrepository) | List of Helm chart repositories that should be added while starting up. | No |
Expand Down
3 changes: 1 addition & 2 deletions pkg/app/piped/appconfigreporter/appconfigreporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ func (r *Reporter) Run(ctx context.Context) error {
r.gitRepos[repoCfg.RepoID] = repo
}

// FIXME: Think about sync interval of app config reporter
ticker := time.NewTicker(r.config.SyncInterval.Duration())
ticker := time.NewTicker(r.config.AppConfigSyncInterval.Duration())
defer ticker.Stop()

for {
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/piped.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ type PipedSpec struct {
// How often to check whether an application should be synced.
// Default is 1m.
SyncInterval Duration `json:"syncInterval" default:"1m"`
// How often to check whether an application configuration file should be synced.
// Default is 5m.
AppConfigSyncInterval Duration `json:"appConfigSyncInterval" default:"5m"`
// Git configuration needed for git commands.
Git PipedGit `json:"git"`
// List of git repositories this piped will handle.
Expand Down
13 changes: 7 additions & 6 deletions pkg/config/piped_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ func TestPipedConfig(t *testing.T) {
expectedKind: KindPiped,
expectedAPIVersion: "pipecd.dev/v1beta1",
expectedSpec: &PipedSpec{
ProjectID: "test-project",
PipedID: "test-piped",
PipedKeyFile: "etc/piped/key",
APIAddress: "your-pipecd.domain",
WebAddress: "https://your-pipecd.domain",
SyncInterval: Duration(time.Minute),
ProjectID: "test-project",
PipedID: "test-piped",
PipedKeyFile: "etc/piped/key",
APIAddress: "your-pipecd.domain",
WebAddress: "https://your-pipecd.domain",
SyncInterval: Duration(time.Minute),
AppConfigSyncInterval: Duration(5 * time.Minute),
Git: PipedGit{
Username: "username",
Email: "[email protected]",
Expand Down