diff --git a/chart/flux/README.md b/chart/flux/README.md index a2de8457f1..8ee1be8bdf 100755 --- a/chart/flux/README.md +++ b/chart/flux/README.md @@ -190,7 +190,7 @@ The following tables lists the configurable parameters of the Weave Flux chart a | `git.label` | Label to keep track of sync progress, used to tag the Git branch | `flux-sync` | `git.ciSkip` | Append "[ci skip]" to commit messages so that CI will skip builds | `false` | `git.pollInterval` | Period at which to poll git repo for new commits | `5m` -| `git.timeOut` | Duration after which git operations time out | `20s` +| `git.timeout` | Duration after which git operations timeout | `20s` | `git.secretName` | Kubernetes secret with the SSH private key | None | `ssh.known_hosts` | The contents of an SSH `known_hosts` file, if you need to supply host key(s) | None | `registry.cacheExpiry` | Duration to keep cached image info in memcached | `1h` @@ -209,7 +209,7 @@ The following tables lists the configurable parameters of the Weave Flux chart a | `helmOperator.git.branch` | Branch of git repo to use for Helm charts | `master` | `helmOperator.git.chartsPath` | Path within git repo to locate Helm charts (relative path) | `charts` | `helmOperator.git.pollInterval` | Period at which to poll git repo for new commits | `git.pollInterval` -| `helmOperator.git.timeOut` | Duration after which git operations time out | `git.timeOut` +| `helmOperator.git.timeout` | Duration after which git operations timeout | `git.timeout` | `helmOperator.git.secretName` | Kubernetes secret with the SSH private key | None | `helmOperator.logReleaseDiffs` | Helm operator should log the diff when a chart release diverges (possibly insecure) | `false` | `helmOperator.tillerNamespace` | Namespace in which the Tiller server can be found | `kube-system` diff --git a/chart/flux/templates/deployment.yaml b/chart/flux/templates/deployment.yaml index 16a12926b0..5f27876c45 100644 --- a/chart/flux/templates/deployment.yaml +++ b/chart/flux/templates/deployment.yaml @@ -71,7 +71,7 @@ spec: - --git-email={{ .Values.git.email }} - --git-set-author={{ .Values.git.setAuthor }} - --git-poll-interval={{ .Values.git.pollInterval }} - - --git-time-out={{ .Values.git.timeOut }} + - --git-timeout={{ .Values.git.timeout }} - --sync-interval={{ .Values.git.pollInterval }} - --git-ci-skip={{ .Values.git.ciSkip }} {{- if .Values.git.label }} diff --git a/chart/flux/templates/helm-operator-deployment.yaml b/chart/flux/templates/helm-operator-deployment.yaml index b955c1a015..102ed0b0d8 100644 --- a/chart/flux/templates/helm-operator-deployment.yaml +++ b/chart/flux/templates/helm-operator-deployment.yaml @@ -1,7 +1,7 @@ {{- $gitURL := default .Values.git.url .Values.helmOperator.git.url }} {{- $gitBranch := default .Values.git.branch .Values.helmOperator.git.branch }} {{- $gitPollInterval := default .Values.git.pollInterval .Values.helmOperator.git.pollInterval }} -{{- $gitTimeOut := default .Values.git.timeOut .Values.helmOperator.git.timeOut }} +{{- $gitTimeout := default .Values.git.timeout .Values.helmOperator.git.timeout }} {{- if .Values.helmOperator.create -}} apiVersion: apps/v1beta2 kind: Deployment @@ -80,7 +80,7 @@ spec: - --git-url={{ $gitURL }} - --git-branch={{ $gitBranch }} - --git-poll-interval={{ $gitPollInterval }} - - --git-time-out={{ $gitTimeOut }} + - --git-timeout={{ $gitTimeout }} - --git-charts-path={{ .Values.helmOperator.git.chartsPath }} - --charts-sync-interval={{ .Values.helmOperator.chartsSyncInterval }} - --charts-sync-timeout={{ .Values.helmOperator.chartsSyncTimeout }} diff --git a/chart/flux/values.yaml b/chart/flux/values.yaml index 1bdbb5589b..de778c0a85 100644 --- a/chart/flux/values.yaml +++ b/chart/flux/values.yaml @@ -41,7 +41,7 @@ helmOperator: branch: "" chartsPath: "charts" pollInterval: "" - timeOut: "" + timeout: "" # generate a SSH key named identity: ssh-keygen -q -N "" -f ./identity # create a Kubernetes secret: kubectl -n flux create secret generic helm-ssh --from-file=./identity # delete the private key: rm ./identity @@ -95,8 +95,8 @@ git: ciSkip: false # Period at which to poll git repo for new commits pollInterval: "5m" - # Duration after which git operations time out - timeOut: "20s" + # Duration after which git operations timeout + timeout: "20s" # generate a SSH key named identity: ssh-keygen -q -N "" -f ./identity # create a Kubernetes secret: kubectl -n flux create secret generic flux-ssh --from-file=./identity # delete the private key: rm ./identity diff --git a/cmd/fluxd/main.go b/cmd/fluxd/main.go index c60bb56e1a..6792580d52 100644 --- a/cmd/fluxd/main.go +++ b/cmd/fluxd/main.go @@ -93,7 +93,7 @@ func main() { gitSkipMessage = fs.String("git-ci-skip-message", "", "additional text for commit messages, useful for skipping builds in CI. Use this to supply specific text, or set --git-ci-skip") gitPollInterval = fs.Duration("git-poll-interval", 5*time.Minute, "period at which to poll git repo for new commits") - gitTimeOut = fs.Duration("git-time-out", 20*time.Second, "duration after which git operations time out") + gitTimeout = fs.Duration("git-timeout", 20*time.Second, "duration after which git operations timeout") // syncing syncInterval = fs.Duration("sync-interval", 5*time.Minute, "apply config in git to cluster at least this often, even if there are no new commits") // registry @@ -370,7 +370,7 @@ func main() { SkipMessage: *gitSkipMessage, } - repo := git.NewRepo(gitRemote, git.PollInterval(*gitPollInterval), git.TimeOut(*gitTimeOut)) + repo := git.NewRepo(gitRemote, git.PollInterval(*gitPollInterval), git.Timeout(*gitTimeout)) { shutdownWg.Add(1) go func() { diff --git a/cmd/helm-operator/main.go b/cmd/helm-operator/main.go index 2a33cdffc1..13f228c76f 100644 --- a/cmd/helm-operator/main.go +++ b/cmd/helm-operator/main.go @@ -56,7 +56,7 @@ var ( gitBranch *string gitChartsPath *string gitPollInterval *time.Duration - gitTimeOut *time.Duration + gitTimeout *time.Duration queueWorkerCount *int @@ -108,7 +108,7 @@ func init() { gitBranch = fs.String("git-branch", "master", "branch of git repo") gitChartsPath = fs.String("git-charts-path", defaultGitChartsPath, "path within git repo to locate Helm Charts (relative path)") gitPollInterval = fs.Duration("git-poll-interval", 5*time.Minute, "period on which to poll for changes to the git repo") - gitTimeOut = fs.Duration("git-time-out", 20*time.Second, "duration after which git operations time out") + gitTimeout = fs.Duration("git-timeout", 20*time.Second, "duration after which git operations timeout") queueWorkerCount = fs.Int("queue-worker-count", 2, "Number of workers to process queue with Chart release jobs. Two by default") } @@ -191,7 +191,7 @@ func main() { go statusUpdater.Loop(shutdown, log.With(logger, "component", "annotator")) gitRemote := git.Remote{URL: *gitURL} - repo := git.NewRepo(gitRemote, git.PollInterval(*gitPollInterval), git.TimeOut(*gitTimeOut), git.ReadOnly) + repo := git.NewRepo(gitRemote, git.PollInterval(*gitPollInterval), git.Timeout(*gitTimeout), git.ReadOnly) // Chart releases sync due to Custom Resources changes ------------------------------- { diff --git a/git/repo.go b/git/repo.go index ed5905a621..f81fe47ba7 100644 --- a/git/repo.go +++ b/git/repo.go @@ -14,7 +14,7 @@ const ( defaultInterval = 5 * time.Minute defaultTimeout = 20 * time.Second - CheckPushTag = "flux-write-check" + CheckPushTag = "flux-write-check" ) var ( @@ -82,9 +82,9 @@ func (p PollInterval) apply(r *Repo) { r.interval = time.Duration(p) } -type TimeOut time.Duration +type Timeout time.Duration -func (t TimeOut) apply(r *Repo) { +func (t Timeout) apply(r *Repo) { r.timeout = time.Duration(t) } diff --git a/site/daemon.md b/site/daemon.md index 9e76415c6f..aa57bed26b 100644 --- a/site/daemon.md +++ b/site/daemon.md @@ -56,7 +56,7 @@ fluxd requires setup and offers customization though a multitude of flags. |--git-sync-tag | `flux-sync` | tag to use to mark sync progress for this cluster (old config, still used if --git-label is not supplied)| |--git-notes-ref | `flux` | ref to use for keeping commit annotations in git notes| |--git-poll-interval | `5 minutes` | period at which to fetch any new commits from the git repo | -|--git-time-out | `20 seconds` | duration after which git operations time out | +|--git-timeout | `20 seconds` | duration after which git operations timeout | |**syncing** | | control over how config is applied to the cluster | |--sync-interval | `5 minutes` | apply the git config to the cluster at least this often. New commits may provoke more frequent syncs | |**registry cache** | | (none of these need overriding, usually) | diff --git a/site/helm-operator.md b/site/helm-operator.md index 8cdb640329..b1dba05367 100644 --- a/site/helm-operator.md +++ b/site/helm-operator.md @@ -28,7 +28,7 @@ helm-operator requires setup and offers customization though a multitude of flag |--git-branch | `master` | Branch of git repo to use for Kubernetes manifests| |--git-charts-path | `charts` | Path within git repo to locate Kubernetes Charts (relative path)| | | | **repo chart changes** (none of these need overriding, usually) | -|--git-time-out | `20 seconds` | duration after which git operations time out | +|--git-timeout | `20 seconds` | duration after which git operations timeout | |--git-poll-interval | `5 minutes` | period at which to poll git repo for new commits| |--chartsSyncInterval | 3*time.Minute | Interval at which to check for changed charts.| |--chartsSyncTimeout | 1*time.Minute | Timeout when checking for changed charts.|